Class ItemInput

java.lang.Object
net.minecraft.commands.arguments.item.ItemInput
All Implemented Interfaces:
Predicate<ItemStack>

public class ItemInput extends Object implements Predicate<ItemStack>
  • Field Details

    • ERROR_STACK_TOO_BIG

      private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_STACK_TOO_BIG
    • item

      private final Holder<Item> item
    • tag

      @Nullable private final CompoundTag tag
  • Constructor Details

  • Method Details

    • getItem

      public Item getItem()
    • test

      public boolean test(ItemStack p_120984_)
      Specified by:
      test in interface Predicate<ItemStack>
    • createItemStack

      public ItemStack createItemStack(int p_120981_, boolean p_120982_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • serialize

      public String serialize()
    • getItemName

      private String getItemName()