Class ItemInput

java.lang.Object
net.minecraft.command.arguments.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 Item item
    • tag

      @Nullable private final CompoundNBT tag
  • Constructor Details

    • ItemInput

      public ItemInput(Item p_i47961_1_, @Nullable CompoundNBT p_i47961_2_)
  • Method Details

    • getItem

      public Item getItem()
    • test

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

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

      public String serialize()