forked from SteamWar/SteamWar
Migrate reflections to mojang mapped by default
This commit is contained in:
@@ -32,7 +32,7 @@ public class ChatWrapper8 implements ChatWrapper {
|
||||
return chatComponentConstructor.invoke(text);
|
||||
}
|
||||
|
||||
private static final Class<?> metadataPacket = Reflection.getClass("net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata");
|
||||
private static final Class<?> metadataPacket = Reflection.getClass("net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket");
|
||||
private static final Reflection.Field<Integer> metadataEntity = Reflection.getField(metadataPacket, int.class, 0);
|
||||
private static final Reflection.Field<List> metadataMetadata = Reflection.getField(metadataPacket, List.class, 0);
|
||||
@Override
|
||||
|
||||
@@ -77,7 +77,7 @@ public class FlatteningWrapper8 implements FlatteningWrapper.IFlatteningWrapper
|
||||
}
|
||||
|
||||
private static final Class<?> dataWatcher = Reflection.getClass("net.minecraft.DataWatcher");
|
||||
private static final Class<?> namedSpawnPacket = Reflection.getClass("net.minecraft.network.protocol.game.PacketPlayOutNamedEntitySpawn");
|
||||
private static final Class<?> namedSpawnPacket = Reflection.getClass("net.minecraft.network.protocol.game.ClientboundAddPlayerPacket");
|
||||
private static final Reflection.Field<?> namedSpawnDataWatcher = Reflection.getField(namedSpawnPacket, dataWatcher, 0);
|
||||
private static final Class<?> entity = Reflection.getClass("net.minecraft.Entity");
|
||||
private static final Reflection.Constructor dataWatcherConstructor = Reflection.getConstructor(dataWatcher, entity);
|
||||
|
||||
@@ -57,7 +57,7 @@ public class ProtocolWrapper8 implements ProtocolWrapper {
|
||||
actions.put(PlayerInfoAction.GAMEMODE, nativeActions[1]);
|
||||
actions.put(PlayerInfoAction.REMOVE, nativeActions[4]);
|
||||
}
|
||||
private static final Class<?> iChatBaseComponent = Reflection.getClass("net.minecraft.network.chat.IChatBaseComponent");
|
||||
private static final Class<?> iChatBaseComponent = Reflection.getClass("net.minecraft.network.chat.Component");
|
||||
private static final Reflection.Constructor playerInfoDataConstructor = Reflection.getConstructor("net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo$PlayerInfoData", playerInfoPacket, GameProfile.class, int.class, enumGamemode, iChatBaseComponent);
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user