Class ItemStack
- All Implemented Interfaces:
ComponentHolder,ComponentsAccess
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<T>, T) or remove(net.minecraft.component.ComponentType<? extends T>) to set the components.
NBT serialization
An Item Stack can be serialized with toNbt(RegistryWrapper.WrapperLookup), and deserialized with fromNbt(RegistryWrapper.WrapperLookup, NbtCompound).
| Key | Type | Purpose |
|---|---|---|
id | NbtString | The identifier of the item. |
count | NbtInt | The count of items in the stack. |
components | ComponentChanges | The item stack's components. |
- Mappings:
Namespace Name named net/minecraft/item/ItemStackintermediary net/minecraft/class_1799official dak
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intstatic final com.mojang.serialization.Codec<ItemStack> (package private) final MergedComponentMapprivate intprivate static final Textstatic final ItemStackThe empty item stack that holds no item.Deprecated.static final PacketCodec<RegistryByteBuf, ItemStack> private static final Loggerstatic final com.mojang.serialization.MapCodec<ItemStack> static final com.mojang.serialization.Codec<ItemStack> static final PacketCodec<RegistryByteBuf, List<ItemStack>> static final PacketCodec<RegistryByteBuf, ItemStack> static final PacketCodec<RegistryByteBuf, ItemStack> static final com.mojang.serialization.Codec<ItemStack> private static final Textstatic final com.mojang.serialization.Codec<ItemStack> static final com.mojang.serialization.Codec<ItemStack> static final com.mojang.serialization.Codec<ItemStack> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateItemStack(ItemConvertible item) ItemStack(ItemConvertible item, int count) privateItemStack(ItemConvertible item, int count, MergedComponentMap components) ItemStack(RegistryEntry<Item> entry) ItemStack(RegistryEntry<Item> itemEntry, int count) ItemStack(RegistryEntry<Item> item, int count, ComponentChanges changes) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEnchantment(RegistryEntry<Enchantment> enchantment, int level) Enchants this item with the given enchantment and level.private voidappendAttributeModifiersTooltip(Consumer<Text> textConsumer, TooltipDisplayComponent displayComponent, @Nullable PlayerEntity player) private voidappendAttributeModifierTooltip(Consumer<Text> textConsumer, @Nullable PlayerEntity player, RegistryEntry<EntityAttribute> attribute, EntityAttributeModifier modifier) <T extends TooltipAppender>
voidappendComponentTooltip(ComponentType<T> componentType, Item.TooltipContext context, TooltipDisplayComponent displayComponent, Consumer<Text> textConsumer, TooltipType type) voidappendTooltip(Item.TooltipContext context, TooltipDisplayComponent displayComponent, @Nullable PlayerEntity player, TooltipType type, Consumer<Text> textConsumer) <T> Tapply(ComponentType<T> type, T defaultValue, UnaryOperator<T> applier) Sets the componenttypeby passing the current value (ordefaultValueif the component is missing) toapplierand then setting its return value as the value.<T,U> T apply(ComponentType<T> type, T defaultValue, U change, BiFunction<T, U, T> applier) Sets the componenttypeby passing the current value andchangetoapplier, then setting its return value as the value.voidapplyAttributeModifier(AttributeModifierSlot slot, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> attributeModifierConsumer) voidapplyAttributeModifiers(EquipmentSlot slot, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> attributeModifierConsumer) voidapplyChanges(ComponentChanges changes) voidapplyComponentsFrom(ComponentMap components) private ItemStackapplyRemainderAndCooldown(LivingEntity user, ItemStack stack) voidapplyUnvalidatedChanges(ComponentChanges changes) static booleanReturns whether the given item stacks are equal, including the item count and components.static booleanareItemsAndComponentsEqual(ItemStack stack, ItemStack otherStack) Returns whether the given item stacks' items and components are equal.static booleanareItemsEqual(ItemStack left, ItemStack right) Returns whether the given item stacks contain the same item, regardless of item count or components.private intcalculateDamage(int baseDamage, ServerWorld world, @Nullable ServerPlayerEntity player) booleanbooleancanMine(BlockState state, World world, BlockPos pos, PlayerEntity player) booleanbooleancanRepairWith(ItemStack ingredient) voidcapCount(int maxCount) Sets the count of items in this item stack to not exceedmaxCount.copy()Returns a copy of this item stack, including the item count, components, and bobbing animation time.<T> voidcopy(ComponentType<T> type, ComponentsAccess from) copyComponentsToNewStack(ItemConvertible item, int count) Returns a new item stack with the components copied from this item stack.private ItemStackcopyComponentsToNewStackIgnoreEmpty(ItemConvertible item, int count) Returns a new item stack with the components copied from this item stack, even if this stack is empty.copyWithCount(int count) Returns a copy of this item stack, including the components, and bobbing animation time.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.static com.mojang.serialization.MapCodec<ItemStack> createOptionalCodec(String fieldName) private static PacketCodec<RegistryByteBuf, ItemStack> createOptionalPacketCodec(PacketCodec<RegistryByteBuf, ComponentChanges> componentsPacketCodec) voiddamage(int amount, LivingEntity entity, EquipmentSlot slot) Damages this item stack.voiddamage(int amount, PlayerEntity player) damage(int amount, ItemConvertible itemAfterBreaking, LivingEntity entity, EquipmentSlot slot) voiddamage(int amount, ServerWorld world, @Nullable ServerPlayerEntity player, Consumer<Item> breakCallback) Damages this item stack.voiddecrement(int amount) Decrements the count of items in this item stack.voiddecrementUnlessCreative(int amount, @Nullable LivingEntity entity) Decrements the count of items in this item stack, unlessentityis a creative mode player.finishUsing(World world, LivingEntity user) fromNbt(RegistryWrapper.WrapperLookup registries, NbtElement nbt) intintgetCount()Returns the count of items in this item stack.Returns the custom name or book title of the stack if it exists, ornull.intReturns the damage (lost durability) of the item stack.getFrame()Returns the item frame that holds the stack, ornullif inapplicable.Returns the entity that holds the stack, ornullif inapplicable.getItem()Returns the item of this stack.intReturns the color of the filled section of the durability bar.intReturns the length of the filled section of the durability bar in pixels (out of 13).intintintgetMaxUseTime(LivingEntity user) floatgetName()Returns the custom name of the stack if it exists, or the item's name.getTooltip(Item.TooltipContext context, @Nullable PlayerEntity player, TooltipType type) booleanhasChangedComponent(ComponentType<?> type) booleanReturns whether the item stack has any enchantments.booleanhasGlint()static intvoidincrement(int amount) Increments the count of items in this item stack.voidinventoryTick(World world, Entity entity, @Nullable EquipmentSlot slot) booleanReturns whether the item can be damaged (lose durability).booleanReturns whether the item stack is damageable and has damage.booleanisEmpty()Returns whether this item stack is empty.booleanReturns whether this item stack can be enchanted with an enchanting table.booleanisIn(RegistryEntryList<Item> registryEntryList) booleanReturns whether the item is intag.booleanReturns whether the item stack is in an item frame.booleanbooleanisItemEnabled(FeatureSet enabledFeatures) booleanReturns whether the item isitem.booleanReturns whether the item stack can have item count above1.booleanisSuitableFor(BlockState state) Determines whether this item can be used as a suitable tool for mining the specified block.booleanbooleanitemMatches(Predicate<RegistryEntry<Item>> predicate) Returns whether the item's registry entry passes thepredicate.booleanitemMatches(RegistryEntry<Item> itemEntry) Returns whether the item's registry entry matchesitemEntry.static intlistHashCode(List<ItemStack> stacks) Deprecated.booleanonClicked(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player, StackReference cursorStackReference) voidonCraftByCrafter(World world) voidonCraftByPlayer(PlayerEntity playerEntity, int int2) private voidonDurabilityChange(int damage, @Nullable ServerPlayerEntity player, Consumer<Item> breakCallback) voidonItemEntityDestroyed(ItemEntity entity) booleanonStackClicked(Slot slot, ClickType clickType, PlayerEntity player) voidonStoppedUsing(World world, LivingEntity user, int remainingUseTicks) voidpostDamageEntity(LivingEntity target, LivingEntity user) booleanpostHit(LivingEntity target, LivingEntity user) voidpostMine(World world, BlockState state, BlockPos pos, PlayerEntity miner) <T> Tremove(ComponentType<? extends T> type) Removes the componenttype.<T> Tset(ComponentType<T> type, T value) Sets the componenttypefor this item stack tovalue.voidsetBobbingAnimationTime(int bobbingAnimationTime) voidsetCount(int count) Sets the count of items in this item stack.voidsetDamage(int damage) Sets the stack's damage todamage.voidSets the stack's holder toholder.booleansplit(int amount) Returns the copy of the stack "split" from the current stack with item count being at mostamount.splitUnlessCreative(int amount, @Nullable LivingEntity entity) static booleanstacksEqual(List<ItemStack> left, List<ItemStack> right) Deprecated.Returns a stream of all tags the item is in.booleantakesDamageFrom(DamageSource source) Returns a text consisting of the bracketed stack name that can be hovered to show the item stack's tooltip.toNbt(RegistryWrapper.WrapperLookup registries) toNbt(RegistryWrapper.WrapperLookup registries, NbtElement prefix) toString()voidusageTick(World world, LivingEntity user, int remainingUseTicks) use(World world, PlayerEntity user, Hand hand) useOnBlock(ItemUsageContext context) useOnEntity(PlayerEntity user, LivingEntity entity, Hand hand) static com.mojang.serialization.DataResult<ItemStack> static com.mojang.serialization.DataResult<Unit> validateComponents(ComponentMap components) booleanwithItem(ItemConvertible item) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.component.ComponentHolder
contains, get, getOrDefault, streamAllMethods inherited from interface net.minecraft.component.ComponentsAccess
getTyped
-
Field Details
-
OPERATOR_WARNINGS
- Mappings:
Namespace Name Mixin selector named OPERATOR_WARNINGSLnet/minecraft/item/ItemStack;OPERATOR_WARNINGS:Ljava/util/List;intermediary field_55546Lnet/minecraft/class_1799;field_55546:Ljava/util/List;official mLdak;m:Ljava/util/List;
-
UNBREAKABLE_TEXT
- Mappings:
Namespace Name Mixin selector named UNBREAKABLE_TEXTLnet/minecraft/item/ItemStack;UNBREAKABLE_TEXT:Lnet/minecraft/text/Text;intermediary field_56297Lnet/minecraft/class_1799;field_56297:Lnet/minecraft/class_2561;official nLdak;n:Lxg;
-
MAP_CODEC
- Mappings:
Namespace Name Mixin selector named MAP_CODECLnet/minecraft/item/ItemStack;MAP_CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_55709Lnet/minecraft/class_1799;field_55709:Lcom/mojang/serialization/MapCodec;official aLdak;a:Lcom/mojang/serialization/MapCodec;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/item/ItemStack;CODEC:Lcom/mojang/serialization/Codec;intermediary field_24671Lnet/minecraft/class_1799;field_24671:Lcom/mojang/serialization/Codec;official bLdak;b:Lcom/mojang/serialization/Codec;
-
UNCOUNTED_CODEC
- Mappings:
Namespace Name Mixin selector named UNCOUNTED_CODECLnet/minecraft/item/ItemStack;UNCOUNTED_CODEC:Lcom/mojang/serialization/Codec;intermediary field_49747Lnet/minecraft/class_1799;field_49747:Lcom/mojang/serialization/Codec;official cLdak;c:Lcom/mojang/serialization/Codec;
-
VALIDATED_CODEC
- Mappings:
Namespace Name Mixin selector named VALIDATED_CODECLnet/minecraft/item/ItemStack;VALIDATED_CODEC:Lcom/mojang/serialization/Codec;intermediary field_51397Lnet/minecraft/class_1799;field_51397:Lcom/mojang/serialization/Codec;official dLdak;d:Lcom/mojang/serialization/Codec;
-
VALIDATED_UNCOUNTED_CODEC
- Mappings:
Namespace Name Mixin selector named VALIDATED_UNCOUNTED_CODECLnet/minecraft/item/ItemStack;VALIDATED_UNCOUNTED_CODEC:Lcom/mojang/serialization/Codec;intermediary field_51398Lnet/minecraft/class_1799;field_51398:Lcom/mojang/serialization/Codec;official eLdak;e:Lcom/mojang/serialization/Codec;
-
OPTIONAL_CODEC
- Mappings:
Namespace Name Mixin selector named OPTIONAL_CODECLnet/minecraft/item/ItemStack;OPTIONAL_CODEC:Lcom/mojang/serialization/Codec;intermediary field_49266Lnet/minecraft/class_1799;field_49266:Lcom/mojang/serialization/Codec;official fLdak;f:Lcom/mojang/serialization/Codec;
-
REGISTRY_ENTRY_CODEC
- Mappings:
Namespace Name Mixin selector named REGISTRY_ENTRY_CODECLnet/minecraft/item/ItemStack;REGISTRY_ENTRY_CODEC:Lcom/mojang/serialization/Codec;intermediary field_49267Lnet/minecraft/class_1799;field_49267:Lcom/mojang/serialization/Codec;official gLdak;g:Lcom/mojang/serialization/Codec;
-
OPTIONAL_PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named OPTIONAL_PACKET_CODECLnet/minecraft/item/ItemStack;OPTIONAL_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49268Lnet/minecraft/class_1799;field_49268:Lnet/minecraft/class_9139;official hLdak;h:Lze;
-
LENGTH_PREPENDED_OPTIONAL_PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named LENGTH_PREPENDED_OPTIONAL_PACKET_CODECLnet/minecraft/item/ItemStack;LENGTH_PREPENDED_OPTIONAL_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_58141Lnet/minecraft/class_1799;field_58141:Lnet/minecraft/class_9139;official iLdak;i:Lze;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/item/ItemStack;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_48349Lnet/minecraft/class_1799;field_48349:Lnet/minecraft/class_9139;official jLdak;j:Lze;
-
OPTIONAL_LIST_PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named OPTIONAL_LIST_PACKET_CODECLnet/minecraft/item/ItemStack;OPTIONAL_LIST_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49269Lnet/minecraft/class_1799;field_49269:Lnet/minecraft/class_9139;official kLdak;k:Lze;
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/item/ItemStack;LOGGER:Lorg/slf4j/Logger;intermediary field_8033Lnet/minecraft/class_1799;field_8033:Lorg/slf4j/Logger;official oLdak;o:Lorg/slf4j/Logger;
-
EMPTY
The empty item stack that holds no item.This should never be mutated.
- See Also:
- Mappings:
Namespace Name Mixin selector named EMPTYLnet/minecraft/item/ItemStack;EMPTY:Lnet/minecraft/item/ItemStack;intermediary field_8037Lnet/minecraft/class_1799;field_8037:Lnet/minecraft/class_1799;official lLdak;l:Ldak;
-
DISABLED_TEXT
- Mappings:
Namespace Name Mixin selector named DISABLED_TEXTLnet/minecraft/item/ItemStack;DISABLED_TEXT:Lnet/minecraft/text/Text;intermediary field_40211Lnet/minecraft/class_1799;field_40211:Lnet/minecraft/class_2561;official pLdak;p:Lxg;
-
count
private int count- Mappings:
Namespace Name Mixin selector named countLnet/minecraft/item/ItemStack;count:Iintermediary field_8031Lnet/minecraft/class_1799;field_8031:Iofficial qLdak;q:I
-
bobbingAnimationTime
private int bobbingAnimationTime- Mappings:
Namespace Name Mixin selector named bobbingAnimationTimeLnet/minecraft/item/ItemStack;bobbingAnimationTime:Iintermediary field_8030Lnet/minecraft/class_1799;field_8030:Iofficial rLdak;r:I
-
item
Deprecated.- Mappings:
Namespace Name Mixin selector named itemLnet/minecraft/item/ItemStack;item:Lnet/minecraft/item/Item;intermediary field_8038Lnet/minecraft/class_1799;field_8038:Lnet/minecraft/class_1792;official sLdak;s:Ldag;
-
components
- Mappings:
Namespace Name Mixin selector named componentsLnet/minecraft/item/ItemStack;components:Lnet/minecraft/component/MergedComponentMap;intermediary field_49270Lnet/minecraft/class_1799;field_49270:Lnet/minecraft/class_9335;official tLdak;t:Lkm;
-
holder
- Mappings:
Namespace Name Mixin selector named holderLnet/minecraft/item/ItemStack;holder:Lnet/minecraft/entity/Entity;intermediary field_24093Lnet/minecraft/class_1799;field_24093:Lnet/minecraft/class_1297;official uLdak;u:Lbxe;
-
-
Constructor Details
-
ItemStack
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/item/ItemStack;<init>(Lnet/minecraft/item/ItemConvertible;)Vintermediary <init>Lnet/minecraft/class_1799;<init>(Lnet/minecraft/class_1935;)Vofficial <init>Ldak;<init>(Ldki;)V
-
ItemStack
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/item/ItemStack;<init>(Lnet/minecraft/registry/entry/RegistryEntry;)Vintermediary <init>Lnet/minecraft/class_1799;<init>(Lnet/minecraft/class_6880;)Vofficial <init>Ldak;<init>(Ljg;)V
-
ItemStack
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/item/ItemStack;<init>(Lnet/minecraft/registry/entry/RegistryEntry;ILnet/minecraft/component/ComponentChanges;)Vintermediary <init>Lnet/minecraft/class_1799;<init>(Lnet/minecraft/class_6880;ILnet/minecraft/class_9326;)Vofficial <init>Ldak;<init>(Ljg;ILkj;)V
-
ItemStack
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/item/ItemStack;<init>(Lnet/minecraft/registry/entry/RegistryEntry;I)Vintermediary <init>Lnet/minecraft/class_1799;<init>(Lnet/minecraft/class_6880;I)Vofficial <init>Ldak;<init>(Ljg;I)V
-
ItemStack
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/item/ItemStack;<init>(Lnet/minecraft/item/ItemConvertible;I)Vintermediary <init>Lnet/minecraft/class_1799;<init>(Lnet/minecraft/class_1935;I)Vofficial <init>Ldak;<init>(Ldki;I)V
-
ItemStack
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/item/ItemStack;<init>(Lnet/minecraft/item/ItemConvertible;ILnet/minecraft/component/MergedComponentMap;)Vintermediary <init>Lnet/minecraft/class_1799;<init>(Lnet/minecraft/class_1935;ILnet/minecraft/class_9335;)Vofficial <init>Ldak;<init>(Ldki;ILkm;)V
-
ItemStack
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/item/ItemStack;<init>(Ljava/lang/Void;)Vintermediary <init>Lnet/minecraft/class_1799;<init>(Ljava/lang/Void;)Vofficial <init>Ldak;<init>(Ljava/lang/Void;)V
-
-
Method Details
-
validate
- Mappings:
Namespace Name Mixin selector named validateLnet/minecraft/item/ItemStack;validate(Lnet/minecraft/item/ItemStack;)Lcom/mojang/serialization/DataResult;intermediary method_57372Lnet/minecraft/class_1799;method_57372(Lnet/minecraft/class_1799;)Lcom/mojang/serialization/DataResult;official aLdak;a(Ldak;)Lcom/mojang/serialization/DataResult;
-
createOptionalPacketCodec
private static PacketCodec<RegistryByteBuf,ItemStack> createOptionalPacketCodec(PacketCodec<RegistryByteBuf, ComponentChanges> componentsPacketCodec) - Mappings:
Namespace Name Mixin selector named createOptionalPacketCodecLnet/minecraft/item/ItemStack;createOptionalPacketCodec(Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;intermediary method_68810Lnet/minecraft/class_1799;method_68810(Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;official bLdak;b(Lze;)Lze;
-
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
ItemStackin 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 createExtraValidatingPacketCodecLnet/minecraft/item/ItemStack;createExtraValidatingPacketCodec(Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;intermediary method_59693Lnet/minecraft/class_1799;method_59693(Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;official aLdak;a(Lze;)Lze;
-
getTooltipData
- Mappings:
Namespace Name Mixin selector named getTooltipDataLnet/minecraft/item/ItemStack;getTooltipData()Ljava/util/Optional;intermediary method_32347Lnet/minecraft/class_1799;method_32347()Ljava/util/Optional;official bLdak;b()Ljava/util/Optional;
-
getComponents
- Specified by:
getComponentsin interfaceComponentHolder- Mappings:
Namespace Name Mixin selector named getComponentsLnet/minecraft/component/ComponentHolder;getComponents()Lnet/minecraft/component/ComponentMap;intermediary method_57353Lnet/minecraft/class_9322;method_57353()Lnet/minecraft/class_9323;official aLkh;a()Lki;
-
getDefaultComponents
- Mappings:
Namespace Name Mixin selector named getDefaultComponentsLnet/minecraft/item/ItemStack;getDefaultComponents()Lnet/minecraft/component/ComponentMap;intermediary method_58658Lnet/minecraft/class_1799;method_58658()Lnet/minecraft/class_9323;official cLdak;c()Lki;
-
getComponentChanges
- Mappings:
Namespace Name Mixin selector named getComponentChangesLnet/minecraft/item/ItemStack;getComponentChanges()Lnet/minecraft/component/ComponentChanges;intermediary method_57380Lnet/minecraft/class_1799;method_57380()Lnet/minecraft/class_9326;official dLdak;d()Lkj;
-
getImmutableComponents
- Mappings:
Namespace Name Mixin selector named getImmutableComponentsLnet/minecraft/item/ItemStack;getImmutableComponents()Lnet/minecraft/component/ComponentMap;intermediary method_65359Lnet/minecraft/class_1799;method_65359()Lnet/minecraft/class_9323;official eLdak;e()Lki;
-
hasChangedComponent
- Mappings:
Namespace Name Mixin selector named hasChangedComponentLnet/minecraft/item/ItemStack;hasChangedComponent(Lnet/minecraft/component/ComponentType;)Zintermediary method_65797Lnet/minecraft/class_1799;method_65797(Lnet/minecraft/class_9331;)Zofficial dLdak;d(Lkk;)Z
-
validateComponents
- Mappings:
Namespace Name Mixin selector named validateComponentsLnet/minecraft/item/ItemStack;validateComponents(Lnet/minecraft/component/ComponentMap;)Lcom/mojang/serialization/DataResult;intermediary method_59691Lnet/minecraft/class_1799;method_59691(Lnet/minecraft/class_9323;)Lcom/mojang/serialization/DataResult;official aLdak;a(Lki;)Lcom/mojang/serialization/DataResult;
-
fromNbt
- Mappings:
Namespace Name Mixin selector named fromNbtLnet/minecraft/item/ItemStack;fromNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;Lnet/minecraft/nbt/NbtElement;)Ljava/util/Optional;intermediary method_57360Lnet/minecraft/class_1799;method_57360(Lnet/minecraft/class_7225$class_7874;Lnet/minecraft/class_2520;)Ljava/util/Optional;official aLdak;a(Lji$a;Lva;)Ljava/util/Optional;
-
isEmpty
public boolean isEmpty()Returns whether this item stack is empty.- Returns:
- whether this item stack is empty
- Mappings:
Namespace Name Mixin selector named isEmptyLnet/minecraft/item/ItemStack;isEmpty()Zintermediary method_7960Lnet/minecraft/class_1799;method_7960()Zofficial fLdak;f()Z
-
isItemEnabled
- Mappings:
Namespace Name Mixin selector named isItemEnabledLnet/minecraft/item/ItemStack;isItemEnabled(Lnet/minecraft/resource/featuretoggle/FeatureSet;)Zintermediary method_45435Lnet/minecraft/class_1799;method_45435(Lnet/minecraft/class_7699;)Zofficial aLdak;a(Lcvs;)Z
-
split
Returns the copy of the stack "split" from the current stack with item count being at mostamount.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 splitLnet/minecraft/item/ItemStack;split(I)Lnet/minecraft/item/ItemStack;intermediary method_7971Lnet/minecraft/class_1799;method_7971(I)Lnet/minecraft/class_1799;official aLdak;a(I)Ldak;
-
copyAndEmpty
- Mappings:
Namespace Name Mixin selector named copyAndEmptyLnet/minecraft/item/ItemStack;copyAndEmpty()Lnet/minecraft/item/ItemStack;intermediary method_51164Lnet/minecraft/class_1799;method_51164()Lnet/minecraft/class_1799;official gLdak;g()Ldak;
-
getItem
Returns the item of this stack.- Returns:
- the item of this stack
- See Also:
- Mappings:
Namespace Name Mixin selector named getItemLnet/minecraft/item/ItemStack;getItem()Lnet/minecraft/item/Item;intermediary method_7909Lnet/minecraft/class_1799;method_7909()Lnet/minecraft/class_1792;official hLdak;h()Ldag;
-
getRegistryEntry
- Mappings:
Namespace Name Mixin selector named getRegistryEntryLnet/minecraft/item/ItemStack;getRegistryEntry()Lnet/minecraft/registry/entry/RegistryEntry;intermediary method_41409Lnet/minecraft/class_1799;method_41409()Lnet/minecraft/class_6880;official iLdak;i()Ljg;
-
isIn
Returns whether the item is intag.- Returns:
- whether the item is in
tag - Mappings:
Namespace Name Mixin selector named isInLnet/minecraft/item/ItemStack;isIn(Lnet/minecraft/registry/tag/TagKey;)Zintermediary method_31573Lnet/minecraft/class_1799;method_31573(Lnet/minecraft/class_6862;)Zofficial aLdak;a(Layc;)Z
-
isOf
Returns whether the item isitem.- Returns:
- whether the item is
item - Mappings:
Namespace Name Mixin selector named isOfLnet/minecraft/item/ItemStack;isOf(Lnet/minecraft/item/Item;)Zintermediary method_31574Lnet/minecraft/class_1799;method_31574(Lnet/minecraft/class_1792;)Zofficial aLdak;a(Ldag;)Z
-
itemMatches
Returns whether the item's registry entry passes thepredicate.- Returns:
- whether the item's registry entry passes the
predicate - See Also:
- Mappings:
Namespace Name Mixin selector named itemMatchesLnet/minecraft/item/ItemStack;itemMatches(Ljava/util/function/Predicate;)Zintermediary method_41407Lnet/minecraft/class_1799;method_41407(Ljava/util/function/Predicate;)Zofficial aLdak;a(Ljava/util/function/Predicate;)Z
-
itemMatches
Returns whether the item's registry entry matchesitemEntry.- Returns:
- whether the item's registry entry matches
itemEntry - See Also:
- Mappings:
Namespace Name Mixin selector named itemMatchesLnet/minecraft/item/ItemStack;itemMatches(Lnet/minecraft/registry/entry/RegistryEntry;)Zintermediary method_41406Lnet/minecraft/class_1799;method_41406(Lnet/minecraft/class_6880;)Zofficial aLdak;a(Ljg;)Z
-
isIn
- Mappings:
Namespace Name Mixin selector named isInLnet/minecraft/item/ItemStack;isIn(Lnet/minecraft/registry/entry/RegistryEntryList;)Zintermediary method_53187Lnet/minecraft/class_1799;method_53187(Lnet/minecraft/class_6885;)Zofficial aLdak;a(Ljk;)Z
-
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 streamTagsLnet/minecraft/item/ItemStack;streamTags()Ljava/util/stream/Stream;intermediary method_40133Lnet/minecraft/class_1799;method_40133()Ljava/util/stream/Stream;official jLdak;j()Ljava/util/stream/Stream;
-
useOnBlock
- Mappings:
Namespace Name Mixin selector named useOnBlockLnet/minecraft/item/ItemStack;useOnBlock(Lnet/minecraft/item/ItemUsageContext;)Lnet/minecraft/util/ActionResult;intermediary method_7981Lnet/minecraft/class_1799;method_7981(Lnet/minecraft/class_1838;)Lnet/minecraft/class_1269;official aLdak;a(Ldef;)Lbvc;
-
getMiningSpeedMultiplier
- Mappings:
Namespace Name Mixin selector named getMiningSpeedMultiplierLnet/minecraft/item/ItemStack;getMiningSpeedMultiplier(Lnet/minecraft/block/BlockState;)Fintermediary method_7924Lnet/minecraft/class_1799;method_7924(Lnet/minecraft/class_2680;)Fofficial aLdak;a(Lebq;)F
-
use
- Mappings:
Namespace Name Mixin selector named useLnet/minecraft/item/ItemStack;use(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;intermediary method_7913Lnet/minecraft/class_1799;method_7913(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;official aLdak;a(Ldkj;Lcsi;Lbvb;)Lbvc;
-
finishUsing
- Mappings:
Namespace Name Mixin selector named finishUsingLnet/minecraft/item/ItemStack;finishUsing(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/item/ItemStack;intermediary method_7910Lnet/minecraft/class_1799;method_7910(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;)Lnet/minecraft/class_1799;official aLdak;a(Ldkj;Lbyf;)Ldak;
-
applyRemainderAndCooldown
- Mappings:
Namespace Name Mixin selector named applyRemainderAndCooldownLnet/minecraft/item/ItemStack;applyRemainderAndCooldown(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;intermediary method_62837Lnet/minecraft/class_1799;method_62837(Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)Lnet/minecraft/class_1799;official aLdak;a(Lbyf;Ldak;)Ldak;
-
toNbt
- Mappings:
Namespace Name Mixin selector named toNbtLnet/minecraft/item/ItemStack;toNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;Lnet/minecraft/nbt/NbtElement;)Lnet/minecraft/nbt/NbtElement;intermediary method_57376Lnet/minecraft/class_1799;method_57376(Lnet/minecraft/class_7225$class_7874;Lnet/minecraft/class_2520;)Lnet/minecraft/class_2520;official bLdak;b(Lji$a;Lva;)Lva;
-
toNbt
- Mappings:
Namespace Name Mixin selector named toNbtLnet/minecraft/item/ItemStack;toNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtElement;intermediary method_57358Lnet/minecraft/class_1799;method_57358(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2520;official aLdak;a(Lji$a;)Lva;
-
getMaxCount
public int getMaxCount()- Mappings:
Namespace Name Mixin selector named getMaxCountLnet/minecraft/item/ItemStack;getMaxCount()Iintermediary method_7914Lnet/minecraft/class_1799;method_7914()Iofficial kLdak;k()I
-
isStackable
public boolean isStackable()Returns whether the item stack can have item count above1.Stackable items must have the maximum count that is more than
1and cannot be damaged.- Returns:
- whether the item stack can have item count above
1 - Mappings:
Namespace Name Mixin selector named isStackableLnet/minecraft/item/ItemStack;isStackable()Zintermediary method_7946Lnet/minecraft/class_1799;method_7946()Zofficial lLdak;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.UNBREAKABLEcomponent cannot be damaged.- Returns:
- whether the item can be damaged (lose durability)
- See Also:
- Mappings:
Namespace Name Mixin selector named isDamageableLnet/minecraft/item/ItemStack;isDamageable()Zintermediary method_7963Lnet/minecraft/class_1799;method_7963()Zofficial mLdak;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 isDamagedLnet/minecraft/item/ItemStack;isDamaged()Zintermediary method_7986Lnet/minecraft/class_1799;method_7986()Zofficial nLdak;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 getDamageLnet/minecraft/item/ItemStack;getDamage()Iintermediary method_7919Lnet/minecraft/class_1799;method_7919()Iofficial oLdak;o()I
-
setDamage
public void setDamage(int damage) Sets the stack's damage todamage.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 setDamageLnet/minecraft/item/ItemStack;setDamage(I)Vintermediary method_7974Lnet/minecraft/class_1799;method_7974(I)Vofficial bLdak;b(I)V
-
getMaxDamage
public int getMaxDamage()- Mappings:
Namespace Name Mixin selector named getMaxDamageLnet/minecraft/item/ItemStack;getMaxDamage()Iintermediary method_7936Lnet/minecraft/class_1799;method_7936()Iofficial pLdak;p()I
-
shouldBreak
public boolean shouldBreak()- Mappings:
Namespace Name Mixin selector named shouldBreakLnet/minecraft/item/ItemStack;shouldBreak()Zintermediary method_61657Lnet/minecraft/class_1799;method_61657()Zofficial qLdak;q()Z
-
willBreakNextUse
public boolean willBreakNextUse()- Mappings:
Namespace Name Mixin selector named willBreakNextUseLnet/minecraft/item/ItemStack;willBreakNextUse()Zintermediary method_63692Lnet/minecraft/class_1799;method_63692()Zofficial rLdak;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 toamountbefore damaging.If
playeris notnull, this triggersCriteria.ITEM_DURABILITY_CHANGED.When the item "breaks", that is, the stack's damage is equal to or above the maximum damage,
breakCallbackis run. Note that this method automatically decrements the stack size.- Mappings:
Namespace Name Mixin selector named damageLnet/minecraft/item/ItemStack;damage(ILnet/minecraft/server/world/ServerWorld;Lnet/minecraft/server/network/ServerPlayerEntity;Ljava/util/function/Consumer;)Vintermediary method_7956Lnet/minecraft/class_1799;method_7956(ILnet/minecraft/class_3218;Lnet/minecraft/class_3222;Ljava/util/function/Consumer;)Vofficial aLdak;a(ILasb;Lasc;Ljava/util/function/Consumer;)V
-
calculateDamage
private int calculateDamage(int baseDamage, ServerWorld world, @Nullable @Nullable ServerPlayerEntity player) - Mappings:
Namespace Name Mixin selector named calculateDamageLnet/minecraft/item/ItemStack;calculateDamage(ILnet/minecraft/server/world/ServerWorld;Lnet/minecraft/server/network/ServerPlayerEntity;)Iintermediary method_61651Lnet/minecraft/class_1799;method_61651(ILnet/minecraft/class_3218;Lnet/minecraft/class_3222;)Iofficial aLdak;a(ILasb;Lasc;)I
-
onDurabilityChange
private void onDurabilityChange(int damage, @Nullable @Nullable ServerPlayerEntity player, Consumer<Item> breakCallback) - Mappings:
Namespace Name Mixin selector named onDurabilityChangeLnet/minecraft/item/ItemStack;onDurabilityChange(ILnet/minecraft/server/network/ServerPlayerEntity;Ljava/util/function/Consumer;)Vintermediary method_61652Lnet/minecraft/class_1799;method_61652(ILnet/minecraft/class_3222;Ljava/util/function/Consumer;)Vofficial aLdak;a(ILasc;Ljava/util/function/Consumer;)V
-
damage
- Mappings:
Namespace Name Mixin selector named damageLnet/minecraft/item/ItemStack;damage(ILnet/minecraft/entity/player/PlayerEntity;)Vintermediary method_61653Lnet/minecraft/class_1799;method_61653(ILnet/minecraft/class_1657;)Vofficial aLdak;a(ILcsi;)V
-
damage
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 toamountbefore damaging. Additionally, ifentityis a player in creative mode, the stack will not be damaged.If
entityis a player, this triggersCriteria.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.BROKENif the stack is held by a player.- Parameters:
slot- the slot in which the stack is held- Mappings:
Namespace Name Mixin selector named damageLnet/minecraft/item/ItemStack;damage(ILnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/EquipmentSlot;)Vintermediary method_7970Lnet/minecraft/class_1799;method_7970(ILnet/minecraft/class_1309;Lnet/minecraft/class_1304;)Vofficial aLdak;a(ILbyf;Lbxo;)V
-
damage
public ItemStack damage(int amount, ItemConvertible itemAfterBreaking, LivingEntity entity, EquipmentSlot slot) - Mappings:
Namespace Name Mixin selector named damageLnet/minecraft/item/ItemStack;damage(ILnet/minecraft/item/ItemConvertible;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/EquipmentSlot;)Lnet/minecraft/item/ItemStack;intermediary method_60986Lnet/minecraft/class_1799;method_60986(ILnet/minecraft/class_1935;Lnet/minecraft/class_1309;Lnet/minecraft/class_1304;)Lnet/minecraft/class_1799;official aLdak;a(ILdki;Lbyf;Lbxo;)Ldak;
-
isItemBarVisible
public boolean isItemBarVisible()- Mappings:
Namespace Name Mixin selector named isItemBarVisibleLnet/minecraft/item/ItemStack;isItemBarVisible()Zintermediary method_31578Lnet/minecraft/class_1799;method_31578()Zofficial sLdak;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 getItemBarStepLnet/minecraft/item/ItemStack;getItemBarStep()Iintermediary method_31579Lnet/minecraft/class_1799;method_31579()Iofficial tLdak;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 getItemBarColorLnet/minecraft/item/ItemStack;getItemBarColor()Iintermediary method_31580Lnet/minecraft/class_1799;method_31580()Iofficial uLdak;u()I
-
onStackClicked
- Mappings:
Namespace Name Mixin selector named onStackClickedLnet/minecraft/item/ItemStack;onStackClicked(Lnet/minecraft/screen/slot/Slot;Lnet/minecraft/util/ClickType;Lnet/minecraft/entity/player/PlayerEntity;)Zintermediary method_31575Lnet/minecraft/class_1799;method_31575(Lnet/minecraft/class_1735;Lnet/minecraft/class_5536;Lnet/minecraft/class_1657;)Zofficial aLdak;a(Lcxz;Lcwl;Lcsi;)Z
-
onClicked
public boolean onClicked(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player, StackReference cursorStackReference) - Mappings:
Namespace Name Mixin selector named onClickedLnet/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;)Zintermediary method_31576Lnet/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;)Zofficial aLdak;a(Ldak;Lcxz;Lcwl;Lcsi;Lbyw;)Z
-
postHit
- Mappings:
Namespace Name Mixin selector named postHitLnet/minecraft/item/ItemStack;postHit(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)Zintermediary method_7979Lnet/minecraft/class_1799;method_7979(Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Zofficial aLdak;a(Lbyf;Lbyf;)Z
-
postDamageEntity
- Mappings:
Namespace Name Mixin selector named postDamageEntityLnet/minecraft/item/ItemStack;postDamageEntity(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)Vintermediary method_59979Lnet/minecraft/class_1799;method_59979(Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Vofficial bLdak;b(Lbyf;Lbyf;)V
-
postMine
- Mappings:
Namespace Name Mixin selector named postMineLnet/minecraft/item/ItemStack;postMine(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;)Vintermediary method_7952Lnet/minecraft/class_1799;method_7952(Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;)Vofficial aLdak;a(Ldkj;Lebq;Liw;Lcsi;)V
-
isSuitableFor
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 isSuitableForLnet/minecraft/item/ItemStack;isSuitableFor(Lnet/minecraft/block/BlockState;)Zintermediary method_7951Lnet/minecraft/class_1799;method_7951(Lnet/minecraft/class_2680;)Zofficial bLdak;b(Lebq;)Z
-
useOnEntity
- Mappings:
Namespace Name Mixin selector named useOnEntityLnet/minecraft/item/ItemStack;useOnEntity(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;intermediary method_7920Lnet/minecraft/class_1799;method_7920(Lnet/minecraft/class_1657;Lnet/minecraft/class_1309;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;official aLdak;a(Lcsi;Lbyf;Lbvb;)Lbvc;
-
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 copyLnet/minecraft/item/ItemStack;copy()Lnet/minecraft/item/ItemStack;intermediary method_7972Lnet/minecraft/class_1799;method_7972()Lnet/minecraft/class_1799;official vLdak;v()Ldak;
-
copyWithCount
Returns a copy of this item stack, including the components, and bobbing animation time., with the item count set tocount- 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 copyWithCountLnet/minecraft/item/ItemStack;copyWithCount(I)Lnet/minecraft/item/ItemStack;intermediary method_46651Lnet/minecraft/class_1799;method_46651(I)Lnet/minecraft/class_1799;official cLdak;c(I)Ldak;
-
withItem
- Mappings:
Namespace Name Mixin selector named withItemLnet/minecraft/item/ItemStack;withItem(Lnet/minecraft/item/ItemConvertible;)Lnet/minecraft/item/ItemStack;intermediary method_60503Lnet/minecraft/class_1799;method_60503(Lnet/minecraft/class_1935;)Lnet/minecraft/class_1799;official aLdak;a(Ldki;)Ldak;
-
copyComponentsToNewStack
Returns a new item stack with the components copied from this item stack.- Parameters:
item- the item of the resultant stackcount- 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 copyComponentsToNewStackLnet/minecraft/item/ItemStack;copyComponentsToNewStack(Lnet/minecraft/item/ItemConvertible;I)Lnet/minecraft/item/ItemStack;intermediary method_56701Lnet/minecraft/class_1799;method_56701(Lnet/minecraft/class_1935;I)Lnet/minecraft/class_1799;official aLdak;a(Ldki;I)Ldak;
-
copyComponentsToNewStackIgnoreEmpty
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 stackcount- 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 copyComponentsToNewStackIgnoreEmptyLnet/minecraft/item/ItemStack;copyComponentsToNewStackIgnoreEmpty(Lnet/minecraft/item/ItemConvertible;I)Lnet/minecraft/item/ItemStack;intermediary method_56704Lnet/minecraft/class_1799;method_56704(Lnet/minecraft/class_1935;I)Lnet/minecraft/class_1799;official bLdak;b(Ldki;I)Ldak;
-
areEqual
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 areEqualLnet/minecraft/item/ItemStack;areEqual(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Zintermediary method_7973Lnet/minecraft/class_1799;method_7973(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Zofficial aLdak;a(Ldak;Ldak;)Z
-
stacksEqual
Deprecated.- Mappings:
Namespace Name Mixin selector named stacksEqualLnet/minecraft/item/ItemStack;stacksEqual(Ljava/util/List;Ljava/util/List;)Zintermediary method_57362Lnet/minecraft/class_1799;method_57362(Ljava/util/List;Ljava/util/List;)Zofficial aLdak;a(Ljava/util/List;Ljava/util/List;)Z
-
areItemsEqual
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 areItemsEqualLnet/minecraft/item/ItemStack;areItemsEqual(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Zintermediary method_7984Lnet/minecraft/class_1799;method_7984(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Zofficial bLdak;b(Ldak;Ldak;)Z
-
areItemsAndComponentsEqual
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 areItemsAndComponentsEqualLnet/minecraft/item/ItemStack;areItemsAndComponentsEqual(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Zintermediary method_31577Lnet/minecraft/class_1799;method_31577(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Zofficial cLdak;c(Ldak;Ldak;)Z
-
createOptionalCodec
- Mappings:
Namespace Name Mixin selector named createOptionalCodecLnet/minecraft/item/ItemStack;createOptionalCodec(Ljava/lang/String;)Lcom/mojang/serialization/MapCodec;intermediary method_56702Lnet/minecraft/class_1799;method_56702(Ljava/lang/String;)Lcom/mojang/serialization/MapCodec;official aLdak;a(Ljava/lang/String;)Lcom/mojang/serialization/MapCodec;
-
hashCode
- Mappings:
Namespace Name Mixin selector named hashCodeLnet/minecraft/item/ItemStack;hashCode(Lnet/minecraft/item/ItemStack;)Iintermediary method_57355Lnet/minecraft/class_1799;method_57355(Lnet/minecraft/class_1799;)Iofficial bLdak;b(Ldak;)I
-
listHashCode
Deprecated.- Mappings:
Namespace Name Mixin selector named listHashCodeLnet/minecraft/item/ItemStack;listHashCode(Ljava/util/List;)Iintermediary method_57361Lnet/minecraft/class_1799;method_57361(Ljava/util/List;)Iofficial aLdak;a(Ljava/util/List;)I
-
toString
-
inventoryTick
- Mappings:
Namespace Name Mixin selector named inventoryTickLnet/minecraft/item/ItemStack;inventoryTick(Lnet/minecraft/world/World;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/EquipmentSlot;)Vintermediary method_7917Lnet/minecraft/class_1799;method_7917(Lnet/minecraft/class_1937;Lnet/minecraft/class_1297;Lnet/minecraft/class_1304;)Vofficial aLdak;a(Ldkj;Lbxe;Lbxo;)V
-
onCraftByPlayer
- Mappings:
Namespace Name Mixin selector named onCraftByPlayerLnet/minecraft/item/ItemStack;onCraftByPlayer(Lnet/minecraft/entity/player/PlayerEntity;I)Vintermediary method_7982Lnet/minecraft/class_1799;method_7982(Lnet/minecraft/class_1657;I)Vofficial aLdak;a(Lcsi;I)V
-
onCraftByCrafter
- Mappings:
Namespace Name Mixin selector named onCraftByCrafterLnet/minecraft/item/ItemStack;onCraftByCrafter(Lnet/minecraft/world/World;)Vintermediary method_54466Lnet/minecraft/class_1799;method_54466(Lnet/minecraft/class_1937;)Vofficial aLdak;a(Ldkj;)V
-
getMaxUseTime
- Mappings:
Namespace Name Mixin selector named getMaxUseTimeLnet/minecraft/item/ItemStack;getMaxUseTime(Lnet/minecraft/entity/LivingEntity;)Iintermediary method_7935Lnet/minecraft/class_1799;method_7935(Lnet/minecraft/class_1309;)Iofficial aLdak;a(Lbyf;)I
-
getUseAction
- Mappings:
Namespace Name Mixin selector named getUseActionLnet/minecraft/item/ItemStack;getUseAction()Lnet/minecraft/item/consume/UseAction;intermediary method_7976Lnet/minecraft/class_1799;method_7976()Lnet/minecraft/class_1839;official wLdak;w()Ldam;
-
onStoppedUsing
- Mappings:
Namespace Name Mixin selector named onStoppedUsingLnet/minecraft/item/ItemStack;onStoppedUsing(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;I)Vintermediary method_7930Lnet/minecraft/class_1799;method_7930(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;I)Vofficial aLdak;a(Ldkj;Lbyf;I)V
-
isUsedOnRelease
public boolean isUsedOnRelease()- Mappings:
Namespace Name Mixin selector named isUsedOnReleaseLnet/minecraft/item/ItemStack;isUsedOnRelease()Zintermediary method_7967Lnet/minecraft/class_1799;method_7967()Zofficial xLdak;x()Z
-
set
Sets the componenttypefor this item stack tovalue.If
valueisnull, the component is removed and the base component is unset. To reverse the stack-specific change, instead pass the default value asvalue.- Returns:
- the previous value set
- See Also:
- Mappings:
Namespace Name Mixin selector named setLnet/minecraft/item/ItemStack;set(Lnet/minecraft/component/ComponentType;Ljava/lang/Object;)Ljava/lang/Object;intermediary method_57379Lnet/minecraft/class_1799;method_57379(Lnet/minecraft/class_9331;Ljava/lang/Object;)Ljava/lang/Object;official bLdak;b(Lkk;Ljava/lang/Object;)Ljava/lang/Object;
-
copy
- Mappings:
Namespace Name Mixin selector named copyLnet/minecraft/item/ItemStack;copy(Lnet/minecraft/component/ComponentType;Lnet/minecraft/component/ComponentsAccess;)Vintermediary method_66697Lnet/minecraft/class_1799;method_66697(Lnet/minecraft/class_9331;Lnet/minecraft/class_9473;)Vofficial aLdak;a(Lkk;Lkg;)V
-
apply
@Nullable public <T,U> T apply(ComponentType<T> type, T defaultValue, U change, BiFunction<T, U, T> applier) Sets the componenttypeby passing the current value andchangetoapplier, then setting its return value as the value. If the component is missing,defaultValueis used as the default.In practice,
applieris 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 tochange. For example, adding a lore can be accomplished by passing reference toLoreComponent.with(net.minecraft.text.Text)and the added lore, likestack.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 applyLnet/minecraft/item/ItemStack;apply(Lnet/minecraft/component/ComponentType;Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;intermediary method_57367Lnet/minecraft/class_1799;method_57367(Lnet/minecraft/class_9331;Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;official aLdak;a(Lkk;Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;
-
apply
Sets the componenttypeby passing the current value (ordefaultValueif the component is missing) toapplierand 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 applyLnet/minecraft/item/ItemStack;apply(Lnet/minecraft/component/ComponentType;Ljava/lang/Object;Ljava/util/function/UnaryOperator;)Ljava/lang/Object;intermediary method_57368Lnet/minecraft/class_1799;method_57368(Lnet/minecraft/class_9331;Ljava/lang/Object;Ljava/util/function/UnaryOperator;)Ljava/lang/Object;official aLdak;a(Lkk;Ljava/lang/Object;Ljava/util/function/UnaryOperator;)Ljava/lang/Object;
-
remove
Removes the componenttype. 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 asvalue.- Returns:
- the previous value set
- Mappings:
Namespace Name Mixin selector named removeLnet/minecraft/item/ItemStack;remove(Lnet/minecraft/component/ComponentType;)Ljava/lang/Object;intermediary method_57381Lnet/minecraft/class_1799;method_57381(Lnet/minecraft/class_9331;)Ljava/lang/Object;official eLdak;e(Lkk;)Ljava/lang/Object;
-
applyChanges
- Mappings:
Namespace Name Mixin selector named applyChangesLnet/minecraft/item/ItemStack;applyChanges(Lnet/minecraft/component/ComponentChanges;)Vintermediary method_59692Lnet/minecraft/class_1799;method_59692(Lnet/minecraft/class_9326;)Vofficial aLdak;a(Lkj;)V
-
applyUnvalidatedChanges
- Mappings:
Namespace Name Mixin selector named applyUnvalidatedChangesLnet/minecraft/item/ItemStack;applyUnvalidatedChanges(Lnet/minecraft/component/ComponentChanges;)Vintermediary method_57366Lnet/minecraft/class_1799;method_57366(Lnet/minecraft/class_9326;)Vofficial bLdak;b(Lkj;)V
-
applyComponentsFrom
- Mappings:
Namespace Name Mixin selector named applyComponentsFromLnet/minecraft/item/ItemStack;applyComponentsFrom(Lnet/minecraft/component/ComponentMap;)Vintermediary method_57365Lnet/minecraft/class_1799;method_57365(Lnet/minecraft/class_9323;)Vofficial bLdak;b(Lki;)V
-
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 getNameLnet/minecraft/item/ItemStack;getName()Lnet/minecraft/text/Text;intermediary method_7964Lnet/minecraft/class_1799;method_7964()Lnet/minecraft/class_2561;official yLdak;y()Lxg;
-
getCustomName
Returns the custom name or book title of the stack if it exists, ornull.- Returns:
- the custom name or book title of the stack if it exists, or
null - Mappings:
Namespace Name Mixin selector named getCustomNameLnet/minecraft/item/ItemStack;getCustomName()Lnet/minecraft/text/Text;intermediary method_65130Lnet/minecraft/class_1799;method_65130()Lnet/minecraft/class_2561;official zLdak;z()Lxg;
-
getItemName
- Mappings:
Namespace Name Mixin selector named getItemNameLnet/minecraft/item/ItemStack;getItemName()Lnet/minecraft/text/Text;intermediary method_63693Lnet/minecraft/class_1799;method_63693()Lnet/minecraft/class_2561;official ALdak;A()Lxg;
-
getFormattedName
- Mappings:
Namespace Name Mixin selector named getFormattedNameLnet/minecraft/item/ItemStack;getFormattedName()Lnet/minecraft/text/Text;intermediary method_63015Lnet/minecraft/class_1799;method_63015()Lnet/minecraft/class_2561;official BLdak;B()Lxg;
-
appendComponentTooltip
public <T extends TooltipAppender> void appendComponentTooltip(ComponentType<T> componentType, Item.TooltipContext context, TooltipDisplayComponent displayComponent, Consumer<Text> textConsumer, TooltipType type) - Mappings:
Namespace Name Mixin selector named appendComponentTooltipLnet/minecraft/item/ItemStack;appendComponentTooltip(Lnet/minecraft/component/ComponentType;Lnet/minecraft/item/Item$TooltipContext;Lnet/minecraft/component/type/TooltipDisplayComponent;Ljava/util/function/Consumer;Lnet/minecraft/item/tooltip/TooltipType;)Vintermediary method_57369Lnet/minecraft/class_1799;method_57369(Lnet/minecraft/class_9331;Lnet/minecraft/class_1792$class_9635;Lnet/minecraft/class_10712;Ljava/util/function/Consumer;Lnet/minecraft/class_1836;)Vofficial aLdak;a(Lkk;Ldag$b;Lddo;Ljava/util/function/Consumer;Ldbz;)V
-
getTooltip
public List<Text> getTooltip(Item.TooltipContext context, @Nullable @Nullable PlayerEntity player, TooltipType type) - Mappings:
Namespace Name Mixin selector named getTooltipLnet/minecraft/item/ItemStack;getTooltip(Lnet/minecraft/item/Item$TooltipContext;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/tooltip/TooltipType;)Ljava/util/List;intermediary method_7950Lnet/minecraft/class_1799;method_7950(Lnet/minecraft/class_1792$class_9635;Lnet/minecraft/class_1657;Lnet/minecraft/class_1836;)Ljava/util/List;official aLdak;a(Ldag$b;Lcsi;Ldbz;)Ljava/util/List;
-
appendTooltip
public void appendTooltip(Item.TooltipContext context, TooltipDisplayComponent displayComponent, @Nullable @Nullable PlayerEntity player, TooltipType type, Consumer<Text> textConsumer) - Mappings:
Namespace Name Mixin selector named appendTooltipLnet/minecraft/item/ItemStack;appendTooltip(Lnet/minecraft/item/Item$TooltipContext;Lnet/minecraft/component/type/TooltipDisplayComponent;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/tooltip/TooltipType;Ljava/util/function/Consumer;)Vintermediary method_67194Lnet/minecraft/class_1799;method_67194(Lnet/minecraft/class_1792$class_9635;Lnet/minecraft/class_10712;Lnet/minecraft/class_1657;Lnet/minecraft/class_1836;Ljava/util/function/Consumer;)Vofficial aLdak;a(Ldag$b;Lddo;Lcsi;Ldbz;Ljava/util/function/Consumer;)V
-
appendAttributeModifiersTooltip
private void appendAttributeModifiersTooltip(Consumer<Text> textConsumer, TooltipDisplayComponent displayComponent, @Nullable @Nullable PlayerEntity player) - Mappings:
Namespace Name Mixin selector named appendAttributeModifiersTooltipLnet/minecraft/item/ItemStack;appendAttributeModifiersTooltip(Ljava/util/function/Consumer;Lnet/minecraft/component/type/TooltipDisplayComponent;Lnet/minecraft/entity/player/PlayerEntity;)Vintermediary method_57363Lnet/minecraft/class_1799;method_57363(Ljava/util/function/Consumer;Lnet/minecraft/class_10712;Lnet/minecraft/class_1657;)Vofficial aLdak;a(Ljava/util/function/Consumer;Lddo;Lcsi;)V
-
appendAttributeModifierTooltip
private void appendAttributeModifierTooltip(Consumer<Text> textConsumer, @Nullable @Nullable PlayerEntity player, RegistryEntry<EntityAttribute> attribute, EntityAttributeModifier modifier) - Mappings:
Namespace Name Mixin selector named appendAttributeModifierTooltipLnet/minecraft/item/ItemStack;appendAttributeModifierTooltip(Ljava/util/function/Consumer;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/entity/attribute/EntityAttributeModifier;)Vintermediary method_57364Lnet/minecraft/class_1799;method_57364(Ljava/util/function/Consumer;Lnet/minecraft/class_1657;Lnet/minecraft/class_6880;Lnet/minecraft/class_1322;)Vofficial aLdak;a(Ljava/util/function/Consumer;Lcsi;Ljg;Lbzj;)V
-
hasGlint
public boolean hasGlint()- Mappings:
Namespace Name Mixin selector named hasGlintLnet/minecraft/item/ItemStack;hasGlint()Zintermediary method_7958Lnet/minecraft/class_1799;method_7958()Zofficial CLdak;C()Z
-
getRarity
- Mappings:
Namespace Name Mixin selector named getRarityLnet/minecraft/item/ItemStack;getRarity()Lnet/minecraft/util/Rarity;intermediary method_7932Lnet/minecraft/class_1799;method_7932()Lnet/minecraft/class_1814;official DLdak;D()Ldbg;
-
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 isEnchantableLnet/minecraft/item/ItemStack;isEnchantable()Zintermediary method_7923Lnet/minecraft/class_1799;method_7923()Zofficial ELdak;E()Z
-
addEnchantment
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 addEnchantmentLnet/minecraft/item/ItemStack;addEnchantment(Lnet/minecraft/registry/entry/RegistryEntry;I)Vintermediary method_7978Lnet/minecraft/class_1799;method_7978(Lnet/minecraft/class_6880;I)Vofficial aLdak;a(Ljg;I)V
-
hasEnchantments
public boolean hasEnchantments()Returns whether the item stack has any enchantments.This will return
falsefor enchanted books, as the book itself is not enchanted and therefore does not store enchantments underDataComponentTypes.ENCHANTMENTS.- Returns:
- whether the item stack has any enchantments
- See Also:
- Mappings:
Namespace Name Mixin selector named hasEnchantmentsLnet/minecraft/item/ItemStack;hasEnchantments()Zintermediary method_7942Lnet/minecraft/class_1799;method_7942()Zofficial FLdak;F()Z
-
getEnchantments
- Mappings:
Namespace Name Mixin selector named getEnchantmentsLnet/minecraft/item/ItemStack;getEnchantments()Lnet/minecraft/component/type/ItemEnchantmentsComponent;intermediary method_58657Lnet/minecraft/class_1799;method_58657()Lnet/minecraft/class_9304;official GLdak;G()Ldhd;
-
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 isInFrameLnet/minecraft/item/ItemStack;isInFrame()Zintermediary method_7961Lnet/minecraft/class_1799;method_7961()Zofficial HLdak;H()Z
-
setHolder
Sets the stack's holder toholder.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 setHolderLnet/minecraft/item/ItemStack;setHolder(Lnet/minecraft/entity/Entity;)Vintermediary method_27320Lnet/minecraft/class_1799;method_27320(Lnet/minecraft/class_1297;)Vofficial aLdak;a(Lbxe;)V
-
getFrame
Returns the item frame that holds the stack, ornullif inapplicable.- Returns:
- the item frame that holds the stack, or
nullif inapplicable - See Also:
- Mappings:
Namespace Name Mixin selector named getFrameLnet/minecraft/item/ItemStack;getFrame()Lnet/minecraft/entity/decoration/ItemFrameEntity;intermediary method_7945Lnet/minecraft/class_1799;method_7945()Lnet/minecraft/class_1533;official ILdak;I()Lcog;
-
getHolder
Returns the entity that holds the stack, ornullif inapplicable.- Returns:
- the entity that holds the stack, or
nullif inapplicable - See Also:
- Mappings:
Namespace Name Mixin selector named getHolderLnet/minecraft/item/ItemStack;getHolder()Lnet/minecraft/entity/Entity;intermediary method_27319Lnet/minecraft/class_1799;method_27319()Lnet/minecraft/class_1297;official JLdak;J()Lbxe;
-
applyAttributeModifier
public void applyAttributeModifier(AttributeModifierSlot slot, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> attributeModifierConsumer) - Mappings:
Namespace Name Mixin selector named applyAttributeModifierLnet/minecraft/item/ItemStack;applyAttributeModifier(Lnet/minecraft/component/type/AttributeModifierSlot;Ljava/util/function/BiConsumer;)Vintermediary method_60617Lnet/minecraft/class_1799;method_60617(Lnet/minecraft/class_9274;Ljava/util/function/BiConsumer;)Vofficial aLdak;a(Lbxp;Ljava/util/function/BiConsumer;)V
-
applyAttributeModifiers
public void applyAttributeModifiers(EquipmentSlot slot, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> attributeModifierConsumer) - Mappings:
Namespace Name Mixin selector named applyAttributeModifiersLnet/minecraft/item/ItemStack;applyAttributeModifiers(Lnet/minecraft/entity/EquipmentSlot;Ljava/util/function/BiConsumer;)Vintermediary method_57354Lnet/minecraft/class_1799;method_57354(Lnet/minecraft/class_1304;Ljava/util/function/BiConsumer;)Vofficial aLdak;a(Lbxo;Ljava/util/function/BiConsumer;)V
-
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 toHoverableTextLnet/minecraft/item/ItemStack;toHoverableText()Lnet/minecraft/text/Text;intermediary method_7954Lnet/minecraft/class_1799;method_7954()Lnet/minecraft/class_2561;official KLdak;K()Lxg;
-
canPlaceOn
- Mappings:
Namespace Name Mixin selector named canPlaceOnLnet/minecraft/item/ItemStack;canPlaceOn(Lnet/minecraft/block/pattern/CachedBlockPosition;)Zintermediary method_57357Lnet/minecraft/class_1799;method_57357(Lnet/minecraft/class_2694;)Zofficial aLdak;a(Lebu;)Z
-
canBreak
- Mappings:
Namespace Name Mixin selector named canBreakLnet/minecraft/item/ItemStack;canBreak(Lnet/minecraft/block/pattern/CachedBlockPosition;)Zintermediary method_57373Lnet/minecraft/class_1799;method_57373(Lnet/minecraft/class_2694;)Zofficial bLdak;b(Lebu;)Z
-
getBobbingAnimationTime
public int getBobbingAnimationTime()- Mappings:
Namespace Name Mixin selector named getBobbingAnimationTimeLnet/minecraft/item/ItemStack;getBobbingAnimationTime()Iintermediary method_7965Lnet/minecraft/class_1799;method_7965()Iofficial LLdak;L()I
-
setBobbingAnimationTime
public void setBobbingAnimationTime(int bobbingAnimationTime) - Mappings:
Namespace Name Mixin selector named setBobbingAnimationTimeLnet/minecraft/item/ItemStack;setBobbingAnimationTime(I)Vintermediary method_7912Lnet/minecraft/class_1799;method_7912(I)Vofficial dLdak;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 getCountLnet/minecraft/item/ItemStack;getCount()Iintermediary method_7947Lnet/minecraft/class_1799;method_7947()Iofficial MLdak;M()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 setCountLnet/minecraft/item/ItemStack;setCount(I)Vintermediary method_7939Lnet/minecraft/class_1799;method_7939(I)Vofficial eLdak;e(I)V
-
capCount
public void capCount(int maxCount) Sets the count of items in this item stack to not exceedmaxCount.- Mappings:
Namespace Name Mixin selector named capCountLnet/minecraft/item/ItemStack;capCount(I)Vintermediary method_58408Lnet/minecraft/class_1799;method_58408(I)Vofficial fLdak;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 incrementLnet/minecraft/item/ItemStack;increment(I)Vintermediary method_7933Lnet/minecraft/class_1799;method_7933(I)Vofficial gLdak;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 decrementLnet/minecraft/item/ItemStack;decrement(I)Vintermediary method_7934Lnet/minecraft/class_1799;method_7934(I)Vofficial hLdak;h(I)V
-
decrementUnlessCreative
Decrements the count of items in this item stack, unlessentityis a creative mode player.- Mappings:
Namespace Name Mixin selector named decrementUnlessCreativeLnet/minecraft/item/ItemStack;decrementUnlessCreative(ILnet/minecraft/entity/LivingEntity;)Vintermediary method_57008Lnet/minecraft/class_1799;method_57008(ILnet/minecraft/class_1309;)Vofficial aLdak;a(ILbyf;)V
-
splitUnlessCreative
- Mappings:
Namespace Name Mixin selector named splitUnlessCreativeLnet/minecraft/item/ItemStack;splitUnlessCreative(ILnet/minecraft/entity/LivingEntity;)Lnet/minecraft/item/ItemStack;intermediary method_60504Lnet/minecraft/class_1799;method_60504(ILnet/minecraft/class_1309;)Lnet/minecraft/class_1799;official bLdak;b(ILbyf;)Ldak;
-
usageTick
- Mappings:
Namespace Name Mixin selector named usageTickLnet/minecraft/item/ItemStack;usageTick(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;I)Vintermediary method_7949Lnet/minecraft/class_1799;method_7949(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;I)Vofficial bLdak;b(Ldkj;Lbyf;I)V
-
onItemEntityDestroyed
- Mappings:
Namespace Name Mixin selector named onItemEntityDestroyedLnet/minecraft/item/ItemStack;onItemEntityDestroyed(Lnet/minecraft/entity/ItemEntity;)Vintermediary method_33262Lnet/minecraft/class_1799;method_33262(Lnet/minecraft/class_1542;)Vofficial aLdak;a(Lcoo;)V
-
takesDamageFrom
- Mappings:
Namespace Name Mixin selector named takesDamageFromLnet/minecraft/item/ItemStack;takesDamageFrom(Lnet/minecraft/entity/damage/DamageSource;)Zintermediary method_58407Lnet/minecraft/class_1799;method_58407(Lnet/minecraft/class_1282;)Zofficial aLdak;a(Lbvt;)Z
-
canRepairWith
- Mappings:
Namespace Name Mixin selector named canRepairWithLnet/minecraft/item/ItemStack;canRepairWith(Lnet/minecraft/item/ItemStack;)Zintermediary method_61655Lnet/minecraft/class_1799;method_61655(Lnet/minecraft/class_1799;)Zofficial cLdak;c(Ldak;)Z
-
canMine
- Mappings:
Namespace Name Mixin selector named canMineLnet/minecraft/item/ItemStack;canMine(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;)Zintermediary method_66334Lnet/minecraft/class_1799;method_66334(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;)Zofficial aLdak;a(Lebq;Ldkj;Liw;Lcsi;)Z
-