Package net.minecraft.server.commands
Class ItemCommands
java.lang.Object
net.minecraft.server.commands.ItemCommands
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType(package private) static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType(package private) static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType(package private) static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionTypeprivate static final com.mojang.brigadier.suggestion.SuggestionProvider<CommandSourceStack> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ItemStackapplyModifier(CommandSourceStack pSource, Holder<LootItemFunction> pModifier, ItemStack pStack) private static intblockToBlock(CommandSourceStack pSource, BlockPos pSourcePos, int pSourceSlot, BlockPos pPos, int pSlot) private static intblockToBlock(CommandSourceStack pSource, BlockPos pSourcePos, int pSourceSlot, BlockPos pPos, int pSlot, Holder<LootItemFunction> pModifier) private static intblockToEntities(CommandSourceStack pSource, BlockPos pPos, int pSourceSlot, Collection<? extends Entity> pTargets, int pSlot) private static intblockToEntities(CommandSourceStack pSource, BlockPos pPos, int pSourceSlot, Collection<? extends Entity> pTargets, int pSlot, Holder<LootItemFunction> pModifier) private static intentityToBlock(CommandSourceStack pSource, Entity pSourceEntity, int pSourceSlot, BlockPos pPos, int pSlot) private static intentityToBlock(CommandSourceStack pSource, Entity pSourceEntity, int pSourceSlot, BlockPos pPos, int pSlot, Holder<LootItemFunction> pModifier) private static intentityToEntities(CommandSourceStack pSource, Entity pSourceEntity, int pSourceSlot, Collection<? extends Entity> pTargets, int pSlot) private static intentityToEntities(CommandSourceStack pSource, Entity pSourceEntity, int pSourceSlot, Collection<? extends Entity> pTargets, int pSlot, Holder<LootItemFunction> pModifier) private static ItemStackgetBlockItem(CommandSourceStack pSource, BlockPos pPos, int pSlot) (package private) static ContainergetContainer(CommandSourceStack pSource, BlockPos pPos, com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType pException) private static ItemStackgetEntityItem(Entity pEntity, int pSlot) private static intmodifyBlockItem(CommandSourceStack pSource, BlockPos pPos, int pSlot, Holder<LootItemFunction> pModifier) private static intmodifyEntityItem(CommandSourceStack pSource, Collection<? extends Entity> pTargets, int pSourceSlot, Holder<LootItemFunction> pModifer) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> pDispatcher, CommandBuildContext pContext) private static intsetBlockItem(CommandSourceStack pSource, BlockPos pPos, int pSlot, ItemStack pItem) private static intsetEntityItem(CommandSourceStack pSource, Collection<? extends Entity> pTargets, int pSlot, ItemStack pItem)
-
Field Details
-
ERROR_TARGET_NOT_A_CONTAINER
static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType ERROR_TARGET_NOT_A_CONTAINER -
ERROR_SOURCE_NOT_A_CONTAINER
static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType ERROR_SOURCE_NOT_A_CONTAINER -
ERROR_TARGET_INAPPLICABLE_SLOT
static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_TARGET_INAPPLICABLE_SLOT -
ERROR_SOURCE_INAPPLICABLE_SLOT
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_SOURCE_INAPPLICABLE_SLOT -
ERROR_TARGET_NO_CHANGES
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_TARGET_NO_CHANGES -
ERROR_TARGET_NO_CHANGES_KNOWN_ITEM
private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_TARGET_NO_CHANGES_KNOWN_ITEM -
SUGGEST_MODIFIER
private static final com.mojang.brigadier.suggestion.SuggestionProvider<CommandSourceStack> SUGGEST_MODIFIER
-
-
Constructor Details
-
ItemCommands
public ItemCommands()
-
-
Method Details
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> pDispatcher, CommandBuildContext pContext) -
modifyBlockItem
private static int modifyBlockItem(CommandSourceStack pSource, BlockPos pPos, int pSlot, Holder<LootItemFunction> pModifier) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
modifyEntityItem
private static int modifyEntityItem(CommandSourceStack pSource, Collection<? extends Entity> pTargets, int pSourceSlot, Holder<LootItemFunction> pModifer) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setBlockItem
private static int setBlockItem(CommandSourceStack pSource, BlockPos pPos, int pSlot, ItemStack pItem) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getContainer
static Container getContainer(CommandSourceStack pSource, BlockPos pPos, com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType pException) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setEntityItem
private static int setEntityItem(CommandSourceStack pSource, Collection<? extends Entity> pTargets, int pSlot, ItemStack pItem) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
blockToEntities
private static int blockToEntities(CommandSourceStack pSource, BlockPos pPos, int pSourceSlot, Collection<? extends Entity> pTargets, int pSlot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
blockToEntities
private static int blockToEntities(CommandSourceStack pSource, BlockPos pPos, int pSourceSlot, Collection<? extends Entity> pTargets, int pSlot, Holder<LootItemFunction> pModifier) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
blockToBlock
private static int blockToBlock(CommandSourceStack pSource, BlockPos pSourcePos, int pSourceSlot, BlockPos pPos, int pSlot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
blockToBlock
private static int blockToBlock(CommandSourceStack pSource, BlockPos pSourcePos, int pSourceSlot, BlockPos pPos, int pSlot, Holder<LootItemFunction> pModifier) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
entityToBlock
private static int entityToBlock(CommandSourceStack pSource, Entity pSourceEntity, int pSourceSlot, BlockPos pPos, int pSlot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
entityToBlock
private static int entityToBlock(CommandSourceStack pSource, Entity pSourceEntity, int pSourceSlot, BlockPos pPos, int pSlot, Holder<LootItemFunction> pModifier) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
entityToEntities
private static int entityToEntities(CommandSourceStack pSource, Entity pSourceEntity, int pSourceSlot, Collection<? extends Entity> pTargets, int pSlot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
entityToEntities
private static int entityToEntities(CommandSourceStack pSource, Entity pSourceEntity, int pSourceSlot, Collection<? extends Entity> pTargets, int pSlot, Holder<LootItemFunction> pModifier) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
applyModifier
private static ItemStack applyModifier(CommandSourceStack pSource, Holder<LootItemFunction> pModifier, ItemStack pStack) -
getEntityItem
private static ItemStack getEntityItem(Entity pEntity, int pSlot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getBlockItem
private static ItemStack getBlockItem(CommandSourceStack pSource, BlockPos pPos, int pSlot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-