Package net.minecraft.command.impl.data
Class DataCommand
- java.lang.Object
-
- net.minecraft.command.impl.data.DataCommand
-
public class DataCommand extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DataCommand.IDataProvider
(package private) static interface
DataCommand.IModificationSourceArgumentBuilder
(package private) static interface
DataCommand.IModificationType
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<java.util.function.Function<java.lang.String,DataCommand.IDataProvider>>
ALL_PROVIDERS
private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
ERROR_EXPECTED_LIST
private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
ERROR_EXPECTED_OBJECT
private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
ERROR_GET_NON_EXISTENT
private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
ERROR_GET_NOT_NUMBER
private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
ERROR_INVALID_INDEX
private static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
ERROR_MERGE_UNCHANGED
private static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
ERROR_MULTIPLE_TAGS
static java.util.List<DataCommand.IDataProvider>
SOURCE_PROVIDERS
static java.util.List<DataCommand.IDataProvider>
TARGET_PROVIDERS
-
Constructor Summary
Constructors Constructor Description DataCommand()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSource,?>
decorateModification(java.util.function.BiConsumer<com.mojang.brigadier.builder.ArgumentBuilder<CommandSource,?>,DataCommand.IModificationSourceArgumentBuilder> p_218935_0_)
private static int
getData(CommandSource p_198947_0_, IDataAccessor p_198947_1_)
private static int
getData(CommandSource p_201228_0_, IDataAccessor p_201228_1_, NBTPathArgument.NBTPath p_201228_2_)
private static int
getNumeric(CommandSource p_198938_0_, IDataAccessor p_198938_1_, NBTPathArgument.NBTPath p_198938_2_, double p_198938_3_)
private static INBT
getSingleTag(NBTPathArgument.NBTPath p_218928_0_, IDataAccessor p_218928_1_)
private static int
insertAtIndex(int p_218944_0_, CompoundNBT p_218944_1_, NBTPathArgument.NBTPath p_218944_2_, java.util.List<INBT> p_218944_3_)
private static int
manipulateData(com.mojang.brigadier.context.CommandContext<CommandSource> p_218933_0_, DataCommand.IDataProvider p_218933_1_, DataCommand.IModificationType p_218933_2_, java.util.List<INBT> p_218933_3_)
private static int
mergeData(CommandSource p_198946_0_, IDataAccessor p_198946_1_, CompoundNBT p_198946_2_)
static void
register(com.mojang.brigadier.CommandDispatcher<CommandSource> p_198937_0_)
private static int
removeData(CommandSource p_198942_0_, IDataAccessor p_198942_1_, NBTPathArgument.NBTPath p_198942_2_)
-
-
-
Field Detail
-
ERROR_MERGE_UNCHANGED
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_MERGE_UNCHANGED
-
ERROR_GET_NOT_NUMBER
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_GET_NOT_NUMBER
-
ERROR_GET_NON_EXISTENT
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_GET_NON_EXISTENT
-
ERROR_MULTIPLE_TAGS
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_MULTIPLE_TAGS
-
ERROR_EXPECTED_LIST
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_EXPECTED_LIST
-
ERROR_EXPECTED_OBJECT
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_EXPECTED_OBJECT
-
ERROR_INVALID_INDEX
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_INDEX
-
ALL_PROVIDERS
public static final java.util.List<java.util.function.Function<java.lang.String,DataCommand.IDataProvider>> ALL_PROVIDERS
-
TARGET_PROVIDERS
public static final java.util.List<DataCommand.IDataProvider> TARGET_PROVIDERS
-
SOURCE_PROVIDERS
public static final java.util.List<DataCommand.IDataProvider> SOURCE_PROVIDERS
-
-
Method Detail
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSource> p_198937_0_)
-
insertAtIndex
private static int insertAtIndex(int p_218944_0_, CompoundNBT p_218944_1_, NBTPathArgument.NBTPath p_218944_2_, java.util.List<INBT> p_218944_3_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
decorateModification
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSource,?> decorateModification(java.util.function.BiConsumer<com.mojang.brigadier.builder.ArgumentBuilder<CommandSource,?>,DataCommand.IModificationSourceArgumentBuilder> p_218935_0_)
-
manipulateData
private static int manipulateData(com.mojang.brigadier.context.CommandContext<CommandSource> p_218933_0_, DataCommand.IDataProvider p_218933_1_, DataCommand.IModificationType p_218933_2_, java.util.List<INBT> p_218933_3_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
removeData
private static int removeData(CommandSource p_198942_0_, IDataAccessor p_198942_1_, NBTPathArgument.NBTPath p_198942_2_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getSingleTag
private static INBT getSingleTag(NBTPathArgument.NBTPath p_218928_0_, IDataAccessor p_218928_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getData
private static int getData(CommandSource p_201228_0_, IDataAccessor p_201228_1_, NBTPathArgument.NBTPath p_201228_2_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getNumeric
private static int getNumeric(CommandSource p_198938_0_, IDataAccessor p_198938_1_, NBTPathArgument.NBTPath p_198938_2_, double p_198938_3_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getData
private static int getData(CommandSource p_198947_0_, IDataAccessor p_198947_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
mergeData
private static int mergeData(CommandSource p_198946_0_, IDataAccessor p_198946_1_, CompoundNBT p_198946_2_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
-