Package net.minecraft.server.commands
Class FunctionCommand
java.lang.Object
net.minecraft.server.commands.FunctionCommand
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
(package private) static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
(package private) static final FunctionCommand.Callbacks
<CommandSourceStack> static final com.mojang.brigadier.suggestion.SuggestionProvider
<CommandSourceStack> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T extends ExecutionCommandSource<T>>
CommandResultCallbackdecorateOutputIfNeeded
(T source, FunctionCommand.Callbacks<T> callbacks, ResourceLocation function, CommandResultCallback resultCallback) (package private) static CompoundTag
getArgumentTag
(NbtPathArgument.NbtPath nbtPath, DataAccessor dataAccessor) private static <T extends ExecutionCommandSource<T>>
voidinstantiateAndQueueFunctions
(CompoundTag arguments, ExecutionControl<T> executionControl, com.mojang.brigadier.CommandDispatcher<T> dispatcher, T source, CommandFunction<T> function, ResourceLocation functionId, CommandResultCallback resultCallback, boolean returnParentFrame) static CommandSourceStack
static <T extends ExecutionCommandSource<T>>
voidqueueFunctions
(Collection<CommandFunction<T>> functions, CompoundTag arguments, T originalSource, T source, ExecutionControl<T> executionControl, FunctionCommand.Callbacks<T> callbacks, ChainModifiers chainModifiers) private static <T extends ExecutionCommandSource<T>>
voidqueueFunctionsAsReturn
(Collection<CommandFunction<T>> functions, CompoundTag arguments, T originalSource, T source, ExecutionControl<T> exectutionControl, FunctionCommand.Callbacks<T> callbacks) private static <T extends ExecutionCommandSource<T>>
voidqueueFunctionsNoReturn
(Collection<CommandFunction<T>> functions, CompoundTag arguments, T originalSource, T source, ExecutionControl<T> executionControl, FunctionCommand.Callbacks<T> callbacks) static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher)
-
Field Details
-
ERROR_ARGUMENT_NOT_COMPOUND
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_ARGUMENT_NOT_COMPOUND -
ERROR_NO_FUNCTIONS
static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_NO_FUNCTIONS -
ERROR_FUNCTION_INSTANTATION_FAILURE
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_FUNCTION_INSTANTATION_FAILURE -
SUGGEST_FUNCTION
public static final com.mojang.brigadier.suggestion.SuggestionProvider<CommandSourceStack> SUGGEST_FUNCTION -
FULL_CONTEXT_CALLBACKS
-
-
Constructor Details
-
FunctionCommand
public FunctionCommand()
-
-
Method Details
-
register
-
getArgumentTag
static CompoundTag getArgumentTag(NbtPathArgument.NbtPath nbtPath, DataAccessor dataAccessor) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
modifySenderForExecution
-
queueFunctions
public static <T extends ExecutionCommandSource<T>> void queueFunctions(Collection<CommandFunction<T>> functions, @Nullable CompoundTag arguments, T originalSource, T source, ExecutionControl<T> executionControl, FunctionCommand.Callbacks<T> callbacks, ChainModifiers chainModifiers) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
instantiateAndQueueFunctions
private static <T extends ExecutionCommandSource<T>> void instantiateAndQueueFunctions(@Nullable CompoundTag arguments, ExecutionControl<T> executionControl, com.mojang.brigadier.CommandDispatcher<T> dispatcher, T source, CommandFunction<T> function, ResourceLocation functionId, CommandResultCallback resultCallback, boolean returnParentFrame) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
decorateOutputIfNeeded
private static <T extends ExecutionCommandSource<T>> CommandResultCallback decorateOutputIfNeeded(T source, FunctionCommand.Callbacks<T> callbacks, ResourceLocation function, CommandResultCallback resultCallback) -
queueFunctionsAsReturn
private static <T extends ExecutionCommandSource<T>> void queueFunctionsAsReturn(Collection<CommandFunction<T>> functions, @Nullable CompoundTag arguments, T originalSource, T source, ExecutionControl<T> exectutionControl, FunctionCommand.Callbacks<T> callbacks) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
queueFunctionsNoReturn
private static <T extends ExecutionCommandSource<T>> void queueFunctionsNoReturn(Collection<CommandFunction<T>> functions, @Nullable CompoundTag arguments, T originalSource, T source, ExecutionControl<T> executionControl, FunctionCommand.Callbacks<T> callbacks) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-