Merge branch 'master' into 1.16
This commit is contained in:
commit
9512eb7af5
2 files changed
+2
-2
No files matched your search
@@ -2812,7 +2812,7 @@ public class CarpetExpression
|
|||||||
this.expr.addLazyFunction("task_dock", 1, (c, t, lv) -> {
|
this.expr.addLazyFunction("task_dock", 1, (c, t, lv) -> {
|
||||||
CarpetContext cc = (CarpetContext)c;
|
CarpetContext cc = (CarpetContext)c;
|
||||||
MinecraftServer server = cc.s.getMinecraftServer();
|
MinecraftServer server = cc.s.getMinecraftServer();
|
||||||
if (server.isOnThread()) return lv.get(1); // pass through for on thread tasks
|
if (server.isOnThread()) return lv.get(0); // pass through for on thread tasks
|
||||||
Value[] result = new Value[]{Value.NULL};
|
Value[] result = new Value[]{Value.NULL};
|
||||||
((CarpetContext) c).s.getMinecraftServer().submitAndJoin(() -> result[0] = lv.get(0).evalValue(c, t));
|
((CarpetContext) c).s.getMinecraftServer().submitAndJoin(() -> result[0] = lv.get(0).evalValue(c, t));
|
||||||
Value ret = result[0]; // preventing from lazy evaluating of the result in case a future completes later
|
Value ret = result[0]; // preventing from lazy evaluating of the result in case a future completes later
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public abstract class LazyListValue extends AbstractListValue implements Iterato
|
|||||||
@Override
|
@Override
|
||||||
public String getString()
|
public String getString()
|
||||||
{
|
{
|
||||||
return String.format(Locale.ROOT, "[%d, %d, ..., %d]",start, start+stepp, limit);
|
return String.format(Locale.ROOT, "[%d, %d, ..., %d)",start, start+stepp, limit);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user