Class ItemStackArgument

java.lang.Object
net.minecraft.command.argument.ItemStackArgument
All Implemented Interfaces:
Predicate<ItemStack>

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

    • OVERSTACKED_EXCEPTION

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

      private final Item item
    • tag

      @Nullable private final CompoundTag tag
  • Constructor Details

  • Method Details

    • getItem

      public Item getItem()
    • test

      public boolean test​(ItemStack itemStack)
      Specified by:
      test in interface Predicate<ItemStack>
    • createStack

      public ItemStack createStack​(int amount, boolean checkOverstack) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • asString

      public String asString()