mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 15:45:10 +00:00
ScriptWorld:
-Added functions from patch
This commit is contained in:
1 parent
f6b9f2c973
commit
dd7714350d
7 files changed
+12
-36
No files matched your search
@@ -73,18 +73,11 @@ public class DataScript implements IScriptHandler {
|
||||
}
|
||||
}
|
||||
|
||||
for (ScriptContainer container : this.scripts.values()) {
|
||||
container.setEngine(this.getLanguage());
|
||||
}
|
||||
|
||||
enabled = compound.getBoolean("ScriptEnabled");
|
||||
}
|
||||
|
||||
public void readEventsFromNBT(NBTTagCompound compound) {
|
||||
eventScripts = NBTTags.GetScript(compound,this);
|
||||
for (ScriptContainer container : this.eventScripts) {
|
||||
container.setEngine(this.getLanguage());
|
||||
}
|
||||
}
|
||||
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound compound) {
|
||||
@@ -157,8 +150,11 @@ public class DataScript implements IScriptHandler {
|
||||
ScriptContainer script = scripts.get(type);
|
||||
if(script == null || script.errored || !script.hasCode())
|
||||
return false;
|
||||
|
||||
script.setEngine(this.getLanguage());
|
||||
if(script.engine == null)
|
||||
return false;
|
||||
|
||||
for(int i = 0; i + 1 < obs.length; i += 2){
|
||||
Object ob = obs[i + 1];
|
||||
if(ob instanceof Entity)
|
||||
|
||||
Reference in new issue
Block a user