Added several more functions to pre-existing classes:

-Spawner, Transport, Healer, Guard, Bard jobs received more functions.
-Added more functions to the transporter role.
-IRole: Added getNpc() function.
-IAnimal, IEntityLiving, and IEntityLivingBase received more functions from their MC counterparts.
-Nearly every function with that takes position/vector parameters now has an equivalent with IPos as a parameter instead.
This commit is contained in:
Luis C.M committed 2022-11-05 20:19:14 -05:00
1 parent 112e82a09d
commit e9a8f8cebc
51 files changed
+1025 -227

No files matched your search

@@ -30,7 +30,7 @@ public class ScriptBlock implements IBlock {
this.world = NpcAPI.Instance().getIWorld(world);
this.block = block;
this.pos = pos;
this.bPos = new ScriptBlockPos(pos);
this.bPos = NpcAPI.Instance().getIPos(pos);
this.tile = new ScriptTileEntity<>(world.getTileEntity(pos.getX(),pos.getY(), pos.getZ()));
}
@@ -64,13 +64,13 @@ public class ScriptBlock implements IBlock {
return this;
} else {
this.world.getMCWorld().setBlock(getX(),getY(),getZ(),block);
return NpcAPI.Instance().getIBlock(world.getMCWorld(), block, new BlockPos(getX(),getY(),getZ()));
return NpcAPI.Instance().getIBlock(world, getX(),getY(),getZ());
}
}
public IBlock setBlock(IBlock block) {
this.world.getMCWorld().setBlock(getX(),getY(),getZ(),block.getMCBlock());
return NpcAPI.Instance().getIBlock(world.getMCWorld(), block.getMCBlock(), new BlockPos(getX(),getY(),getZ()));
return NpcAPI.Instance().getIBlock(world, getX(),getY(),getZ());
}
public boolean isContainer() {