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

@@ -6,6 +6,7 @@ import carpet.script.CarpetScriptHost;
import carpet.script.argument.FunctionArgument;
import carpet.script.exception.InternalExpressionException;
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;
@@ -114,7 +115,7 @@ public abstract class CommandArgument
new StringArgument(),
// vanilla arguments as per https://minecraft.gamepedia.com/Argument_types
new VanillaUnconfigurableArgument( "bool", BoolArgumentType::bool,
(c, p) -> new NumericValue(BoolArgumentType.getBool(c, p)), false
(c, p) -> BooleanValue.of(BoolArgumentType.getBool(c, p)), false
),
new FloatArgument(),
new IntArgument(),