mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 07:22:20 +00:00
Made constant BlockPos calculateLogBaseTwo calculation explicit, enabled player events by default.
This commit is contained in:
1 parent
699182f4c0
commit
047552d9e5
7 files changed
+12
-30
No files matched your search
@@ -111,29 +111,9 @@ public class DataScript {
|
||||
script.engine.put(obs[i].toString(), ob);
|
||||
}
|
||||
|
||||
//return callScript(script);
|
||||
ScriptEngine engine = script.engine;
|
||||
engine.put("npc", dummyNpc);
|
||||
engine.put("world", dummyWorld);
|
||||
ScriptEvent result = (ScriptEvent) engine.get("event");
|
||||
if(result == null)
|
||||
engine.put("event", result = new ScriptEvent());
|
||||
engine.put("EntityType", entities);
|
||||
engine.put("RoleType", roles);
|
||||
engine.put("JobType", jobs);
|
||||
script.run(engine);
|
||||
|
||||
if(clientNeedsUpdate){
|
||||
npc.updateClient = true;
|
||||
clientNeedsUpdate = false;
|
||||
}
|
||||
if(aiNeedsUpdate){
|
||||
npc.updateAI = true;
|
||||
aiNeedsUpdate = false;
|
||||
}
|
||||
return result.isCancelled();
|
||||
return callScript(script);
|
||||
}
|
||||
/*
|
||||
|
||||
private boolean callScript(ScriptContainer script){
|
||||
ScriptEngine engine = script.engine;
|
||||
engine.put("npc", dummyNpc);
|
||||
@@ -156,7 +136,6 @@ public class DataScript {
|
||||
}
|
||||
return result.isCancelled();
|
||||
}
|
||||
*/
|
||||
|
||||
public boolean isEnabled(){
|
||||
return enabled && ScriptController.HasStart && !npc.worldObj.isRemote && !scripts.isEmpty();
|
||||
|
||||
Reference in new issue
Block a user