diff --git a/Paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundCustomPayloadPacket.java b/Paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundCustomPayloadPacket.java index 63db149..dccf010 100644 --- a/Paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundCustomPayloadPacket.java +++ b/Paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundCustomPayloadPacket.java @@ -14,7 +14,9 @@ public class ClientboundCustomPayloadPacket extends ReflectWrapper implements Pa private static final Reflect.ReflectConstructor CONSTRUCTOR = wrapEx(() -> MAPPING.runtimeReflect().constructor(ResourceLocation.MAPPING.runtimeClass(), FriendlyByteBuf.MAPPING.runtimeClass())); private static final Reflect.ReflectField FIELD_BRAND = wrapEx(() -> MAPPING.mojField("BRAND")); - public static final ResourceLocation BRAND = wrap(wrapReflectEx(FIELD_BRAND::getStaticValue), ResourceLocation.class); + public static ResourceLocation BRAND() { + return wrap(wrapReflectEx(FIELD_BRAND::getStaticValue), ResourceLocation.class); + } protected ClientboundCustomPayloadPacket(Object obj) { super(obj); diff --git a/Paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundGameEventPacket.java b/Paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundGameEventPacket.java index 637c53a..193b773 100644 --- a/Paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundGameEventPacket.java +++ b/Paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundGameEventPacket.java @@ -13,8 +13,12 @@ public class ClientboundGameEventPacket extends ReflectWrapper implements Packet private static final Reflect.ReflectField FIELD_RAIN_LEVEL_CHANGE = wrapEx(() -> MAPPING.mojField("RAIN_LEVEL_CHANGE")); private static final Reflect.ReflectField FIELD_THUNDER_LEVEL_CHANGE = wrapEx(() -> MAPPING.mojField("THUNDER_LEVEL_CHANGE")); - public static final Type RAIN_LEVEL_CHANGE = wrap(wrapReflectEx(FIELD_RAIN_LEVEL_CHANGE::getStaticValue), Type.class); - public static final Type THUNDER_LEVEL_CHANGE = wrap(wrapReflectEx(FIELD_THUNDER_LEVEL_CHANGE::getStaticValue), Type.class); + public static Type RAIN_LEVEL_CHANGE() { + return wrap(wrapReflectEx(FIELD_RAIN_LEVEL_CHANGE::getStaticValue), Type.class); + } + public static Type THUNDER_LEVEL_CHANGE() { + return wrap(wrapReflectEx(FIELD_THUNDER_LEVEL_CHANGE::getStaticValue), Type.class); + } public ClientboundGameEventPacket(Type type, float value) { this(wrapReflectEx(() -> CONSTRUCTOR.instanciate(unwrap(type), value))); diff --git a/Paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/DamageSource.java b/Paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/DamageSource.java index c847bd6..581e810 100644 --- a/Paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/DamageSource.java +++ b/Paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/DamageSource.java @@ -11,7 +11,9 @@ public class DamageSource extends ReflectWrapper { public static final NMSReflect.ClassMapping MAPPING = wrapEx(() -> NMSReflect.mojClass("net.minecraft.world.damagesource.DamageSource")); private static final Reflect.ReflectField FIELD_OUT_OF_WORLD = wrapEx(() -> MAPPING.mojField("OUT_OF_WORLD")); - public static final DamageSource OUT_OF_WORLD = wrap(wrapReflectEx(FIELD_OUT_OF_WORLD::getStaticValue), DamageSource.class); + public static DamageSource OUT_OF_WORLD() { + return wrap(wrapReflectEx(FIELD_OUT_OF_WORLD::getStaticValue), DamageSource.class); + } protected DamageSource(Object obj) { super(obj);