Deprecate old boolean constructor and move existing usages

This commit is contained in:
altrisi committed 2021-05-24 11:41:24 +02:00
1 parent 1b39feaab7
commit 9d9844fd5d
14 files changed
+59 -47

No files matched your search

@@ -452,7 +452,7 @@ public class Auxiliary {
if (lv.get(0).isNull()) return Value.FALSE;
Tag source = ((NBTSerializableValue)(NBTSerializableValue.fromValue(lv.get(0)))).getTag();
Tag match = ((NBTSerializableValue)(NBTSerializableValue.fromValue(lv.get(1)))).getTag();
return new NumericValue(NbtHelper.matches(match, source, numParam == 2 || lv.get(2).getBoolean()));
return BooleanValue.of(NbtHelper.matches(match, source, numParam == 2 || lv.get(2).getBoolean()));
});
expression.addFunction("encode_nbt", lv -> {
@@ -776,7 +776,7 @@ public class Auxiliary {
return;
if (what.equalsIgnoreCase("boulder")) // there might be more of those
WorldTools.forceChunkUpdate(locator.block.getPos(), ((CarpetContext) c).s.getWorld());
result[0] = new NumericValue(res);
result[0] = BooleanValue.of(res);
});
return result[0];
});