From 3975898e593b8672445df21e99ca05d5cda3a2f0 Mon Sep 17 00:00:00 2001 From: madi308 <77383233+madi308@users.noreply.github.com> Date: Fri, 8 Mar 2024 12:16:44 +0200 Subject: [PATCH] Tried to add 1.20.4 support --- .../main/java/net/seanomik/tamablefoxes/util/FieldHelper.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Utility/src/main/java/net/seanomik/tamablefoxes/util/FieldHelper.java b/Utility/src/main/java/net/seanomik/tamablefoxes/util/FieldHelper.java index 4629338..a8fd566 100644 --- a/Utility/src/main/java/net/seanomik/tamablefoxes/util/FieldHelper.java +++ b/Utility/src/main/java/net/seanomik/tamablefoxes/util/FieldHelper.java @@ -12,18 +12,14 @@ public final class FieldHelper { public static void setFieldUsingUnsafe(final Field field, final Object object, final Object newValue) { try { field.setAccessible(true); - System.out.println("field on accessible"); int fieldModifiersMask = field.getModifiers(); boolean isFinalModifierPresent = (fieldModifiersMask & Modifier.FINAL) == Modifier.FINAL; if (isFinalModifierPresent) { AccessController.doPrivileged((PrivilegedAction) () -> { try { sun.misc.Unsafe unsafe = getUnsafe(); - System.out.println("unsafe on käes"); long offset = unsafe.objectFieldOffset(field); - System.out.println("offset mida iganes"); setFieldUsingUnsafe(object, field.getType(), offset, newValue, unsafe); - System.out.println("see teine setfieldusingunsafe sai hakkama"); return null; } catch (Throwable t) { throw new RuntimeException(t);