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

+4 -3
View File
@@ -23,6 +23,7 @@ import noppes.npcs.scripted.ScriptWorld;
import noppes.npcs.scripted.constants.EntityType;
import noppes.npcs.scripted.constants.JobType;
import noppes.npcs.scripted.constants.RoleType;
import noppes.npcs.scripted.interfaces.ICustomNpc;
import noppes.npcs.scripted.interfaces.IWorld;
import noppes.npcs.scripted.wrapper.WrapperNpcAPI;
@@ -36,7 +37,7 @@ public class DataScript implements IScriptHandler {
private EntityNPCInterface npc;
public boolean enabled = false;
public ScriptNpc dummyNpc;
public ICustomNpc dummyNpc;
public IWorld dummyWorld;
public boolean clientNeedsUpdate = false;
public boolean aiNeedsUpdate = false;
@@ -48,8 +49,8 @@ public class DataScript implements IScriptHandler {
}
this.npc = npc;
if(npc instanceof EntityCustomNpc)
dummyNpc = new ScriptNpc((EntityCustomNpc) npc);
dummyNpc = new ScriptNpc<>(npc);
if(npc.worldObj instanceof WorldServer)
dummyWorld = NpcAPI.Instance().getIWorld((WorldServer) npc.worldObj);//new ScriptWorld((WorldServer) npc.worldObj);
}