forked from SteamWar/SteamWar
Replace {nms} and {obc} tags
This commit is contained in:
@@ -42,16 +42,16 @@ public class BountifulWrapper9 implements BountifulWrapper.IBountifulWrapper {
|
||||
player.spigot().sendMessage(type, msg);
|
||||
}
|
||||
|
||||
private static final Class<?> dataWatcherObject = Reflection.getClass("{nms.network.syncher}.DataWatcherObject");
|
||||
private static final Class<?> dataWatcherRegistry = Reflection.getClass("{nms.network.syncher}.DataWatcherRegistry");
|
||||
private static final Class<?> dataWatcherSerializer = Reflection.getClass("{nms.network.syncher}.DataWatcherSerializer");
|
||||
private static final Class<?> dataWatcherObject = Reflection.getClass("net.minecraft.network.syncher.DataWatcherObject");
|
||||
private static final Class<?> dataWatcherRegistry = Reflection.getClass("net.minecraft.network.syncher.DataWatcherRegistry");
|
||||
private static final Class<?> dataWatcherSerializer = Reflection.getClass("net.minecraft.network.syncher.DataWatcherSerializer");
|
||||
private static final Reflection.Constructor dataWatcherObjectConstructor = Reflection.getConstructor(dataWatcherObject, int.class, dataWatcherSerializer);
|
||||
@Override
|
||||
public Object getDataWatcherObject(int index, Class<?> type) {
|
||||
return dataWatcherObjectConstructor.invoke(index, Reflection.getField(dataWatcherRegistry, dataWatcherSerializer, 0, type).get(null));
|
||||
}
|
||||
|
||||
private static final Class<?> item = Reflection.getClass("{nms.network.syncher}.DataWatcher$Item");
|
||||
private static final Class<?> item = Reflection.getClass("net.minecraft.network.syncher.DataWatcher$Item");
|
||||
private static final Reflection.Constructor itemConstructor = Reflection.getConstructor(item, dataWatcherObject, Object.class);
|
||||
@Override
|
||||
public Object getDataWatcherItem(Object dwo, Object value) {
|
||||
|
||||
@@ -25,10 +25,10 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class CraftbukkitWrapper9 implements CraftbukkitWrapper.ICraftbukkitWrapper {
|
||||
|
||||
private static final Class<?> chunk = Reflection.getClass("{nms.world.level.chunk}.Chunk");
|
||||
private static final Class<?> packetPlayOutMapChunk = Reflection.getClass("{nms.network.protocol.game}.PacketPlayOutMapChunk");
|
||||
private static final Class<?> chunk = Reflection.getClass("net.minecraft.world.level.chunk.Chunk");
|
||||
private static final Class<?> packetPlayOutMapChunk = Reflection.getClass("net.minecraft.network.protocol.game.PacketPlayOutMapChunk");
|
||||
private static final Reflection.Constructor newPacketPlayOutMapChunk = Reflection.getConstructor(packetPlayOutMapChunk, chunk, int.class);
|
||||
private static final Reflection.Method getHandle = Reflection.getMethod("{obc}.CraftChunk", "getHandle");
|
||||
private static final Reflection.Method getHandle = Reflection.getMethod("org.bukkit.craftbukkit.CraftChunk", "getHandle");
|
||||
|
||||
@Override
|
||||
public void sendChunk(Player p, int chunkX, int chunkZ) {
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ChunkHider9 extends ChunkHider8 {
|
||||
private static final Reflection.Field<List> mapChunkBlockEntities = Reflection.getField(mapChunkPacket, List.class, 0);
|
||||
private static final Reflection.Field<byte[]> mapChunkData = Reflection.getField(mapChunkPacket, byte[].class, 0);
|
||||
|
||||
private static final Class<?> nbtTagCompound = Reflection.getClass("{nms.nbt}.NBTTagCompound");
|
||||
private static final Class<?> nbtTagCompound = Reflection.getClass("net.minecraft.nbt.NBTTagCompound");
|
||||
private static final Reflection.Method nbtTagGetString = Reflection.getTypedMethod(nbtTagCompound, null, String.class, String.class);
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user