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

@@ -691,8 +691,8 @@ public class NoppesUtilServer {
return entity;
}
public static Entity spawnClone(NBTTagCompound compound, int x, int y,
int z, World worldObj) {
public static Entity getEntityFromNBT(NBTTagCompound compound, int x, int y,
int z, World worldObj) {
ServerCloneController.Instance.cleanTags(compound);
compound.setTag("Pos", NBTTags.nbtDoubleList(x + 0.5, y + 1, z + 0.5));
Entity entity = EntityList.createEntityFromNBT(compound, worldObj);
@@ -705,6 +705,15 @@ public class NoppesUtilServer {
npc.ticksExisted = 0;
npc.totalTicksAlive = 0;
}
return entity;
}
public static Entity spawnClone(NBTTagCompound compound, int x, int y,
int z, World worldObj) {
Entity entity = NoppesUtilServer.getEntityFromNBT(compound,x,y,z,worldObj);
if(entity == null){
return null;
}
worldObj.spawnEntityInWorld(entity);
return entity;
}