Added ScriptBlock and ScriptNbt support to scripting API

This commit is contained in:
luisc committed 2021-10-12 03:23:56 -05:00
1 parent 6752f8baec
commit 699182f4c0
9 files changed
+339 -4

No files matched your search

@@ -63,6 +63,10 @@ public class WrapperNpcAPI extends NpcAPI {
return new ScriptBlock(world, world.getBlock(pos.getX(),pos.getY(),pos.getZ()), pos);
}
public INbt getINbt(NBTTagCompound compound) {
return compound == null?new ScriptNbt(new NBTTagCompound()):new ScriptNbt(compound);
}
public ICustomNpc createNPC(World world) {
if (world.isRemote) {
return null;