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 source, Holder<LootItemFunction> modifier, ItemStack stack) private static intblockToBlock(CommandSourceStack source, BlockPos sourcePos, int sourceSlot, BlockPos pos, int slot) private static intblockToBlock(CommandSourceStack source, BlockPos sourcePos, int sourceSlot, BlockPos pos, int slot, Holder<LootItemFunction> modifier) private static intblockToEntities(CommandSourceStack source, BlockPos pos, int sourceSlot, Collection<? extends Entity> targets, int slot) private static intblockToEntities(CommandSourceStack source, BlockPos pos, int sourceSlot, Collection<? extends Entity> targets, int slot, Holder<LootItemFunction> modifier) private static intentityToBlock(CommandSourceStack source, Entity sourceEntity, int sourceSlot, BlockPos pos, int slot) private static intentityToBlock(CommandSourceStack source, Entity sourceEntity, int sourceSlot, BlockPos pos, int slot, Holder<LootItemFunction> modifier) private static intentityToEntities(CommandSourceStack source, Entity sourceEntity, int sourceSlot, Collection<? extends Entity> targets, int slot) private static intentityToEntities(CommandSourceStack source, Entity sourceEntity, int sourceSlot, Collection<? extends Entity> targets, int slot, Holder<LootItemFunction> modifier) private static ItemStackgetBlockItem(CommandSourceStack source, BlockPos pos, int slot) (package private) static ContainergetContainer(CommandSourceStack source, BlockPos pos, com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType exception) private static ItemStackgetEntityItem(Entity entity, int slot) private static intmodifyBlockItem(CommandSourceStack source, BlockPos pos, int slot, Holder<LootItemFunction> modifier) private static intmodifyEntityItem(CommandSourceStack source, Collection<? extends Entity> targets, int sourceSlot, Holder<LootItemFunction> modifer) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) private static intsetBlockItem(CommandSourceStack source, BlockPos pos, int slot, ItemStack item) private static intsetEntityItem(CommandSourceStack source, Collection<? extends Entity> targets, int slot, ItemStack item)
-
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> dispatcher, CommandBuildContext context) -
modifyBlockItem
private static int modifyBlockItem(CommandSourceStack source, BlockPos pos, int slot, Holder<LootItemFunction> modifier) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
modifyEntityItem
private static int modifyEntityItem(CommandSourceStack source, Collection<? extends Entity> targets, int sourceSlot, Holder<LootItemFunction> modifer) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setBlockItem
private static int setBlockItem(CommandSourceStack source, BlockPos pos, int slot, ItemStack item) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getContainer
static Container getContainer(CommandSourceStack source, BlockPos pos, com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType exception) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setEntityItem
private static int setEntityItem(CommandSourceStack source, Collection<? extends Entity> targets, int slot, ItemStack item) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
blockToEntities
private static int blockToEntities(CommandSourceStack source, BlockPos pos, int sourceSlot, Collection<? extends Entity> targets, int slot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
blockToEntities
private static int blockToEntities(CommandSourceStack source, BlockPos pos, int sourceSlot, Collection<? extends Entity> targets, int slot, Holder<LootItemFunction> modifier) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
blockToBlock
private static int blockToBlock(CommandSourceStack source, BlockPos sourcePos, int sourceSlot, BlockPos pos, int slot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
blockToBlock
private static int blockToBlock(CommandSourceStack source, BlockPos sourcePos, int sourceSlot, BlockPos pos, int slot, Holder<LootItemFunction> modifier) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
entityToBlock
private static int entityToBlock(CommandSourceStack source, Entity sourceEntity, int sourceSlot, BlockPos pos, int slot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
entityToBlock
private static int entityToBlock(CommandSourceStack source, Entity sourceEntity, int sourceSlot, BlockPos pos, int slot, Holder<LootItemFunction> modifier) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
entityToEntities
private static int entityToEntities(CommandSourceStack source, Entity sourceEntity, int sourceSlot, Collection<? extends Entity> targets, int slot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
entityToEntities
private static int entityToEntities(CommandSourceStack source, Entity sourceEntity, int sourceSlot, Collection<? extends Entity> targets, int slot, Holder<LootItemFunction> modifier) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
applyModifier
private static ItemStack applyModifier(CommandSourceStack source, Holder<LootItemFunction> modifier, ItemStack stack) -
getEntityItem
private static ItemStack getEntityItem(Entity entity, int slot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getBlockItem
private static ItemStack getBlockItem(CommandSourceStack source, BlockPos pos, int slot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-