Class ItemStack

java.lang.Object
net.minecraft.item.ItemStack
All Implemented Interfaces:
ComponentHolder

public final class ItemStack extends Object implements ComponentHolder
Represents a stack of items. This is a data container that holds the item count and the stack's components. Logics for items (such as the action for using it) are delegated to the stack's logic container, Item. Instances can be created using one of the constructors and are usually stored in an Inventory.

Item stacks should never be compared using == operator or equals method. This also means they cannot be used as a map key. To check if an item stack is of a certain item, use isOf(Item). To compare two item stacks, use areItemsEqual(net.minecraft.item.ItemStack, net.minecraft.item.ItemStack) to check the item only, or areEqual(net.minecraft.item.ItemStack, net.minecraft.item.ItemStack) to also check the item count and the components. Use isEmpty() to check if an item stack is empty instead of doing stack == ItemStack.EMPTY.

When storing an item stack in an inventory or other places, make sure that an instance is never stored in multiple places. When two inventories hold the same instance, it will duplicate the item stack (and become two instances) when one is saved and reloaded.

Components

Components can be used to store data specific to the item stack. Use ComponentHolder.get(net.minecraft.component.ComponentType<? extends T>) or ComponentHolder.getOrDefault(net.minecraft.component.ComponentType<? extends T>, T) to get the component values. Use set(net.minecraft.component.ComponentType<? super T>, T) or remove(net.minecraft.component.ComponentType<? extends T>) to set the components.

NBT serialization

An Item Stack can be serialized with

