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 p_180297_, BlockPos p_180298_, int p_180299_, Holder<LootItemFunction> p_335627_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • modifyEntityItem

      private static int modifyEntityItem(CommandSourceStack p_180337_, Collection<? extends Entity> p_180338_, int p_180339_, Holder<LootItemFunction> p_335904_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • setBlockItem

      private static int setBlockItem(CommandSourceStack p_180292_, BlockPos p_180293_, int p_180294_, ItemStack p_180295_) 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 p_180332_, Collection<? extends Entity> p_180333_, int p_180334_, ItemStack p_180335_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • blockToEntities

      private static int blockToEntities(CommandSourceStack p_180315_, BlockPos p_180316_, int p_180317_, Collection<? extends Entity> p_180318_, int p_180319_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • blockToEntities

      private static int blockToEntities(CommandSourceStack p_180321_, BlockPos p_180322_, int p_180323_, Collection<? extends Entity> p_180324_, int p_180325_, Holder<LootItemFunction> p_336168_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • blockToBlock

      private static int blockToBlock(CommandSourceStack p_180302_, BlockPos p_180303_, int p_180304_, BlockPos p_180305_, int p_180306_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • blockToBlock

      private static int blockToBlock(CommandSourceStack p_180308_, BlockPos p_180309_, int p_180310_, BlockPos p_180311_, int p_180312_, Holder<LootItemFunction> p_335838_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • entityToBlock

      private static int entityToBlock(CommandSourceStack p_180258_, Entity p_180259_, int p_180260_, BlockPos p_180261_, int p_180262_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • entityToBlock

      private static int entityToBlock(CommandSourceStack p_180264_, Entity p_180265_, int p_180266_, BlockPos p_180267_, int p_180268_, Holder<LootItemFunction> p_335965_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • entityToEntities

      private static int entityToEntities(CommandSourceStack p_180271_, Entity p_180272_, int p_180273_, Collection<? extends Entity> p_180274_, int p_180275_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • entityToEntities

      private static int entityToEntities(CommandSourceStack p_180277_, Entity p_180278_, int p_180279_, Collection<? extends Entity> p_180280_, int p_180281_, Holder<LootItemFunction> p_335469_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • applyModifier

      private static ItemStack applyModifier(CommandSourceStack p_180284_, Holder<LootItemFunction> p_335682_, ItemStack p_180286_)
    • getEntityItem

      private static ItemStack getEntityItem(Entity p_180246_, int p_180247_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getBlockItem

      private static ItemStack getBlockItem(CommandSourceStack p_180288_, BlockPos p_180289_, int p_180290_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException