Fixed getFormLevel not working when player form NBT is "pty". ScriptBlock now correctly sets its tile field, allowing players to access blocks as chests, crates, etc.

This commit is contained in:
luisc committed 2021-12-26 21:08:35 -06:00
1 parent e5edbe002e
commit e676c808e3
2 files changed
+6 -1

No files matched your search

@@ -30,6 +30,11 @@ public class ScriptBlock implements IBlock {
this.block = block;
this.pos = pos;
this.bPos = new ScriptBlockPos(pos);
this.setTile(world.getTileEntity(pos.getX(),pos.getY(), pos.getZ()));
}
protected void setTile(TileEntity tile) {
this.tile = tile;
}
public IPos getPos() {