Move and rename Reflection fields

This commit is contained in:
Lixfel
2024-12-26 19:11:01 +01:00
parent bd87221198
commit 0f73939bf0
80 changed files with 547 additions and 805 deletions
@@ -19,7 +19,7 @@
package de.steamwar.bausystem.utils;
import com.comphenix.tinyprotocol.Reflection;
import de.steamwar.Reflection;
import de.steamwar.bausystem.features.util.NoClipCommand;
import net.minecraft.core.component.DataComponents;
import net.minecraft.nbt.NBTBase;
@@ -45,7 +45,7 @@ import java.util.Optional;
public class NMSWrapper21 implements NMSWrapper {
private static final Reflection.FieldAccessor<PlayerInteractManager> playerInteractManager = Reflection.getField(EntityPlayer.class, null, PlayerInteractManager.class);
private static final Reflection.Field<PlayerInteractManager> playerInteractManager = Reflection.getField(EntityPlayer.class, null, PlayerInteractManager.class);
@Override
public void setInternalGameMode(Player player, GameMode gameMode) {
@@ -68,14 +68,14 @@ public class NMSWrapper21 implements NMSWrapper {
player.updateInventory();
}
private static final Reflection.FieldAccessor<PacketPlayOutGameStateChange.a> gameStateChangeReason = Reflection.getField(NoClipCommand.gameStateChange, PacketPlayOutGameStateChange.a.class, 12);
private static final Reflection.Field<PacketPlayOutGameStateChange.a> gameStateChangeReason = Reflection.getField(NoClipCommand.gameStateChange, PacketPlayOutGameStateChange.a.class, 12);
@Override
public void setGameStateChangeReason(Object packet) {
gameStateChangeReason.set(packet, PacketPlayOutGameStateChange.d);
}
private static final Reflection.FieldAccessor<PlayerAbilities> playerAbilities = Reflection.getField(EntityHuman.class, null, PlayerAbilities.class);
private static final Reflection.Field<PlayerAbilities> playerAbilities = Reflection.getField(EntityHuman.class, null, PlayerAbilities.class);
@Override
public void setPlayerBuildAbilities(Player player) {