script compile time optimizations.
This commit is contained in:
1 parent
06c9aea326
commit
8d97ab26a9
27 files changed
+1071
-193
No files matched your search
@@ -796,7 +796,7 @@ public class Auxiliary {
|
||||
return Value.TRUE;
|
||||
});
|
||||
|
||||
expression.addFunction("logger", lv ->
|
||||
expression.addImpureFunction("logger", lv ->
|
||||
{
|
||||
Value res;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public class Threading
|
||||
});
|
||||
|
||||
// has to be lazy due to deferred execution of the expression
|
||||
expression.addLazyFunctionWithDelegation("task_dock", 1, (c, t, expr, tok, lv) -> {
|
||||
expression.addLazyFunctionWithDelegation("task_dock", 1, false,true, (c, t, expr, tok, lv) -> {
|
||||
CarpetContext cc = (CarpetContext)c;
|
||||
MinecraftServer server = cc.s.getMinecraftServer();
|
||||
if (server.isOnThread()) return lv.get(0); // pass through for on thread tasks
|
||||
|
||||
Reference in new issue
Block a user