Added get/setRotationType to ScriptNpc. Added get/setMotion for x, y, z components to ScriptEntity. Fixed an NPC wand crash.

This commit is contained in:
luisc committed 2021-12-29 16:22:05 -06:00
1 parent e676c808e3
commit e6f97784ff
6 files changed
+68 -27

No files matched your search

@@ -59,17 +59,10 @@ public class WrapperNpcAPI extends NpcAPI {
}
public IEntity getIEntity(Entity entity) {
/*
if (entity != null && !entity.worldObj.isRemote) {
return (entity instanceof EntityNPCInterface ? ((EntityNPCInterface)entity).wrappedNPC : entity instanceof EntityPlayerMP ? getIPlayer((EntityPlayerMP) entity) : WrapperEntityData.get(entity));
} else {
return null;
}
*/
if(entity == null)
return null;
if(entity instanceof EntityNPCInterface)
return ((EntityNPCInterface) entity).script.dummyNpc;
return ((EntityNPCInterface)entity).wrappedNPC;
else{
ScriptEntityData data = (ScriptEntityData) entity.getExtendedProperties("ScriptedObject");
if(data != null)