9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-19 06:59:24 +00:00

fix tile entity serialization on paper 1.21.6+ servers

This commit is contained in:
Julian Krings
2025-11-29 11:13:30 +01:00
parent d3c8377a12
commit dd8e487a3b
2 changed files with 6 additions and 6 deletions

View File

@@ -168,13 +168,13 @@ public class NMSBinding implements INMSBinding {
@Override
public boolean hasTile(Location l) {
return ((CraftWorld) l.getWorld()).getHandle().getBlockEntity(new BlockPos(l.getBlockX(), l.getBlockY(), l.getBlockZ()), false) != null;
return ((CraftWorld) l.getWorld()).getHandle().getBlockEntity(new BlockPos(l.getBlockX(), l.getBlockY(), l.getBlockZ())) != null;
}
@Override
@SuppressWarnings("unchecked")
public KMap<String, Object> serializeTile(Location location) {
BlockEntity e = ((CraftWorld) location.getWorld()).getHandle().getBlockEntity(new BlockPos(location.getBlockX(), location.getBlockY(), location.getBlockZ()), false);
BlockEntity e = ((CraftWorld) location.getWorld()).getHandle().getBlockEntity(new BlockPos(location.getBlockX(), location.getBlockY(), location.getBlockZ()));
if (e == null) {
return null;
@@ -856,4 +856,4 @@ public class NMSBinding implements INMSBinding {
}
}
}
}
}

View File

@@ -170,13 +170,13 @@ public class NMSBinding implements INMSBinding {
@Override
public boolean hasTile(Location l) {
return ((CraftWorld) l.getWorld()).getHandle().getBlockEntity(new BlockPos(l.getBlockX(), l.getBlockY(), l.getBlockZ()), false) != null;
return ((CraftWorld) l.getWorld()).getHandle().getBlockEntity(new BlockPos(l.getBlockX(), l.getBlockY(), l.getBlockZ())) != null;
}
@Override
@SuppressWarnings("unchecked")
public KMap<String, Object> serializeTile(Location location) {
BlockEntity e = ((CraftWorld) location.getWorld()).getHandle().getBlockEntity(new BlockPos(location.getBlockX(), location.getBlockY(), location.getBlockZ()), false);
BlockEntity e = ((CraftWorld) location.getWorld()).getHandle().getBlockEntity(new BlockPos(location.getBlockX(), location.getBlockY(), location.getBlockZ()));
if (e == null) {
return null;
@@ -855,4 +855,4 @@ public class NMSBinding implements INMSBinding {
}
}
}
}
}