invalid reference
#encode(RegistryWrapper.WrapperLookup)
, and deserialized with fromNbt(RegistryWrapper.WrapperLookup, NbtCompound).
Serialized NBT Structure
KeyTypePurpose
idNbtStringThe identifier of the item.
countNbtIntThe count of items in the stack.
componentsComponentChangesThe item stack's components.
Mappings:
Namespace Name
named net/minecraft/item/ItemStack
intermediary net/minecraft/class_1799
official cxo
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<ItemStack> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/item/ItemStack;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_24671 Lnet/minecraft/class_1799;field_24671:Lcom/mojang/serialization/Codec;
      official a Lcxo;a:Lcom/mojang/serialization/Codec;
    • UNCOUNTED_CODEC

      public static final com.mojang.serialization.Codec<ItemStack> UNCOUNTED_CODEC
      Mappings:
      Namespace Name Mixin selector
      named UNCOUNTED_CODEC Lnet/minecraft/item/ItemStack;UNCOUNTED_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49747 Lnet/minecraft/class_1799;field_49747:Lcom/mojang/serialization/Codec;
      official b Lcxo;b:Lcom/mojang/serialization/Codec;
    • VALIDATED_CODEC

      public static final com.mojang.serialization.Codec<ItemStack> VALIDATED_CODEC
      Mappings:
      Namespace Name Mixin selector
      named VALIDATED_CODEC Lnet/minecraft/item/ItemStack;VALIDATED_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_51397 Lnet/minecraft/class_1799;field_51397:Lcom/mojang/serialization/Codec;
      official c Lcxo;c:Lcom/mojang/serialization/Codec;
    • VALIDATED_UNCOUNTED_CODEC

      public static final com.mojang.serialization.Codec<ItemStack> VALIDATED_UNCOUNTED_CODEC
      Mappings:
      Namespace Name Mixin selector
      named VALIDATED_UNCOUNTED_CODEC Lnet/minecraft/item/ItemStack;VALIDATED_UNCOUNTED_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_51398 Lnet/minecraft/class_1799;field_51398:Lcom/mojang/serialization/Codec;
      official d Lcxo;d:Lcom/mojang/serialization/Codec;
    • OPTIONAL_CODEC

      public static final com.mojang.serialization.Codec<ItemStack> OPTIONAL_CODEC
      Mappings:
      Namespace Name Mixin selector
      named OPTIONAL_CODEC Lnet/minecraft/item/ItemStack;OPTIONAL_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49266 Lnet/minecraft/class_1799;field_49266:Lcom/mojang/serialization/Codec;
      official e Lcxo;e:Lcom/mojang/serialization/Codec;
    • REGISTRY_ENTRY_CODEC

      public static final com.mojang.serialization.Codec<ItemStack> REGISTRY_ENTRY_CODEC
      Mappings:
      Namespace Name Mixin selector
      named REGISTRY_ENTRY_CODEC Lnet/minecraft/item/ItemStack;REGISTRY_ENTRY_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49267 Lnet/minecraft/class_1799;field_49267:Lcom/mojang/serialization/Codec;
      official f Lcxo;f:Lcom/mojang/serialization/Codec;
    • OPTIONAL_PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,ItemStack> OPTIONAL_PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named OPTIONAL_PACKET_CODEC Lnet/minecraft/item/ItemStack;OPTIONAL_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_49268 Lnet/minecraft/class_1799;field_49268:Lnet/minecraft/class_9139;
      official g Lcxo;g:Lzt;
    • PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,ItemStack> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/item/ItemStack;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_48349 Lnet/minecraft/class_1799;field_48349:Lnet/minecraft/class_9139;
      official h Lcxo;h:Lzt;
    • OPTIONAL_LIST_PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,List<ItemStack>> OPTIONAL_LIST_PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named OPTIONAL_LIST_PACKET_CODEC Lnet/minecraft/item/ItemStack;OPTIONAL_LIST_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_49269 Lnet/minecraft/class_1799;field_49269:Lnet/minecraft/class_9139;
      official i Lcxo;i:Lzt;
    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/item/ItemStack;LOGGER:Lorg/slf4j/Logger;
      intermediary field_8033 Lnet/minecraft/class_1799;field_8033:Lorg/slf4j/Logger;
      official k Lcxo;k:Lorg/slf4j/Logger;
    • EMPTY

      public static final ItemStack EMPTY
      The empty item stack that holds no item.

      This should never be mutated.

      See Also:
      Mappings:
      Namespace Name Mixin selector
      named EMPTY Lnet/minecraft/item/ItemStack;EMPTY:Lnet/minecraft/item/ItemStack;
      intermediary field_8037 Lnet/minecraft/class_1799;field_8037:Lnet/minecraft/class_1799;
      official j Lcxo;j:Lcxo;
    • DISABLED_TEXT

      private static final Text DISABLED_TEXT
      Mappings:
      Namespace Name Mixin selector
      named DISABLED_TEXT Lnet/minecraft/item/ItemStack;DISABLED_TEXT:Lnet/minecraft/text/Text;
      intermediary field_40211 Lnet/minecraft/class_1799;field_40211:Lnet/minecraft/class_2561;
      official l Lcxo;l:Lxv;
    • count

      private int count
      Mappings:
      Namespace Name Mixin selector
      named count Lnet/minecraft/item/ItemStack;count:I
      intermediary field_8031 Lnet/minecraft/class_1799;field_8031:I
      official m Lcxo;m:I
    • bobbingAnimationTime

      private int bobbingAnimationTime
      Mappings:
      Namespace Name Mixin selector
      named bobbingAnimationTime Lnet/minecraft/item/ItemStack;bobbingAnimationTime:I
      intermediary field_8030 Lnet/minecraft/class_1799;field_8030:I
      official n Lcxo;n:I
    • item

      @Deprecated @Nullable private final @Nullable Item item
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      named item Lnet/minecraft/item/ItemStack;item:Lnet/minecraft/item/Item;
      intermediary field_8038 Lnet/minecraft/class_1799;field_8038:Lnet/minecraft/class_1792;
      official o Lcxo;o:Lcxk;
    • components

      final MergedComponentMap components
      Mappings:
      Namespace Name Mixin selector
      named components Lnet/minecraft/item/ItemStack;components:Lnet/minecraft/component/MergedComponentMap;
      intermediary field_49270 Lnet/minecraft/class_1799;field_49270:Lnet/minecraft/class_9335;
      official p Lcxo;p:Lkv;
    • holder

      @Nullable private @Nullable Entity holder
      Mappings:
      Namespace Name Mixin selector
      named holder Lnet/minecraft/item/ItemStack;holder:Lnet/minecraft/entity/Entity;
      intermediary field_24093 Lnet/minecraft/class_1799;field_24093:Lnet/minecraft/class_1297;
      official q Lcxo;q:Lbvj;
  • Constructor Details

    • ItemStack

      public ItemStack(ItemConvertible item)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/item/ItemStack;<init>(Lnet/minecraft/item/ItemConvertible;)V
      intermediary <init> Lnet/minecraft/class_1799;<init>(Lnet/minecraft/class_1935;)V
      official <init> Lcxo;<init>(Ldhg;)V
    • ItemStack

      public ItemStack(RegistryEntry<Item> entry)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/item/ItemStack;<init>(Lnet/minecraft/registry/entry/RegistryEntry;)V
      intermediary <init> Lnet/minecraft/class_1799;<init>(Lnet/minecraft/class_6880;)V
      official <init> Lcxo;<init>(Ljq;)V
    • ItemStack

      public ItemStack(RegistryEntry<Item> item, int count, ComponentChanges changes)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/item/ItemStack;<init>(Lnet/minecraft/registry/entry/RegistryEntry;ILnet/minecraft/component/ComponentChanges;)V
      intermediary <init> Lnet/minecraft/class_1799;<init>(Lnet/minecraft/class_6880;ILnet/minecraft/class_9326;)V
      official <init> Lcxo;<init>(Ljq;ILkr;)V
    • ItemStack

      public ItemStack(RegistryEntry<Item> itemEntry, int count)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/item/ItemStack;<init>(Lnet/minecraft/registry/entry/RegistryEntry;I)V
      intermediary <init> Lnet/minecraft/class_1799;<init>(Lnet/minecraft/class_6880;I)V
      official <init> Lcxo;<init>(Ljq;I)V
    • ItemStack

      public ItemStack(ItemConvertible item, int count)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/item/ItemStack;<init>(Lnet/minecraft/item/ItemConvertible;I)V
      intermediary <init> Lnet/minecraft/class_1799;<init>(Lnet/minecraft/class_1935;I)V
      official <init> Lcxo;<init>(Ldhg;I)V
    • ItemStack

      private ItemStack(ItemConvertible item, int count, MergedComponentMap components)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/item/ItemStack;<init>(Lnet/minecraft/item/ItemConvertible;ILnet/minecraft/component/MergedComponentMap;)V
      intermediary <init> Lnet/minecraft/class_1799;<init>(Lnet/minecraft/class_1935;ILnet/minecraft/class_9335;)V
      official <init> Lcxo;<init>(Ldhg;ILkv;)V
    • ItemStack

      private ItemStack(@Nullable @Nullable Void v)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/item/ItemStack;<init>(Ljava/lang/Void;)V
      intermediary <init> Lnet/minecraft/class_1799;<init>(Ljava/lang/Void;)V
      official <init> Lcxo;<init>(Ljava/lang/Void;)V
  • Method Details

    • validate

      private static com.mojang.serialization.DataResult<ItemStack> validate(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named validate Lnet/minecraft/item/ItemStack;validate(Lnet/minecraft/item/ItemStack;)Lcom/mojang/serialization/DataResult;
      intermediary method_57372 Lnet/minecraft/class_1799;method_57372(Lnet/minecraft/class_1799;)Lcom/mojang/serialization/DataResult;
      official c Lcxo;c(Lcxo;)Lcom/mojang/serialization/DataResult;
    • createExtraValidatingPacketCodec

      public static PacketCodec<RegistryByteBuf,ItemStack> createExtraValidatingPacketCodec(PacketCodec<RegistryByteBuf,ItemStack> basePacketCodec)
      Returns a packet codec that ensures the validity of the decoded stack by checking if it can be re-encoded.

      This should be used when serializing ItemStack in C2S packets. Encoding is unaffected.

      Returns:
      a packet codec that ensures the validity of the decoded stack by checking if it can be re-encoded
      Mappings:
      Namespace Name Mixin selector
      named createExtraValidatingPacketCodec Lnet/minecraft/item/ItemStack;createExtraValidatingPacketCodec(Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;
      intermediary method_59693 Lnet/minecraft/class_1799;method_59693(Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;
      official a Lcxo;a(Lzt;)Lzt;
    • getTooltipData

      public Optional<TooltipData> getTooltipData()
      Mappings:
      Namespace Name Mixin selector
      named getTooltipData Lnet/minecraft/item/ItemStack;getTooltipData()Ljava/util/Optional;
      intermediary method_32347 Lnet/minecraft/class_1799;method_32347()Ljava/util/Optional;
      official b Lcxo;b()Ljava/util/Optional;
    • getComponents

      public ComponentMap getComponents()
      Specified by:
      getComponents in interface ComponentHolder
      Mappings:
      Namespace Name Mixin selector
      named getComponents Lnet/minecraft/component/ComponentHolder;getComponents()Lnet/minecraft/component/ComponentMap;
      intermediary method_57353 Lnet/minecraft/class_9322;method_57353()Lnet/minecraft/class_9323;
      official a Lkp;a()Lkq;
    • clearComponentChanges

      public void clearComponentChanges()
      Mappings:
      Namespace Name Mixin selector
      named clearComponentChanges Lnet/minecraft/item/ItemStack;clearComponentChanges()V
      intermediary method_61656 Lnet/minecraft/class_1799;method_61656()V
      official c Lcxo;c()V
    • getDefaultComponents

      public ComponentMap getDefaultComponents()
      Mappings:
      Namespace Name Mixin selector
      named getDefaultComponents Lnet/minecraft/item/ItemStack;getDefaultComponents()Lnet/minecraft/component/ComponentMap;
      intermediary method_58658 Lnet/minecraft/class_1799;method_58658()Lnet/minecraft/class_9323;
      official d Lcxo;d()Lkq;
    • getComponentChanges

      public ComponentChanges getComponentChanges()
      Mappings:
      Namespace Name Mixin selector
      named getComponentChanges Lnet/minecraft/item/ItemStack;getComponentChanges()Lnet/minecraft/component/ComponentChanges;
      intermediary method_57380 Lnet/minecraft/class_1799;method_57380()Lnet/minecraft/class_9326;
      official e Lcxo;e()Lkr;
    • validateComponents

      public static com.mojang.serialization.DataResult<Unit> validateComponents(ComponentMap components)
      Mappings:
      Namespace Name Mixin selector
      named validateComponents Lnet/minecraft/item/ItemStack;validateComponents(Lnet/minecraft/component/ComponentMap;)Lcom/mojang/serialization/DataResult;
      intermediary method_59691 Lnet/minecraft/class_1799;method_59691(Lnet/minecraft/class_9323;)Lcom/mojang/serialization/DataResult;
      official a Lcxo;a(Lkq;)Lcom/mojang/serialization/DataResult;
    • fromNbt

      public static Optional<ItemStack> fromNbt(RegistryWrapper.WrapperLookup registries, NbtElement nbt)
      Mappings:
      Namespace Name Mixin selector
      named fromNbt Lnet/minecraft/item/ItemStack;fromNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;Lnet/minecraft/nbt/NbtElement;)Ljava/util/Optional;
      intermediary method_57360 Lnet/minecraft/class_1799;method_57360(Lnet/minecraft/class_7225$class_7874;Lnet/minecraft/class_2520;)Ljava/util/Optional;
      official a Lcxo;a(Ljs$a;Lvu;)Ljava/util/Optional;
    • fromNbtOrEmpty

      public static ItemStack fromNbtOrEmpty(RegistryWrapper.WrapperLookup registries, NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      named fromNbtOrEmpty Lnet/minecraft/item/ItemStack;fromNbtOrEmpty(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/item/ItemStack;
      intermediary method_57359 Lnet/minecraft/class_1799;method_57359(Lnet/minecraft/class_7225$class_7874;Lnet/minecraft/class_2487;)Lnet/minecraft/class_1799;
      official a Lcxo;a(Ljs$a;Lux;)Lcxo;
    • isEmpty

      public boolean isEmpty()
      Returns whether this item stack is empty.
      Returns:
      whether this item stack is empty
      Mappings:
      Namespace Name Mixin selector
      named isEmpty Lnet/minecraft/item/ItemStack;isEmpty()Z
      intermediary method_7960 Lnet/minecraft/class_1799;method_7960()Z
      official f Lcxo;f()Z
    • isItemEnabled

      public boolean isItemEnabled(FeatureSet enabledFeatures)
      Mappings:
      Namespace Name Mixin selector
      named isItemEnabled Lnet/minecraft/item/ItemStack;isItemEnabled(Lnet/minecraft/resource/featuretoggle/FeatureSet;)Z
      intermediary method_45435 Lnet/minecraft/class_1799;method_45435(Lnet/minecraft/class_7699;)Z
      official a Lcxo;a(Lcss;)Z
    • split

      public ItemStack split(int amount)
      Returns the copy of the stack "split" from the current stack with item count being at most amount.

      Splitting an item stack mutates this stack so that the sum of the stacks' item counts does not change. See the example below:

      
       ItemStack stack = new ItemStack(Items.APPLE, 64);
       ItemStack newStack = stack.split(10);
       // stack has 54 apples
       // newStack has 10 apples
      
       ItemStack smallStack = new ItemStack(Items.APPLE, 4);
       ItemStack newSmallStack = smallStack.split(10);
       // smallStack is now empty
       // newSmallStack has 4 apples
       
      Returns:
      the copy of the stack "split" from the current stack with item count being at most amount
      Mappings:
      Namespace Name Mixin selector
      named split Lnet/minecraft/item/ItemStack;split(I)Lnet/minecraft/item/ItemStack;
      intermediary method_7971 Lnet/minecraft/class_1799;method_7971(I)Lnet/minecraft/class_1799;
      official a Lcxo;a(I)Lcxo;
    • copyAndEmpty

      public ItemStack copyAndEmpty()
      Mappings:
      Namespace Name Mixin selector
      named copyAndEmpty Lnet/minecraft/item/ItemStack;copyAndEmpty()Lnet/minecraft/item/ItemStack;
      intermediary method_51164 Lnet/minecraft/class_1799;method_51164()Lnet/minecraft/class_1799;
      official g Lcxo;g()Lcxo;
    • getItem

      public Item getItem()
      Returns the item of this stack.
      Returns:
      the item of this stack
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getItem Lnet/minecraft/item/ItemStack;getItem()Lnet/minecraft/item/Item;
      intermediary method_7909 Lnet/minecraft/class_1799;method_7909()Lnet/minecraft/class_1792;
      official h Lcxo;h()Lcxk;
    • getRegistryEntry

      public RegistryEntry<Item> getRegistryEntry()
      Mappings:
      Namespace Name Mixin selector
      named getRegistryEntry Lnet/minecraft/item/ItemStack;getRegistryEntry()Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary method_41409 Lnet/minecraft/class_1799;method_41409()Lnet/minecraft/class_6880;
      official i Lcxo;i()Ljq;
    • isIn

      public boolean isIn(TagKey<Item> tag)
      Returns whether the item is in tag.
      Returns:
      whether the item is in tag
      Mappings:
      Namespace Name Mixin selector
      named isIn Lnet/minecraft/item/ItemStack;isIn(Lnet/minecraft/registry/tag/TagKey;)Z
      intermediary method_31573 Lnet/minecraft/class_1799;method_31573(Lnet/minecraft/class_6862;)Z
      official a Lcxo;a(Layk;)Z
    • isOf

      public boolean isOf(Item item)
      Returns whether the item is item.
      Returns:
      whether the item is item
      Mappings:
      Namespace Name Mixin selector
      named isOf Lnet/minecraft/item/ItemStack;isOf(Lnet/minecraft/item/Item;)Z
      intermediary method_31574 Lnet/minecraft/class_1799;method_31574(Lnet/minecraft/class_1792;)Z
      official a Lcxo;a(Lcxk;)Z
    • itemMatches

      public boolean itemMatches(Predicate<RegistryEntry<Item>> predicate)
      Returns whether the item's registry entry passes the predicate.
      Returns:
      whether the item's registry entry passes the predicate
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named itemMatches Lnet/minecraft/item/ItemStack;itemMatches(Ljava/util/function/Predicate;)Z
      intermediary method_41407 Lnet/minecraft/class_1799;method_41407(Ljava/util/function/Predicate;)Z
      official a Lcxo;a(Ljava/util/function/Predicate;)Z
    • itemMatches

      public boolean itemMatches(RegistryEntry<Item> itemEntry)
      Returns whether the item's registry entry matches itemEntry.
      Returns:
      whether the item's registry entry matches itemEntry
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named itemMatches Lnet/minecraft/item/ItemStack;itemMatches(Lnet/minecraft/registry/entry/RegistryEntry;)Z
      intermediary method_41406 Lnet/minecraft/class_1799;method_41406(Lnet/minecraft/class_6880;)Z
      official a Lcxo;a(Ljq;)Z
    • isIn

      public boolean isIn(RegistryEntryList<Item> registryEntryList)
      Mappings:
      Namespace Name Mixin selector
      named isIn Lnet/minecraft/item/ItemStack;isIn(Lnet/minecraft/registry/entry/RegistryEntryList;)Z
      intermediary method_53187 Lnet/minecraft/class_1799;method_53187(Lnet/minecraft/class_6885;)Z
      official a Lcxo;a(Lju;)Z
    • streamTags

      public Stream<TagKey<Item>> streamTags()
      Returns a stream of all tags the item is in.
      Returns:
      a stream of all tags the item is in
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named streamTags Lnet/minecraft/item/ItemStack;streamTags()Ljava/util/stream/Stream;
      intermediary method_40133 Lnet/minecraft/class_1799;method_40133()Ljava/util/stream/Stream;
      official j Lcxo;j()Ljava/util/stream/Stream;
    • useOnBlock

      public ActionResult useOnBlock(ItemUsageContext context)
      Mappings:
      Namespace Name Mixin selector
      named useOnBlock Lnet/minecraft/item/ItemStack;useOnBlock(Lnet/minecraft/item/ItemUsageContext;)Lnet/minecraft/util/ActionResult;
      intermediary method_7981 Lnet/minecraft/class_1799;method_7981(Lnet/minecraft/class_1838;)Lnet/minecraft/class_1269;
      official a Lcxo;a(Ldbh;)Lbti;
    • getMiningSpeedMultiplier

      public float getMiningSpeedMultiplier(BlockState state)
      Mappings:
      Namespace Name Mixin selector
      named getMiningSpeedMultiplier Lnet/minecraft/item/ItemStack;getMiningSpeedMultiplier(Lnet/minecraft/block/BlockState;)F
      intermediary method_7924 Lnet/minecraft/class_1799;method_7924(Lnet/minecraft/class_2680;)F
      official a Lcxo;a(Ldxu;)F
    • use

      public ActionResult use(World world, PlayerEntity user, Hand hand)
      Mappings:
      Namespace Name Mixin selector
      named use Lnet/minecraft/item/ItemStack;use(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;
      intermediary method_7913 Lnet/minecraft/class_1799;method_7913(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;
      official a Lcxo;a(Ldhh;Lcpw;Lbth;)Lbti;
    • finishUsing

      public ItemStack finishUsing(World world, LivingEntity user)
      Mappings:
      Namespace Name Mixin selector
      named finishUsing Lnet/minecraft/item/ItemStack;finishUsing(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/item/ItemStack;
      intermediary method_7910 Lnet/minecraft/class_1799;method_7910(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;)Lnet/minecraft/class_1799;
      official a Lcxo;a(Ldhh;Lbwf;)Lcxo;
    • applyRemainderAndCooldown

      private ItemStack applyRemainderAndCooldown(LivingEntity user, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named applyRemainderAndCooldown Lnet/minecraft/item/ItemStack;applyRemainderAndCooldown(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;
      intermediary method_62837 Lnet/minecraft/class_1799;method_62837(Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)Lnet/minecraft/class_1799;
      official a Lcxo;a(Lbwf;Lcxo;)Lcxo;
    • toNbt

      public NbtElement toNbt(RegistryWrapper.WrapperLookup registries, NbtElement prefix)
      Mappings:
      Namespace Name Mixin selector
      named toNbt Lnet/minecraft/item/ItemStack;toNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;Lnet/minecraft/nbt/NbtElement;)Lnet/minecraft/nbt/NbtElement;
      intermediary method_57376 Lnet/minecraft/class_1799;method_57376(Lnet/minecraft/class_7225$class_7874;Lnet/minecraft/class_2520;)Lnet/minecraft/class_2520;
      official b Lcxo;b(Ljs$a;Lvu;)Lvu;
    • toNbt

      public NbtElement toNbt(RegistryWrapper.WrapperLookup registries)
      Mappings:
      Namespace Name Mixin selector
      named toNbt Lnet/minecraft/item/ItemStack;toNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtElement;
      intermediary method_57358 Lnet/minecraft/class_1799;method_57358(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2520;
      official a Lcxo;a(Ljs$a;)Lvu;
    • toNbtAllowEmpty

      public NbtElement toNbtAllowEmpty(RegistryWrapper.WrapperLookup registries)
      Mappings:
      Namespace Name Mixin selector
      named toNbtAllowEmpty Lnet/minecraft/item/ItemStack;toNbtAllowEmpty(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtElement;
      intermediary method_57375 Lnet/minecraft/class_1799;method_57375(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2520;
      official b Lcxo;b(Ljs$a;)Lvu;
    • getMaxCount

      public int getMaxCount()
      Mappings:
      Namespace Name Mixin selector
      named getMaxCount Lnet/minecraft/item/ItemStack;getMaxCount()I
      intermediary method_7914 Lnet/minecraft/class_1799;method_7914()I
      official k Lcxo;k()I
    • isStackable

      public boolean isStackable()
      Returns whether the item stack can have item count above 1.

      Stackable items must have the maximum count that is more than 1 and cannot be damaged.

      Returns:
      whether the item stack can have item count above 1
      Mappings:
      Namespace Name Mixin selector
      named isStackable Lnet/minecraft/item/ItemStack;isStackable()Z
      intermediary method_7946 Lnet/minecraft/class_1799;method_7946()Z
      official l Lcxo;l()Z
    • isDamageable

      public boolean isDamageable()
      Returns whether the item can be damaged (lose durability).

      Items with 0 max damage or item stacks with DataComponentTypes.UNBREAKABLE component cannot be damaged.

      Returns:
      whether the item can be damaged (lose durability)
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named isDamageable Lnet/minecraft/item/ItemStack;isDamageable()Z
      intermediary method_7963 Lnet/minecraft/class_1799;method_7963()Z
      official m Lcxo;m()Z
    • isDamaged

      public boolean isDamaged()
      Returns whether the item stack is damageable and has damage.
      Returns:
      whether the item stack is damageable and has damage
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named isDamaged Lnet/minecraft/item/ItemStack;isDamaged()Z
      intermediary method_7986 Lnet/minecraft/class_1799;method_7986()Z
      official n Lcxo;n()Z
    • getDamage

      public int getDamage()
      Returns the damage (lost durability) of the item stack.

      Note that this method does not check if the item is damageable, unlike isDamaged().

      Returns:
      the damage (lost durability) of the item stack
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getDamage Lnet/minecraft/item/ItemStack;getDamage()I
      intermediary method_7919 Lnet/minecraft/class_1799;method_7919()I
      official o Lcxo;o()I
    • setDamage

      public void setDamage(int damage)
      Sets the stack's damage to damage.

      This does not break the item if the damage reaches the maximum, unlike damage(int, LivingEntity, EquipmentSlot).

      See Also:
      Mappings:
      Namespace Name Mixin selector
      named setDamage Lnet/minecraft/item/ItemStack;setDamage(I)V
      intermediary method_7974 Lnet/minecraft/class_1799;method_7974(I)V
      official b Lcxo;b(I)V
    • getMaxDamage

      public int getMaxDamage()
      Mappings:
      Namespace Name Mixin selector
      named getMaxDamage Lnet/minecraft/item/ItemStack;getMaxDamage()I
      intermediary method_7936 Lnet/minecraft/class_1799;method_7936()I
      official p Lcxo;p()I
    • shouldBreak

      public boolean shouldBreak()
      Mappings:
      Namespace Name Mixin selector
      named shouldBreak Lnet/minecraft/item/ItemStack;shouldBreak()Z
      intermediary method_61657 Lnet/minecraft/class_1799;method_61657()Z
      official q Lcxo;q()Z
    • willBreakNextUse

      public boolean willBreakNextUse()
      Mappings:
      Namespace Name Mixin selector
      named willBreakNextUse Lnet/minecraft/item/ItemStack;willBreakNextUse()Z
      intermediary method_63692 Lnet/minecraft/class_1799;method_63692()Z
      official r Lcxo;r()Z
    • damage

      public void damage(int amount, ServerWorld world, @Nullable @Nullable ServerPlayerEntity player, Consumer<Item> breakCallback)
      Damages this item stack. This method should be used when a non-entity, such as a dispenser, damages the stack. This does not damage non-damageable stacks, and the enchantments are applied to amount before damaging.

      If player is not null, this triggers Criteria.ITEM_DURABILITY_CHANGED.

      When the item "breaks", that is, the stack's damage is equal to or above the maximum damage, breakCallback is run. Note that this method automatically decrements the stack size.

      Mappings:
      Namespace Name Mixin selector
      named damage Lnet/minecraft/item/ItemStack;damage(ILnet/minecraft/server/world/ServerWorld;Lnet/minecraft/server/network/ServerPlayerEntity;Ljava/util/function/Consumer;)V
      intermediary method_7956 Lnet/minecraft/class_1799;method_7956(ILnet/minecraft/class_3218;Lnet/minecraft/class_3222;Ljava/util/function/Consumer;)V
      official a Lcxo;a(ILash;Lasi;Ljava/util/function/Consumer;)V
    • calculateDamage

      private int calculateDamage(int baseDamage, ServerWorld world, @Nullable @Nullable ServerPlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      named calculateDamage Lnet/minecraft/item/ItemStack;calculateDamage(ILnet/minecraft/server/world/ServerWorld;Lnet/minecraft/server/network/ServerPlayerEntity;)I
      intermediary method_61651 Lnet/minecraft/class_1799;method_61651(ILnet/minecraft/class_3218;Lnet/minecraft/class_3222;)I
      official a Lcxo;a(ILash;Lasi;)I
    • onDurabilityChange

      private void onDurabilityChange(int damage, @Nullable @Nullable ServerPlayerEntity player, Consumer<Item> breakCallback)
      Mappings:
      Namespace Name Mixin selector
      named onDurabilityChange Lnet/minecraft/item/ItemStack;onDurabilityChange(ILnet/minecraft/server/network/ServerPlayerEntity;Ljava/util/function/Consumer;)V
      intermediary method_61652 Lnet/minecraft/class_1799;method_61652(ILnet/minecraft/class_3222;Ljava/util/function/Consumer;)V
      official a Lcxo;a(ILasi;Ljava/util/function/Consumer;)V
    • damage

      public void damage(int amount, PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      named damage Lnet/minecraft/item/ItemStack;damage(ILnet/minecraft/entity/player/PlayerEntity;)V
      intermediary method_61653 Lnet/minecraft/class_1799;method_61653(ILnet/minecraft/class_1657;)V
      official a Lcxo;a(ILcpw;)V
    • damage

      public void damage(int amount, LivingEntity entity, EquipmentSlot slot)
      Damages this item stack. This method should be used when an entity, including a player, damages the stack. This does not damage non-damageable stacks, and the enchantments are applied to amount before damaging. Additionally, if entity is a player in creative mode, the stack will not be damaged.

      If entity is a player, this triggers Criteria.ITEM_DURABILITY_CHANGED.

      If the stack's damage is equal to or above the maximum damage (i.e. the item is "broken"), this will send the equipment break status, decrement the stack, and increment Stats.BROKEN if the stack is held by a player.

      Parameters:
      slot - the slot in which the stack is held
      Mappings:
      Namespace Name Mixin selector
      named damage Lnet/minecraft/item/ItemStack;damage(ILnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/EquipmentSlot;)V
      intermediary method_7970 Lnet/minecraft/class_1799;method_7970(ILnet/minecraft/class_1309;Lnet/minecraft/class_1304;)V
      official a Lcxo;a(ILbwf;Lbvr;)V
    • damage

      public ItemStack damage(int amount, ItemConvertible itemAfterBreaking, LivingEntity entity, EquipmentSlot slot)
      Mappings:
      Namespace Name Mixin selector
      named damage Lnet/minecraft/item/ItemStack;damage(ILnet/minecraft/item/ItemConvertible;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/EquipmentSlot;)Lnet/minecraft/item/ItemStack;
      intermediary method_60986 Lnet/minecraft/class_1799;method_60986(ILnet/minecraft/class_1935;Lnet/minecraft/class_1309;Lnet/minecraft/class_1304;)Lnet/minecraft/class_1799;
      official a Lcxo;a(ILdhg;Lbwf;Lbvr;)Lcxo;
    • isItemBarVisible

      public boolean isItemBarVisible()
      Mappings:
      Namespace Name Mixin selector
      named isItemBarVisible Lnet/minecraft/item/ItemStack;isItemBarVisible()Z
      intermediary method_31578 Lnet/minecraft/class_1799;method_31578()Z
      official s Lcxo;s()Z
    • getItemBarStep

      public int getItemBarStep()
      Returns the length of the filled section of the durability bar in pixels (out of 13).
      Returns:
      the length of the filled section of the durability bar in pixels (out of 13)
      Mappings:
      Namespace Name Mixin selector
      named getItemBarStep Lnet/minecraft/item/ItemStack;getItemBarStep()I
      intermediary method_31579 Lnet/minecraft/class_1799;method_31579()I
      official t Lcxo;t()I
    • getItemBarColor

      public int getItemBarColor()
      Returns the color of the filled section of the durability bar.
      Returns:
      the color of the filled section of the durability bar
      Mappings:
      Namespace Name Mixin selector
      named getItemBarColor Lnet/minecraft/item/ItemStack;getItemBarColor()I
      intermediary method_31580 Lnet/minecraft/class_1799;method_31580()I
      official u Lcxo;u()I
    • onStackClicked

      public boolean onStackClicked(Slot slot, ClickType clickType, PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      named onStackClicked Lnet/minecraft/item/ItemStack;onStackClicked(Lnet/minecraft/screen/slot/Slot;Lnet/minecraft/util/ClickType;Lnet/minecraft/entity/player/PlayerEntity;)Z
      intermediary method_31575 Lnet/minecraft/class_1799;method_31575(Lnet/minecraft/class_1735;Lnet/minecraft/class_5536;Lnet/minecraft/class_1657;)Z
      official a Lcxo;a(Lcuy;Lctl;Lcpw;)Z
    • onClicked

      public boolean onClicked(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player, StackReference cursorStackReference)
      Mappings:
      Namespace Name Mixin selector
      named onClicked Lnet/minecraft/item/ItemStack;onClicked(Lnet/minecraft/item/ItemStack;Lnet/minecraft/screen/slot/Slot;Lnet/minecraft/util/ClickType;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/inventory/StackReference;)Z
      intermediary method_31576 Lnet/minecraft/class_1799;method_31576(Lnet/minecraft/class_1799;Lnet/minecraft/class_1735;Lnet/minecraft/class_5536;Lnet/minecraft/class_1657;Lnet/minecraft/class_5630;)Z
      official a Lcxo;a(Lcxo;Lcuy;Lctl;Lcpw;Lbwx;)Z
    • postHit

      public boolean postHit(LivingEntity target, LivingEntity user)
      Mappings:
      Namespace Name Mixin selector
      named postHit Lnet/minecraft/item/ItemStack;postHit(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)Z
      intermediary method_7979 Lnet/minecraft/class_1799;method_7979(Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Z
      official a Lcxo;a(Lbwf;Lbwf;)Z
    • postDamageEntity

      public void postDamageEntity(LivingEntity target, LivingEntity user)
      Mappings:
      Namespace Name Mixin selector
      named postDamageEntity Lnet/minecraft/item/ItemStack;postDamageEntity(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_59979 Lnet/minecraft/class_1799;method_59979(Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)V
      official b Lcxo;b(Lbwf;Lbwf;)V
    • postMine

      public void postMine(World world, BlockState state, BlockPos pos, PlayerEntity miner)
      Mappings:
      Namespace Name Mixin selector
      named postMine Lnet/minecraft/item/ItemStack;postMine(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;)V
      intermediary method_7952 Lnet/minecraft/class_1799;method_7952(Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;)V
      official a Lcxo;a(Ldhh;Ldxu;Ljh;Lcpw;)V
    • isSuitableFor

      public boolean isSuitableFor(BlockState state)
      Determines whether this item can be used as a suitable tool for mining the specified block.

      Depending on block implementation, when combined together, the correct item and block may achieve a better mining speed and yield drops that would not be obtained when mining otherwise.

      Returns:
      values consistent with calls to Item.isCorrectForDrops(net.minecraft.item.ItemStack, net.minecraft.block.BlockState)
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named isSuitableFor Lnet/minecraft/item/ItemStack;isSuitableFor(Lnet/minecraft/block/BlockState;)Z
      intermediary method_7951 Lnet/minecraft/class_1799;method_7951(Lnet/minecraft/class_2680;)Z
      official b Lcxo;b(Ldxu;)Z
    • useOnEntity

      public ActionResult useOnEntity(PlayerEntity user, LivingEntity entity, Hand hand)
      Mappings:
      Namespace Name Mixin selector
      named useOnEntity Lnet/minecraft/item/ItemStack;useOnEntity(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;
      intermediary method_7920 Lnet/minecraft/class_1799;method_7920(Lnet/minecraft/class_1657;Lnet/minecraft/class_1309;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;
      official a Lcxo;a(Lcpw;Lbwf;Lbth;)Lbti;
    • copy

      public ItemStack copy()
      Returns a copy of this item stack, including the item count, components, and bobbing animation time.
      Returns:
      a copy of this item stack, including the item count, components, and bobbing animation time
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named copy Lnet/minecraft/item/ItemStack;copy()Lnet/minecraft/item/ItemStack;
      intermediary method_7972 Lnet/minecraft/class_1799;method_7972()Lnet/minecraft/class_1799;
      official v Lcxo;v()Lcxo;
    • copyWithCount

      public ItemStack copyWithCount(int count)
      Returns a copy of this item stack, including the components, and bobbing animation time., with the item count set to count
      Parameters:
      count - the item count of the resultant stack
      Returns:
      a copy of this item stack, including the components, and bobbing animation time
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named copyWithCount Lnet/minecraft/item/ItemStack;copyWithCount(I)Lnet/minecraft/item/ItemStack;
      intermediary method_46651 Lnet/minecraft/class_1799;method_46651(I)Lnet/minecraft/class_1799;
      official c Lcxo;c(I)Lcxo;
    • withItem

      public ItemStack withItem(ItemConvertible item)
      Mappings:
      Namespace Name Mixin selector
      named withItem Lnet/minecraft/item/ItemStack;withItem(Lnet/minecraft/item/ItemConvertible;)Lnet/minecraft/item/ItemStack;
      intermediary method_60503 Lnet/minecraft/class_1799;method_60503(Lnet/minecraft/class_1935;)Lnet/minecraft/class_1799;
      official a Lcxo;a(Ldhg;)Lcxo;
    • copyComponentsToNewStack

      public ItemStack copyComponentsToNewStack(ItemConvertible item, int count)
      Returns a new item stack with the components copied from this item stack.
      Parameters:
      item - the item of the resultant stack
      count - the item count of the resultant stack
      Returns:
      a new item stack with the components copied from this item stack
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named copyComponentsToNewStack Lnet/minecraft/item/ItemStack;copyComponentsToNewStack(Lnet/minecraft/item/ItemConvertible;I)Lnet/minecraft/item/ItemStack;
      intermediary method_56701 Lnet/minecraft/class_1799;method_56701(Lnet/minecraft/class_1935;I)Lnet/minecraft/class_1799;
      official a Lcxo;a(Ldhg;I)Lcxo;
    • copyComponentsToNewStackIgnoreEmpty

      private ItemStack copyComponentsToNewStackIgnoreEmpty(ItemConvertible item, int count)
      Returns a new item stack with the components copied from this item stack, even if this stack is empty.
      Parameters:
      item - the item of the resultant stack
      count - the item count of the resultant stack
      Returns:
      a new item stack with the components copied from this item stack, even if this stack is empty
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named copyComponentsToNewStackIgnoreEmpty Lnet/minecraft/item/ItemStack;copyComponentsToNewStackIgnoreEmpty(Lnet/minecraft/item/ItemConvertible;I)Lnet/minecraft/item/ItemStack;
      intermediary method_56704 Lnet/minecraft/class_1799;method_56704(Lnet/minecraft/class_1935;I)Lnet/minecraft/class_1799;
      official b Lcxo;b(Ldhg;I)Lcxo;
    • areEqual

      public static boolean areEqual(ItemStack left, ItemStack right)
      Returns whether the given item stacks are equal, including the item count and components.
      Returns:
      whether the given item stacks are equal, including the item count and components
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named areEqual Lnet/minecraft/item/ItemStack;areEqual(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
      intermediary method_7973 Lnet/minecraft/class_1799;method_7973(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Z
      official a Lcxo;a(Lcxo;Lcxo;)Z
    • stacksEqual

      @Deprecated public static boolean stacksEqual(List<ItemStack> left, List<ItemStack> right)
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      named stacksEqual Lnet/minecraft/item/ItemStack;stacksEqual(Ljava/util/List;Ljava/util/List;)Z
      intermediary method_57362 Lnet/minecraft/class_1799;method_57362(Ljava/util/List;Ljava/util/List;)Z
      official a Lcxo;a(Ljava/util/List;Ljava/util/List;)Z
    • areItemsEqual

      public static boolean areItemsEqual(ItemStack left, ItemStack right)
      Returns whether the given item stacks contain the same item, regardless of item count or components.
      Returns:
      whether the given item stacks contain the same item, regardless of item count or components
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named areItemsEqual Lnet/minecraft/item/ItemStack;areItemsEqual(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
      intermediary method_7984 Lnet/minecraft/class_1799;method_7984(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Z
      official b Lcxo;b(Lcxo;Lcxo;)Z
    • areItemsAndComponentsEqual

      public static boolean areItemsAndComponentsEqual(ItemStack stack, ItemStack otherStack)
      Returns whether the given item stacks' items and components are equal.

      If this returns true, the two item stacks can be combined into one, as long as the resulting item count does not exceed the maximum item count

      Returns:
      whether the given item stacks' items and components are equal
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named areItemsAndComponentsEqual Lnet/minecraft/item/ItemStack;areItemsAndComponentsEqual(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
      intermediary method_31577 Lnet/minecraft/class_1799;method_31577(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Z
      official c Lcxo;c(Lcxo;Lcxo;)Z
    • createOptionalCodec

      public static com.mojang.serialization.MapCodec<ItemStack> createOptionalCodec(String fieldName)
      Mappings:
      Namespace Name Mixin selector
      named createOptionalCodec Lnet/minecraft/item/ItemStack;createOptionalCodec(Ljava/lang/String;)Lcom/mojang/serialization/MapCodec;
      intermediary method_56702 Lnet/minecraft/class_1799;method_56702(Ljava/lang/String;)Lcom/mojang/serialization/MapCodec;
      official a Lcxo;a(Ljava/lang/String;)Lcom/mojang/serialization/MapCodec;
    • hashCode

      public static int hashCode(@Nullable @Nullable ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named hashCode Lnet/minecraft/item/ItemStack;hashCode(Lnet/minecraft/item/ItemStack;)I
      intermediary method_57355 Lnet/minecraft/class_1799;method_57355(Lnet/minecraft/class_1799;)I
      official a Lcxo;a(Lcxo;)I
    • listHashCode

      @Deprecated public static int listHashCode(List<ItemStack> stacks)
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      named listHashCode Lnet/minecraft/item/ItemStack;listHashCode(Ljava/util/List;)I
      intermediary method_57361 Lnet/minecraft/class_1799;method_57361(Ljava/util/List;)I
      official a Lcxo;a(Ljava/util/List;)I
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • inventoryTick

      public void inventoryTick(World world, Entity entity, int slot, boolean selected)
      Mappings:
      Namespace Name Mixin selector
      named inventoryTick Lnet/minecraft/item/ItemStack;inventoryTick(Lnet/minecraft/world/World;Lnet/minecraft/entity/Entity;IZ)V
      intermediary method_7917 Lnet/minecraft/class_1799;method_7917(Lnet/minecraft/class_1937;Lnet/minecraft/class_1297;IZ)V
      official a Lcxo;a(Ldhh;Lbvj;IZ)V
    • onCraftByPlayer

      public void onCraftByPlayer(World world, PlayerEntity player, int amount)
      Mappings:
      Namespace Name Mixin selector
      named onCraftByPlayer Lnet/minecraft/item/ItemStack;onCraftByPlayer(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;I)V
      intermediary method_7982 Lnet/minecraft/class_1799;method_7982(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;I)V
      official a Lcxo;a(Ldhh;Lcpw;I)V
    • onCraftByCrafter

      public void onCraftByCrafter(World world)
      Mappings:
      Namespace Name Mixin selector
      named onCraftByCrafter Lnet/minecraft/item/ItemStack;onCraftByCrafter(Lnet/minecraft/world/World;)V
      intermediary method_54466 Lnet/minecraft/class_1799;method_54466(Lnet/minecraft/class_1937;)V
      official a Lcxo;a(Ldhh;)V
    • getMaxUseTime

      public int getMaxUseTime(LivingEntity user)
      Mappings:
      Namespace Name Mixin selector
      named getMaxUseTime Lnet/minecraft/item/ItemStack;getMaxUseTime(Lnet/minecraft/entity/LivingEntity;)I
      intermediary method_7935 Lnet/minecraft/class_1799;method_7935(Lnet/minecraft/class_1309;)I
      official a Lcxo;a(Lbwf;)I
    • getUseAction

      public UseAction getUseAction()
      Mappings:
      Namespace Name Mixin selector
      named getUseAction Lnet/minecraft/item/ItemStack;getUseAction()Lnet/minecraft/item/consume/UseAction;
      intermediary method_7976 Lnet/minecraft/class_1799;method_7976()Lnet/minecraft/class_1839;
      official w Lcxo;w()Lcxq;
    • onStoppedUsing

      public void onStoppedUsing(World world, LivingEntity user, int remainingUseTicks)
      Mappings:
      Namespace Name Mixin selector
      named onStoppedUsing Lnet/minecraft/item/ItemStack;onStoppedUsing(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;I)V
      intermediary method_7930 Lnet/minecraft/class_1799;method_7930(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;I)V
      official a Lcxo;a(Ldhh;Lbwf;I)V
    • isUsedOnRelease

      public boolean isUsedOnRelease()
      Mappings:
      Namespace Name Mixin selector
      named isUsedOnRelease Lnet/minecraft/item/ItemStack;isUsedOnRelease()Z
      intermediary method_7967 Lnet/minecraft/class_1799;method_7967()Z
      official x Lcxo;x()Z
    • set

      @Nullable public <T> T set(ComponentType<? super T> type, @Nullable T value)
      Sets the component type for this item stack to value.

      If value is null, the component is removed and the base component is unset. To reverse the stack-specific change, instead pass the default value as value.

      Returns:
      the previous value set
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named set Lnet/minecraft/item/ItemStack;set(Lnet/minecraft/component/ComponentType;Ljava/lang/Object;)Ljava/lang/Object;
      intermediary method_57379 Lnet/minecraft/class_1799;method_57379(Lnet/minecraft/class_9331;Ljava/lang/Object;)Ljava/lang/Object;
      official b Lcxo;b(Lkt;Ljava/lang/Object;)Ljava/lang/Object;
    • apply

      @Nullable public <T, U> T apply(ComponentType<T> type, T defaultValue, U change, BiFunction<T,U,T> applier)
      Sets the component type by passing the current value and change to applier, then setting its return value as the value. If the component is missing, defaultValue is used as the default.

      In practice, applier is a reference to a method of the component class with one parameter, that returns a new instance of the component with the specific value changed to change. For example, adding a lore can be accomplished by passing reference to LoreComponent.with(net.minecraft.text.Text) and the added lore, like stack.apply(DataComponentTypes.LORE, LoreComponent.DEFAULT, text, LoreComponent::with).

      Returns:
      the previous value set
      See Also:
      Implementation Note:
      This is the same as setting applier.apply(stack.getOrDefault(type, defaultValue), change).
      Mappings:
      Namespace Name Mixin selector
      named apply Lnet/minecraft/item/ItemStack;apply(Lnet/minecraft/component/ComponentType;Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;
      intermediary method_57367 Lnet/minecraft/class_1799;method_57367(Lnet/minecraft/class_9331;Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;
      official a Lcxo;a(Lkt;Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;
    • apply

      @Nullable public <T> T apply(ComponentType<T> type, T defaultValue, UnaryOperator<T> applier)
      Sets the component type by passing the current value (or defaultValue if the component is missing) to applier and then setting its return value as the value.
      Returns:
      the previous value set
      See Also:
      Implementation Note:
      This is the same as setting applier.apply(stack.getOrDefault(type, defaultValue)).
      Mappings:
      Namespace Name Mixin selector
      named apply Lnet/minecraft/item/ItemStack;apply(Lnet/minecraft/component/ComponentType;Ljava/lang/Object;Ljava/util/function/UnaryOperator;)Ljava/lang/Object;
      intermediary method_57368 Lnet/minecraft/class_1799;method_57368(Lnet/minecraft/class_9331;Ljava/lang/Object;Ljava/util/function/UnaryOperator;)Ljava/lang/Object;
      official a Lcxo;a(Lkt;Ljava/lang/Object;Ljava/util/function/UnaryOperator;)Ljava/lang/Object;
    • remove

      @Nullable public <T> T remove(ComponentType<? extends T> type)
      Removes the component type. If it is in the stack's base component, it is unset and the component becomes missing. To reverse the stack-specific change, instead pass the default value as value.
      Returns:
      the previous value set
      Mappings:
      Namespace Name Mixin selector
      named remove Lnet/minecraft/item/ItemStack;remove(Lnet/minecraft/component/ComponentType;)Ljava/lang/Object;
      intermediary method_57381 Lnet/minecraft/class_1799;method_57381(Lnet/minecraft/class_9331;)Ljava/lang/Object;
      official c Lcxo;c(Lkt;)Ljava/lang/Object;
    • applyChanges

      public void applyChanges(ComponentChanges changes)
      Mappings:
      Namespace Name Mixin selector
      named applyChanges Lnet/minecraft/item/ItemStack;applyChanges(Lnet/minecraft/component/ComponentChanges;)V
      intermediary method_59692 Lnet/minecraft/class_1799;method_59692(Lnet/minecraft/class_9326;)V
      official a Lcxo;a(Lkr;)V
    • applyUnvalidatedChanges

      public void applyUnvalidatedChanges(ComponentChanges changes)
      Mappings:
      Namespace Name Mixin selector
      named applyUnvalidatedChanges Lnet/minecraft/item/ItemStack;applyUnvalidatedChanges(Lnet/minecraft/component/ComponentChanges;)V
      intermediary method_57366 Lnet/minecraft/class_1799;method_57366(Lnet/minecraft/class_9326;)V
      official b Lcxo;b(Lkr;)V
    • applyComponentsFrom

      public void applyComponentsFrom(ComponentMap components)
      Mappings:
      Namespace Name Mixin selector
      named applyComponentsFrom Lnet/minecraft/item/ItemStack;applyComponentsFrom(Lnet/minecraft/component/ComponentMap;)V
      intermediary method_57365 Lnet/minecraft/class_1799;method_57365(Lnet/minecraft/class_9323;)V
      official b Lcxo;b(Lkq;)V
    • getName

      public Text getName()
      Returns the custom name of the stack if it exists, or the item's name.
      Returns:
      the custom name of the stack if it exists, or the item's name
      Mappings:
      Namespace Name Mixin selector
      named getName Lnet/minecraft/item/ItemStack;getName()Lnet/minecraft/text/Text;
      intermediary method_7964 Lnet/minecraft/class_1799;method_7964()Lnet/minecraft/class_2561;
      official y Lcxo;y()Lxv;
    • getItemName

      public Text getItemName()
      Mappings:
      Namespace Name Mixin selector
      named getItemName Lnet/minecraft/item/ItemStack;getItemName()Lnet/minecraft/text/Text;
      intermediary method_63693 Lnet/minecraft/class_1799;method_63693()Lnet/minecraft/class_2561;
      official z Lcxo;z()Lxv;
    • getFormattedName

      public Text getFormattedName()
      Mappings:
      Namespace Name Mixin selector
      named getFormattedName Lnet/minecraft/item/ItemStack;getFormattedName()Lnet/minecraft/text/Text;
      intermediary method_63015 Lnet/minecraft/class_1799;method_63015()Lnet/minecraft/class_2561;
      official A Lcxo;A()Lxv;
    • appendTooltip

      private <T extends TooltipAppender> void appendTooltip(ComponentType<T> componentType, Item.TooltipContext context, Consumer<Text> textConsumer, TooltipType type)
      Mappings:
      Namespace Name Mixin selector
      named appendTooltip Lnet/minecraft/item/ItemStack;appendTooltip(Lnet/minecraft/component/ComponentType;Lnet/minecraft/item/Item$TooltipContext;Ljava/util/function/Consumer;Lnet/minecraft/item/tooltip/TooltipType;)V
      intermediary method_57369 Lnet/minecraft/class_1799;method_57369(Lnet/minecraft/class_9331;Lnet/minecraft/class_1792$class_9635;Ljava/util/function/Consumer;Lnet/minecraft/class_1836;)V
      official a Lcxo;a(Lkt;Lcxk$b;Ljava/util/function/Consumer;Lczg;)V
    • getTooltip

      public List<Text> getTooltip(Item.TooltipContext context, @Nullable @Nullable PlayerEntity player, TooltipType type)
      Mappings:
      Namespace Name Mixin selector
      named getTooltip Lnet/minecraft/item/ItemStack;getTooltip(Lnet/minecraft/item/Item$TooltipContext;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/tooltip/TooltipType;)Ljava/util/List;
      intermediary method_7950 Lnet/minecraft/class_1799;method_7950(Lnet/minecraft/class_1792$class_9635;Lnet/minecraft/class_1657;Lnet/minecraft/class_1836;)Ljava/util/List;
      official a Lcxo;a(Lcxk$b;Lcpw;Lczg;)Ljava/util/List;
    • appendAttributeModifiersTooltip

      private void appendAttributeModifiersTooltip(Consumer<Text> textConsumer, @Nullable @Nullable PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      named appendAttributeModifiersTooltip Lnet/minecraft/item/ItemStack;appendAttributeModifiersTooltip(Ljava/util/function/Consumer;Lnet/minecraft/entity/player/PlayerEntity;)V
      intermediary method_57363 Lnet/minecraft/class_1799;method_57363(Ljava/util/function/Consumer;Lnet/minecraft/class_1657;)V
      official a Lcxo;a(Ljava/util/function/Consumer;Lcpw;)V
    • appendAttributeModifierTooltip

      private void appendAttributeModifierTooltip(Consumer<Text> textConsumer, @Nullable @Nullable PlayerEntity player, RegistryEntry<EntityAttribute> attribute, EntityAttributeModifier modifier)
      Mappings:
      Namespace Name Mixin selector
      named appendAttributeModifierTooltip Lnet/minecraft/item/ItemStack;appendAttributeModifierTooltip(Ljava/util/function/Consumer;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/entity/attribute/EntityAttributeModifier;)V
      intermediary method_57364 Lnet/minecraft/class_1799;method_57364(Ljava/util/function/Consumer;Lnet/minecraft/class_1657;Lnet/minecraft/class_6880;Lnet/minecraft/class_1322;)V
      official a Lcxo;a(Ljava/util/function/Consumer;Lcpw;Ljq;Lbxl;)V
    • hasGlint

      public boolean hasGlint()
      Mappings:
      Namespace Name Mixin selector
      named hasGlint Lnet/minecraft/item/ItemStack;hasGlint()Z
      intermediary method_7958 Lnet/minecraft/class_1799;method_7958()Z
      official B Lcxo;B()Z
    • getRarity

      public Rarity getRarity()
      Mappings:
      Namespace Name Mixin selector
      named getRarity Lnet/minecraft/item/ItemStack;getRarity()Lnet/minecraft/util/Rarity;
      intermediary method_7932 Lnet/minecraft/class_1799;method_7932()Lnet/minecraft/class_1814;
      official C Lcxo;C()Lcyl;
    • isEnchantable

      public boolean isEnchantable()
      Returns whether this item stack can be enchanted with an enchanting table.

      This is not used for other methods of enchanting like anvils.

      Returns:
      whether this item stack can be enchanted with an enchanting table
      Mappings:
      Namespace Name Mixin selector
      named isEnchantable Lnet/minecraft/item/ItemStack;isEnchantable()Z
      intermediary method_7923 Lnet/minecraft/class_1799;method_7923()Z
      official D Lcxo;D()Z
    • addEnchantment

      public void addEnchantment(RegistryEntry<Enchantment> enchantment, int level)
      Enchants this item with the given enchantment and level.

      This should not be used with enchanted books, as the book itself is not enchanted and therefore does not store enchantments under DataComponentTypes.ENCHANTMENTS.

      See Also:
      Mappings:
      Namespace Name Mixin selector
      named addEnchantment Lnet/minecraft/item/ItemStack;addEnchantment(Lnet/minecraft/registry/entry/RegistryEntry;I)V
      intermediary method_7978 Lnet/minecraft/class_1799;method_7978(Lnet/minecraft/class_6880;I)V
      official a Lcxo;a(Ljq;I)V
    • hasEnchantments

      public boolean hasEnchantments()
      Returns whether the item stack has any enchantments.

      This will return false for enchanted books, as the book itself is not enchanted and therefore does not store enchantments under DataComponentTypes.ENCHANTMENTS.

      Returns:
      whether the item stack has any enchantments
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named hasEnchantments Lnet/minecraft/item/ItemStack;hasEnchantments()Z
      intermediary method_7942 Lnet/minecraft/class_1799;method_7942()Z
      official E Lcxo;E()Z
    • getEnchantments

      public ItemEnchantmentsComponent getEnchantments()
      Mappings:
      Namespace Name Mixin selector
      named getEnchantments Lnet/minecraft/item/ItemStack;getEnchantments()Lnet/minecraft/component/type/ItemEnchantmentsComponent;
      intermediary method_58657 Lnet/minecraft/class_1799;method_58657()Lnet/minecraft/class_9304;
      official F Lcxo;F()Ldee;
    • isInFrame

      public boolean isInFrame()
      Returns whether the item stack is in an item frame.
      Returns:
      whether the item stack is in an item frame
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named isInFrame Lnet/minecraft/item/ItemStack;isInFrame()Z
      intermediary method_7961 Lnet/minecraft/class_1799;method_7961()Z
      official G Lcxo;G()Z
    • setHolder

      public void setHolder(@Nullable @Nullable Entity holder)
      Sets the stack's holder to holder.

      This is used by item frames and item entities, and does not need to be called for other entities.

      See Also:
      Mappings:
      Namespace Name Mixin selector
      named setHolder Lnet/minecraft/item/ItemStack;setHolder(Lnet/minecraft/entity/Entity;)V
      intermediary method_27320 Lnet/minecraft/class_1799;method_27320(Lnet/minecraft/class_1297;)V
      official a Lcxo;a(Lbvj;)V
    • getFrame

      @Nullable public @Nullable ItemFrameEntity getFrame()
      Returns the item frame that holds the stack, or null if inapplicable.
      Returns:
      the item frame that holds the stack, or null if inapplicable
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getFrame Lnet/minecraft/item/ItemStack;getFrame()Lnet/minecraft/entity/decoration/ItemFrameEntity;
      intermediary method_7945 Lnet/minecraft/class_1799;method_7945()Lnet/minecraft/class_1533;
      official H Lcxo;H()Lclt;
    • getHolder

      @Nullable public @Nullable Entity getHolder()
      Returns the entity that holds the stack, or null if inapplicable.
      Returns:
      the entity that holds the stack, or null if inapplicable
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getHolder Lnet/minecraft/item/ItemStack;getHolder()Lnet/minecraft/entity/Entity;
      intermediary method_27319 Lnet/minecraft/class_1799;method_27319()Lnet/minecraft/class_1297;
      official I Lcxo;I()Lbvj;
    • applyAttributeModifier

      public void applyAttributeModifier(AttributeModifierSlot slot, BiConsumer<RegistryEntry<EntityAttribute>,EntityAttributeModifier> attributeModifierConsumer)
      Mappings:
      Namespace Name Mixin selector
      named applyAttributeModifier Lnet/minecraft/item/ItemStack;applyAttributeModifier(Lnet/minecraft/component/type/AttributeModifierSlot;Ljava/util/function/BiConsumer;)V
      intermediary method_60617 Lnet/minecraft/class_1799;method_60617(Lnet/minecraft/class_9274;Ljava/util/function/BiConsumer;)V
      official a Lcxo;a(Lbvs;Ljava/util/function/BiConsumer;)V
    • applyAttributeModifiers

      public void applyAttributeModifiers(EquipmentSlot slot, BiConsumer<RegistryEntry<EntityAttribute>,EntityAttributeModifier> attributeModifierConsumer)
      Mappings:
      Namespace Name Mixin selector
      named applyAttributeModifiers Lnet/minecraft/item/ItemStack;applyAttributeModifiers(Lnet/minecraft/entity/EquipmentSlot;Ljava/util/function/BiConsumer;)V
      intermediary method_57354 Lnet/minecraft/class_1799;method_57354(Lnet/minecraft/class_1304;Ljava/util/function/BiConsumer;)V
      official a Lcxo;a(Lbvr;Ljava/util/function/BiConsumer;)V
    • toHoverableText

      public Text toHoverableText()
      Returns a text consisting of the bracketed stack name that can be hovered to show the item stack's tooltip.
      Returns:
      a text consisting of the bracketed stack name that can be hovered to show the item stack's tooltip
      Mappings:
      Namespace Name Mixin selector
      named toHoverableText Lnet/minecraft/item/ItemStack;toHoverableText()Lnet/minecraft/text/Text;
      intermediary method_7954 Lnet/minecraft/class_1799;method_7954()Lnet/minecraft/class_2561;
      official J Lcxo;J()Lxv;
    • canPlaceOn

      public boolean canPlaceOn(CachedBlockPosition pos)
      Mappings:
      Namespace Name Mixin selector
      named canPlaceOn Lnet/minecraft/item/ItemStack;canPlaceOn(Lnet/minecraft/block/pattern/CachedBlockPosition;)Z
      intermediary method_57357 Lnet/minecraft/class_1799;method_57357(Lnet/minecraft/class_2694;)Z
      official a Lcxo;a(Ldxy;)Z
    • canBreak

      public boolean canBreak(CachedBlockPosition pos)
      Mappings:
      Namespace Name Mixin selector
      named canBreak Lnet/minecraft/item/ItemStack;canBreak(Lnet/minecraft/block/pattern/CachedBlockPosition;)Z
      intermediary method_57373 Lnet/minecraft/class_1799;method_57373(Lnet/minecraft/class_2694;)Z
      official b Lcxo;b(Ldxy;)Z
    • getBobbingAnimationTime

      public int getBobbingAnimationTime()
      Mappings:
      Namespace Name Mixin selector
      named getBobbingAnimationTime Lnet/minecraft/item/ItemStack;getBobbingAnimationTime()I
      intermediary method_7965 Lnet/minecraft/class_1799;method_7965()I
      official K Lcxo;K()I
    • setBobbingAnimationTime

      public void setBobbingAnimationTime(int bobbingAnimationTime)
      Mappings:
      Namespace Name Mixin selector
      named setBobbingAnimationTime Lnet/minecraft/item/ItemStack;setBobbingAnimationTime(I)V
      intermediary method_7912 Lnet/minecraft/class_1799;method_7912(I)V
      official d Lcxo;d(I)V
    • getCount

      public int getCount()
      Returns the count of items in this item stack.
      Returns:
      the count of items in this item stack
      Mappings:
      Namespace Name Mixin selector
      named getCount Lnet/minecraft/item/ItemStack;getCount()I
      intermediary method_7947 Lnet/minecraft/class_1799;method_7947()I
      official L Lcxo;L()I
    • setCount

      public void setCount(int count)
      Sets the count of items in this item stack.
      Parameters:
      count - the count of items
      Mappings:
      Namespace Name Mixin selector
      named setCount Lnet/minecraft/item/ItemStack;setCount(I)V
      intermediary method_7939 Lnet/minecraft/class_1799;method_7939(I)V
      official e Lcxo;e(I)V
    • capCount

      public void capCount(int maxCount)
      Sets the count of items in this item stack to not exceed maxCount.
      Mappings:
      Namespace Name Mixin selector
      named capCount Lnet/minecraft/item/ItemStack;capCount(I)V
      intermediary method_58408 Lnet/minecraft/class_1799;method_58408(I)V
      official f Lcxo;f(I)V
    • increment

      public void increment(int amount)
      Increments the count of items in this item stack.
      Parameters:
      amount - the amount to increment
      Mappings:
      Namespace Name Mixin selector
      named increment Lnet/minecraft/item/ItemStack;increment(I)V
      intermediary method_7933 Lnet/minecraft/class_1799;method_7933(I)V
      official g Lcxo;g(I)V
    • decrement

      public void decrement(int amount)
      Decrements the count of items in this item stack.
      Parameters:
      amount - the amount to decrement
      Mappings:
      Namespace Name Mixin selector
      named decrement Lnet/minecraft/item/ItemStack;decrement(I)V
      intermediary method_7934 Lnet/minecraft/class_1799;method_7934(I)V
      official h Lcxo;h(I)V
    • decrementUnlessCreative

      public void decrementUnlessCreative(int amount, @Nullable @Nullable LivingEntity entity)
      Decrements the count of items in this item stack, unless entity is a creative mode player.
      Mappings:
      Namespace Name Mixin selector
      named decrementUnlessCreative Lnet/minecraft/item/ItemStack;decrementUnlessCreative(ILnet/minecraft/entity/LivingEntity;)V
      intermediary method_57008 Lnet/minecraft/class_1799;method_57008(ILnet/minecraft/class_1309;)V
      official a Lcxo;a(ILbwf;)V
    • splitUnlessCreative

      public ItemStack splitUnlessCreative(int amount, @Nullable @Nullable LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      named splitUnlessCreative Lnet/minecraft/item/ItemStack;splitUnlessCreative(ILnet/minecraft/entity/LivingEntity;)Lnet/minecraft/item/ItemStack;
      intermediary method_60504 Lnet/minecraft/class_1799;method_60504(ILnet/minecraft/class_1309;)Lnet/minecraft/class_1799;
      official b Lcxo;b(ILbwf;)Lcxo;
    • usageTick

      public void usageTick(World world, LivingEntity user, int remainingUseTicks)
      Mappings:
      Namespace Name Mixin selector
      named usageTick Lnet/minecraft/item/ItemStack;usageTick(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;I)V
      intermediary method_7949 Lnet/minecraft/class_1799;method_7949(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;I)V
      official b Lcxo;b(Ldhh;Lbwf;I)V
    • onItemEntityDestroyed

      public void onItemEntityDestroyed(ItemEntity entity)
      Mappings:
      Namespace Name Mixin selector
      named onItemEntityDestroyed Lnet/minecraft/item/ItemStack;onItemEntityDestroyed(Lnet/minecraft/entity/ItemEntity;)V
      intermediary method_33262 Lnet/minecraft/class_1799;method_33262(Lnet/minecraft/class_1542;)V
      official a Lcxo;a(Lcma;)V
    • getBreakSound

      public SoundEvent getBreakSound()
      Mappings:
      Namespace Name Mixin selector
      named getBreakSound Lnet/minecraft/item/ItemStack;getBreakSound()Lnet/minecraft/sound/SoundEvent;
      intermediary method_57351 Lnet/minecraft/class_1799;method_57351()Lnet/minecraft/class_3414;
      official M Lcxo;M()Laxe;
    • takesDamageFrom

      public boolean takesDamageFrom(DamageSource source)
      Mappings:
      Namespace Name Mixin selector
      named takesDamageFrom Lnet/minecraft/item/ItemStack;takesDamageFrom(Lnet/minecraft/entity/damage/DamageSource;)Z
      intermediary method_58407 Lnet/minecraft/class_1799;method_58407(Lnet/minecraft/class_1282;)Z
      official a Lcxo;a(Lbtz;)Z
    • canRepairWith

      public boolean canRepairWith(ItemStack ingredient)
      Mappings:
      Namespace Name Mixin selector
      named canRepairWith Lnet/minecraft/item/ItemStack;canRepairWith(Lnet/minecraft/item/ItemStack;)Z
      intermediary method_61655 Lnet/minecraft/class_1799;method_61655(Lnet/minecraft/class_1799;)Z
      official b Lcxo;b(Lcxo;)Z