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

@@ -8,6 +8,7 @@ import carpet.script.exception.ThrowStatement;
import carpet.script.exception.Throwables;
import carpet.script.language.Sys;
import carpet.script.value.BlockValue;
import carpet.script.value.BooleanValue;
import carpet.script.value.EntityValue;
import carpet.script.value.FormattedTextValue;
import carpet.script.value.ListValue;
@@ -1023,7 +1024,7 @@ public class ShapeDispatcher
@Override
public Value decode(Tag tag)
{
return new NumericValue(((ByteTag) tag).getByte() > 0);
return BooleanValue.of(((ByteTag) tag).getByte() > 0);
}
}
public static class FloatParam extends NumericParam