diff --git a/Client/src/main/java/de/com/baseband/client/feature/modules/movement/NoFall.java b/Client/src/main/java/de/com/baseband/client/feature/modules/movement/NoFall.java index 8af743f..5b8695c 100644 --- a/Client/src/main/java/de/com/baseband/client/feature/modules/movement/NoFall.java +++ b/Client/src/main/java/de/com/baseband/client/feature/modules/movement/NoFall.java @@ -77,16 +77,21 @@ public class NoFall extends Feature { } } + private static final DataParameter FLAGS; + + static { + try { + FLAGS = (DataParameter) FieldFinder.findUnmarked(Entity.class, DataParameter.class, 0).get(null); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } + public void onReceive(PacketEvent.Receive event) { if(event.getPacket() instanceof SPacketEntityMetadata) { SPacketEntityMetadata packet = (SPacketEntityMetadata) event.getPacket(); if(mode == Mode.Elytra && cancelElytraNT != 0 && packet.getEntityId() == mc.player.getEntityId()) { - try { - DataParameter FLAGS = (DataParameter) FieldFinder.findUnmarked(Entity.class, DataParameter.class, 0).get(null); - packet.getDataManagerEntries().removeIf(x -> x.getKey().equals(FLAGS)); // remove FallFlying tag - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } + packet.getDataManagerEntries().removeIf(x -> x.getKey().equals(FLAGS)); // remove FallFlying tag to stop elytra from starting clientside } } }