Class DataCommands
java.lang.Object
net.minecraft.server.commands.data.DataCommands
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interfaceprivate static interfacestatic interfaceprivate static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<Function<String, DataCommands.DataProvider>> private static final DynamicCommandExceptionTypeprivate static final DynamicCommandExceptionTypeprivate static final DynamicCommandExceptionTypeprivate static final DynamicCommandExceptionTypeprivate static final Dynamic2CommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypestatic final List<DataCommands.DataProvider> static final List<DataCommands.DataProvider> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ArgumentBuilder<CommandSourceStack, ?> decorateModification(BiConsumer<ArgumentBuilder<CommandSourceStack, ?>, DataCommands.DataManipulatorDecorator> nodeSupplier) private static Stringprivate static intgetData(CommandSourceStack source, DataAccessor accessor) private static intgetData(CommandSourceStack source, DataAccessor accessor, NbtPathArgument.NbtPath path) private static intgetNumeric(CommandSourceStack source, DataAccessor accessor, NbtPathArgument.NbtPath path, double scale) private static intgetOffset(int index, int length) static TaggetSingleTag(NbtPathArgument.NbtPath path, DataAccessor accessor) getSingletonSource(CommandContext<CommandSourceStack> context, DataCommands.DataProvider sourceProvider) private static intmanipulateData(CommandContext<CommandSourceStack> context, DataCommands.DataProvider targetProvider, DataCommands.DataManipulator manipulator, List<Tag> source) private static intmergeData(CommandSourceStack source, DataAccessor accessor, CompoundTag nbt) static voidregister(CommandDispatcher<CommandSourceStack> dispatcher) private static intremoveData(CommandSourceStack source, DataAccessor accessor, NbtPathArgument.NbtPath path) resolveSourcePath(CommandContext<CommandSourceStack> context, DataCommands.DataProvider sourceProvider) stringifyTagList(List<Tag> source, DataCommands.StringProcessor stringProcessor) private static Stringprivate static Stringprivate static StringvalidatedSubstring(String input, int start, int end)
-
Field Details
-
ERROR_MERGE_UNCHANGED
-
ERROR_GET_NOT_NUMBER
-
ERROR_GET_NON_EXISTENT
-
ERROR_MULTIPLE_TAGS
-
ERROR_EXPECTED_OBJECT
-
ERROR_EXPECTED_VALUE
-
ERROR_INVALID_SUBSTRING
-
ALL_PROVIDERS
-
TARGET_PROVIDERS
-
SOURCE_PROVIDERS
-
-
Constructor Details
-
DataCommands
public DataCommands()
-
-
Method Details
-
register
-
getAsText
- Throws:
CommandSyntaxException
-
stringifyTagList
private static List<Tag> stringifyTagList(List<Tag> source, DataCommands.StringProcessor stringProcessor) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
decorateModification
private static ArgumentBuilder<CommandSourceStack, ?> decorateModification(BiConsumer<ArgumentBuilder<CommandSourceStack, ?>, DataCommands.DataManipulatorDecorator> nodeSupplier) -
validatedSubstring
private static String validatedSubstring(String input, int start, int end) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
substring
- Throws:
CommandSyntaxException
-
substring
- Throws:
CommandSyntaxException
-
getOffset
private static int getOffset(int index, int length) -
getSingletonSource
private static List<Tag> getSingletonSource(CommandContext<CommandSourceStack> context, DataCommands.DataProvider sourceProvider) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
resolveSourcePath
private static List<Tag> resolveSourcePath(CommandContext<CommandSourceStack> context, DataCommands.DataProvider sourceProvider) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
manipulateData
private static int manipulateData(CommandContext<CommandSourceStack> context, DataCommands.DataProvider targetProvider, DataCommands.DataManipulator manipulator, List<Tag> source) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
removeData
private static int removeData(CommandSourceStack source, DataAccessor accessor, NbtPathArgument.NbtPath path) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
getSingleTag
public static Tag getSingleTag(NbtPathArgument.NbtPath path, DataAccessor accessor) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
getData
private static int getData(CommandSourceStack source, DataAccessor accessor, NbtPathArgument.NbtPath path) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
getNumeric
private static int getNumeric(CommandSourceStack source, DataAccessor accessor, NbtPathArgument.NbtPath path, double scale) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
getData
private static int getData(CommandSourceStack source, DataAccessor accessor) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
mergeData
private static int mergeData(CommandSourceStack source, DataAccessor accessor, CompoundTag nbt) throws CommandSyntaxException - Throws:
CommandSyntaxException
-