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

@@ -86,6 +86,10 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
NoppesUtilPlayer.teleportPlayer(player, x, y, z, player.dimension);
}
public void setPosition(IPos pos) {
this.setPosition(pos.getX(),pos.getY(),pos.getZ());
}
public void setPosition(double x, double y, double z, int dimensionId){
if (NpcAPI.Instance().getIWorld(dimensionId) == null)
return;
@@ -93,6 +97,10 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
NoppesUtilPlayer.teleportPlayer(player, x, y, z, dimensionId);
}
public void setPosition(IPos pos, int dimensionId) {
this.setPosition(pos.getX(),pos.getY(),pos.getZ(), dimensionId);
}
public int getHunger(){
return player.getFoodStats().getFoodLevel();
}
@@ -505,6 +513,10 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
y = ValueUtil.CorrectInt(y, 0, 256);
player.setSpawnChunk(new ChunkCoordinates(x, y, z), true);
}
public void setSpawnpoint(IPos pos){
this.setSpawnpoint(pos.getX(),pos.getY(),pos.getZ());
}
public void resetSpawnpoint(){
player.setSpawnChunk(null, false);