Class ItemStackArgument

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

public class ItemStackArgument extends Object implements Predicate<ItemStack>
Mappings:
Namespace Name
official fq
intermediary net/minecraft/class_2290
named net/minecraft/command/argument/ItemStackArgument
  • Field Details

    • OVERSTACKED_EXCEPTION

      private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType OVERSTACKED_EXCEPTION
      Mappings:
      Namespace Name Mixin selector
      official a Lfq;a:Lcom/mojang/brigadier/exceptions/Dynamic2CommandExceptionType;
      intermediary field_10797 Lnet/minecraft/class_2290;field_10797:Lcom/mojang/brigadier/exceptions/Dynamic2CommandExceptionType;
      named OVERSTACKED_EXCEPTION Lnet/minecraft/command/argument/ItemStackArgument;OVERSTACKED_EXCEPTION:Lcom/mojang/brigadier/exceptions/Dynamic2CommandExceptionType;
    • item

      private final RegistryEntry<Item> item
      Mappings:
      Namespace Name Mixin selector
      official b Lfq;b:Lgz;
      intermediary field_10796 Lnet/minecraft/class_2290;field_10796:Lnet/minecraft/class_6880;
      named item Lnet/minecraft/command/argument/ItemStackArgument;item:Lnet/minecraft/registry/entry/RegistryEntry;
    • nbt

      @Nullable private final @Nullable NbtCompound nbt
      Mappings:
      Namespace Name Mixin selector
      official c Lfq;c:Lqp;
      intermediary field_10798 Lnet/minecraft/class_2290;field_10798:Lnet/minecraft/class_2487;
      named nbt Lnet/minecraft/command/argument/ItemStackArgument;nbt:Lnet/minecraft/nbt/NbtCompound;
  • Constructor Details

    • ItemStackArgument

      public ItemStackArgument(RegistryEntry<Item> item, @Nullable @Nullable NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lfq;<init>(Lgz;Lqp;)V
      intermediary <init> Lnet/minecraft/class_2290;<init>(Lnet/minecraft/class_6880;Lnet/minecraft/class_2487;)V
      named <init> Lnet/minecraft/command/argument/ItemStackArgument;<init>(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/nbt/NbtCompound;)V
  • Method Details

    • getItem

      public Item getItem()
      Mappings:
      Namespace Name Mixin selector
      official a Lfq;a()Lcdp;
      intermediary method_9785 Lnet/minecraft/class_2290;method_9785()Lnet/minecraft/class_1792;
      named getItem Lnet/minecraft/command/argument/ItemStackArgument;getItem()Lnet/minecraft/item/Item;
    • test

      public boolean test(ItemStack itemStack)
      Specified by:
      test in interface Predicate<ItemStack>
      Mappings:
      Namespace Name Mixin selector
      official a Lfq;a(Lcdt;)Z
      intermediary method_9783 Lnet/minecraft/class_2290;method_9783(Lnet/minecraft/class_1799;)Z
      named test Lnet/minecraft/command/argument/ItemStackArgument;test(Lnet/minecraft/item/ItemStack;)Z
    • createStack

      public ItemStack createStack(int amount, boolean checkOverstack) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      official a Lfq;a(IZ)Lcdt;
      intermediary method_9781 Lnet/minecraft/class_2290;method_9781(IZ)Lnet/minecraft/class_1799;
      named createStack Lnet/minecraft/command/argument/ItemStackArgument;createStack(IZ)Lnet/minecraft/item/ItemStack;
    • asString

      public String asString()
      Mappings:
      Namespace Name Mixin selector
      official b Lfq;b()Ljava/lang/String;
      intermediary method_9782 Lnet/minecraft/class_2290;method_9782()Ljava/lang/String;
      named asString Lnet/minecraft/command/argument/ItemStackArgument;asString()Ljava/lang/String;
    • getIdString

      private String getIdString()
      Mappings:
      Namespace Name Mixin selector
      official c Lfq;c()Ljava/lang/String;
      intermediary method_41967 Lnet/minecraft/class_2290;method_41967()Ljava/lang/String;
      named getIdString Lnet/minecraft/command/argument/ItemStackArgument;getIdString()Ljava/lang/String;