Replace {nms} and {obc} tags

This commit is contained in:
Lixfel
2025-01-06 10:15:48 +01:00
parent ab34d86da4
commit da148c0e9f
60 changed files with 182 additions and 182 deletions
@@ -27,7 +27,7 @@ import java.util.*;
public class BlockIdWrapper18 extends BlockIdWrapper14 {
private static final Reflection.Field<Map> hiddenEntities = Reflection.getField(Reflection.getClass("{obc}.entity.CraftPlayer"), Map.class, 0, UUID.class, Set.class);
private static final Reflection.Field<Map> hiddenEntities = Reflection.getField(Reflection.getClass("org.bukkit.craftbukkit.entity.CraftPlayer"), Map.class, 0, UUID.class, Set.class);
@Override
public void trackEntity(Player player, Entity entity) {
hiddenEntities.get(player).remove(entity.getUniqueId());
@@ -33,7 +33,7 @@ import java.util.stream.StreamSupport;
public class CraftbukkitWrapper18 implements CraftbukkitWrapper {
private static final Reflection.Method getWorld = Reflection.getMethod(Reflection.getClass("{obc}.CraftWorld"), "getHandle");
private static final Reflection.Method getWorld = Reflection.getMethod(Reflection.getClass("org.bukkit.craftbukkit.CraftWorld"), "getHandle");
private static final Reflection.Method getChunk = Reflection.getTypedMethod(net.minecraft.world.level.World.class, null, Chunk.class, int.class, int.class);
private static final Reflection.Method getChunkSections = Reflection.getTypedMethod(Chunk.class, null, ChunkSection[].class);
private ChunkSection[] getChunkSections(World world, int x, int z) {
@@ -46,7 +46,7 @@ public class CraftbukkitWrapper18 implements CraftbukkitWrapper {
System.arraycopy(getChunkSections(backup, x, z), 0, sections, 0, sections.length);
}
private static final Reflection.Method getEntity = Reflection.getTypedMethod(Reflection.getClass("{obc}.entity.CraftEntity"), "getHandle", net.minecraft.world.entity.Entity.class);
private static final Reflection.Method getEntity = Reflection.getTypedMethod(Reflection.getClass("org.bukkit.craftbukkit.entity.CraftEntity"), "getHandle", net.minecraft.world.entity.Entity.class);
protected net.minecraft.world.entity.Entity getEntity(Entity e) {
return (net.minecraft.world.entity.Entity) getEntity.invoke(e);
}
@@ -33,7 +33,7 @@ import java.util.List;
public class HullHiderWrapper18 implements HullHiderWrapper {
private static final Reflection.Method getState = Reflection.getTypedMethod(Reflection.getClass("{obc}.block.data.CraftBlockData"), "getState", IBlockData.class);
private static final Reflection.Method getState = Reflection.getTypedMethod(Reflection.getClass("org.bukkit.craftbukkit.block.data.CraftBlockData"), "getState", IBlockData.class);
@Override
public Object generateBlockChangePacket(List<Hull.IntVector> changes) {
Object[] blockdata = new Object[changes.size()];