mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 06:25:11 +00:00
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:
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)
|
||||
|
||||
Reference in new issue
Block a user