Separate ScriptHost from CarpetScriptHost

This commit is contained in:
gnembon committed 2019-11-19 01:31:56 -04:00
1 parent bd61340e46
commit 9e529fe967
5 files changed
+290 -256

No files matched your search

@@ -3048,7 +3048,7 @@ public class CarpetExpression
throw new InternalExpressionException("Cannot use "+file+" as resource name - must have some letters and numbers");
}
}
Tag state = ((CarpetContext)c).host.getGlobalState(file);
Tag state = ((CarpetScriptHost)((CarpetContext)c).host).getGlobalState(file);
if (state == null)
return (cc, tt) -> Value.NULL;
Value retVal = new NBTSerializableValue(state);
@@ -3074,7 +3074,7 @@ public class CarpetExpression
? (NBTSerializableValue) val
: new NBTSerializableValue(val.getString());
Tag tag = tagValue.getTag();
((CarpetContext)c).host.setGlobalState(tag, file);
((CarpetScriptHost)((CarpetContext)c).host).setGlobalState(tag, file);
return (cc, tt) -> Value.NULL;
});
}