Fixed NullPointerException crash from breaking blocks that have no tile entities.

This commit is contained in:
Luis C.M committed 2022-11-06 01:23:54 -06:00
1 parent e9a8f8cebc
commit 5cb5770a20
2 files changed
+6 -4

No files matched your search

@@ -31,7 +31,7 @@ public class ScriptBlock implements IBlock {
this.block = block;
this.pos = pos;
this.bPos = NpcAPI.Instance().getIPos(pos);
this.tile = new ScriptTileEntity<>(world.getTileEntity(pos.getX(),pos.getY(), pos.getZ()));
this.tile = NpcAPI.Instance().getITileEntity(world.getTileEntity(pos.getX(),pos.getY(), pos.getZ()));
}
public IPos getPos() {