Class ComputeCommand
java.lang.Object
net.minecraft.server.commands.ComputeCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcomputeAsFloat(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, LootContextSources.ContextDecorator decorator, Holder<ContextFloatProvider> provider, float scale) private static intcomputeAsInt(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, LootContextSources.ContextDecorator decorator, Holder<ContextIntProvider> provider) private static voidprintExactOutput(CommandSourceStack source, Holder<?> provider, int result) private static voidprintRoundedOutput(CommandSourceStack source, Holder<?> provider, int result, float original) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) private static com.mojang.brigadier.exceptions.CommandSyntaxExceptionthrowInvalidValue(Holder<?> provider, String invalidValue)
-
Field Details
-
INVALID_NAMED_VALUE
private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType INVALID_NAMED_VALUE -
INVALID_UNNAMED_VALUE
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType INVALID_UNNAMED_VALUE
-
-
Constructor Details
-
ComputeCommand
public ComputeCommand()
-
-
Method Details
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) -
printExactOutput
-
printRoundedOutput
private static void printRoundedOutput(CommandSourceStack source, Holder<?> provider, int result, float original) -
computeAsInt
private static int computeAsInt(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, LootContextSources.ContextDecorator decorator, Holder<ContextIntProvider> provider) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
computeAsFloat
private static int computeAsFloat(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, LootContextSources.ContextDecorator decorator, Holder<ContextFloatProvider> provider, float scale) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
throwInvalidValue
-