Class ItemCommands

java.lang.Object
net.minecraft.server.commands.ItemCommands

public class ItemCommands extends Object
  • 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> p_214449_, CommandBuildContext p_214450_)
    • 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 p_180328_, BlockPos p_180329_, com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType p_180330_) 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