Class FunctionCommand
java.lang.Object
net.minecraft.server.commands.FunctionCommand
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DynamicCommandExceptionTypestatic final Dynamic2CommandExceptionTypeprivate static final DynamicCommandExceptionTypeprivate static final FunctionCommand.Callbacks<CommandSourceStack> static final SuggestionProvider<CommandSourceStack> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T extends ExecutionCommandSource<T>>
CommandResultCallbackdecorateOutputIfNeeded(T originalSource, FunctionCommand.Callbacks<T> callbacks, Identifier id, CommandResultCallback callback) private static CompoundTaggetArgumentTag(NbtPathArgument.NbtPath path, DataAccessor accessor) private static <T extends ExecutionCommandSource<T>>
voidinstantiateAndQueueFunctions(@Nullable CompoundTag arguments, ExecutionControl<T> output, CommandDispatcher<T> dispatcher, T noCallbackSource, CommandFunction<T> function, Identifier id, CommandResultCallback functionResultCollector, boolean returnParentFrame) static CommandSourceStackstatic <T extends ExecutionCommandSource<T>>
voidqueueFunctions(Collection<CommandFunction<T>> functions, @Nullable CompoundTag arguments, T originalSource, T functionSource, ExecutionControl<T> output, FunctionCommand.Callbacks<T> callbacks, ChainModifiers modifiers) private static <T extends ExecutionCommandSource<T>>
voidqueueFunctionsAsReturn(Collection<CommandFunction<T>> functions, @Nullable CompoundTag arguments, T originalSource, T functionSource, ExecutionControl<T> output, FunctionCommand.Callbacks<T> callbacks) private static <T extends ExecutionCommandSource<T>>
voidqueueFunctionsNoReturn(Collection<CommandFunction<T>> functions, @Nullable CompoundTag arguments, T originalSource, T functionSource, ExecutionControl<T> output, FunctionCommand.Callbacks<T> callbacks) static voidregister(CommandDispatcher<CommandSourceStack> dispatcher)
-
Field Details
-
ERROR_ARGUMENT_NOT_COMPOUND
-
ERROR_NO_FUNCTIONS
-
ERROR_FUNCTION_INSTANTATION_FAILURE
-
SUGGEST_FUNCTION
-
FULL_CONTEXT_CALLBACKS
-
-
Constructor Details
-
FunctionCommand
public FunctionCommand()
-
-
Method Details
-
register
-
getArgumentTag
private static CompoundTag getArgumentTag(NbtPathArgument.NbtPath path, DataAccessor accessor) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
modifySenderForExecution
-
queueFunctions
public static <T extends ExecutionCommandSource<T>> void queueFunctions(Collection<CommandFunction<T>> functions, @Nullable CompoundTag arguments, T originalSource, T functionSource, ExecutionControl<T> output, FunctionCommand.Callbacks<T> callbacks, ChainModifiers modifiers) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
instantiateAndQueueFunctions
private static <T extends ExecutionCommandSource<T>> void instantiateAndQueueFunctions(@Nullable CompoundTag arguments, ExecutionControl<T> output, CommandDispatcher<T> dispatcher, T noCallbackSource, CommandFunction<T> function, Identifier id, CommandResultCallback functionResultCollector, boolean returnParentFrame) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
decorateOutputIfNeeded
private static <T extends ExecutionCommandSource<T>> CommandResultCallback decorateOutputIfNeeded(T originalSource, FunctionCommand.Callbacks<T> callbacks, Identifier id, CommandResultCallback callback) -
queueFunctionsAsReturn
private static <T extends ExecutionCommandSource<T>> void queueFunctionsAsReturn(Collection<CommandFunction<T>> functions, @Nullable CompoundTag arguments, T originalSource, T functionSource, ExecutionControl<T> output, FunctionCommand.Callbacks<T> callbacks) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
queueFunctionsNoReturn
private static <T extends ExecutionCommandSource<T>> void queueFunctionsNoReturn(Collection<CommandFunction<T>> functions, @Nullable CompoundTag arguments, T originalSource, T functionSource, ExecutionControl<T> output, FunctionCommand.Callbacks<T> callbacks) throws CommandSyntaxException - Throws:
CommandSyntaxException
-