Migrate reflections to mojang mapped by default

This commit is contained in:
Lixfel
2025-01-06 16:44:10 +01:00
parent 94a1ed3569
commit 9888700273
44 changed files with 216 additions and 110 deletions
@@ -49,15 +49,15 @@ import java.util.function.BiFunction;
@Linked
public class NoClipCommand extends SWCommand implements Listener {
public static final Class<?> gameStateChange = Reflection.getClass("net.minecraft.network.protocol.game.PacketPlayOutGameStateChange");
public static final Class<?> gameStateChange = Reflection.getClass("net.minecraft.network.protocol.game.ClientboundGameEventPacket");
private static final Reflection.Field<Float> floatFieldAccessor = Reflection.getField(gameStateChange, float.class, 0);
private static final Class<?> position = Reflection.getClass("net.minecraft.network.protocol.game.PacketPlayInFlying$PacketPlayInPosition");
private static final Class<?> positionLook = Reflection.getClass("net.minecraft.network.protocol.game.PacketPlayInFlying$PacketPlayInPositionLook");
private static final Class<?> useItem = Reflection.getClass("net.minecraft.network.protocol.game.PacketPlayInUseItem");
private static final Class<?> blockDig = Reflection.getClass("net.minecraft.network.protocol.game.PacketPlayInBlockDig");
private static final Class<?> windowClick = Reflection.getClass("net.minecraft.network.protocol.game.PacketPlayInWindowClick");
private static final Class<?> setSlotStack = Reflection.getClass("net.minecraft.network.protocol.game.PacketPlayInSetCreativeSlot");
private static final Class<?> position = Reflection.getClass("net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos");
private static final Class<?> positionLook = Reflection.getClass("net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$PosRot");
private static final Class<?> useItem = Reflection.getClass("net.minecraft.network.protocol.game.ServerboundUseItemOnPacket");
private static final Class<?> blockDig = Reflection.getClass("net.minecraft.network.protocol.game.ServerboundPlayerActionPacket");
private static final Class<?> windowClick = Reflection.getClass("net.minecraft.network.protocol.game.ServerboundContainerClickPacket");
private static final Class<?> setSlotStack = Reflection.getClass("net.minecraft.network.protocol.game.ServerboundSetCreativeModeSlotPacket");
@Getter
private static final List<Player> NOCLIPS = new ArrayList<>();