net.minecraft.item

public final class ItemStack

implements ComponentHolder, ItemStackView

net.minecraft.world.item.ItemStack
net.minecraft.world.item.ItemStack
net.minecraft.class_1799
net.minecraft.item.ItemStack

Field summary

Modifier and TypeField
private static final List<Text>
OP_NBT_WARNING
OP_NBT_WARNING
field_55546
OPERATOR_WARNINGS
private static final Text
UNBREAKABLE_TOOLTIP
UNBREAKABLE_TOOLTIP
field_56297
UNBREAKABLE_TEXT
private static final Text
INTANGIBLE_TOOLTIP
INTANGIBLE_TOOLTIP
field_63379
INTANGIBLE_TEXT
public static final com.mojang.serialization.MapCodec<ItemStack>
MAP_CODEC
MAP_CODEC
field_55709
MAP_CODEC
public static final com.mojang.serialization.Codec<ItemStack>
CODEC
CODEC
field_24671
CODEC
public static final com.mojang.serialization.Codec<ItemStack>
OPTIONAL_CODEC
OPTIONAL_CODEC
field_49266
OPTIONAL_CODEC
public static final PacketCodec<RegistryByteBuf, ItemStack>
OPTIONAL_STREAM_CODEC
OPTIONAL_STREAM_CODEC
field_49268
OPTIONAL_PACKET_CODEC
public static final PacketCodec<RegistryByteBuf, ItemStack>
OPTIONAL_UNTRUSTED_STREAM_CODEC
OPTIONAL_UNTRUSTED_STREAM_CODEC
field_58141
LENGTH_PREPENDED_OPTIONAL_PACKET_CODEC
public static final PacketCodec<RegistryByteBuf, ItemStack>
STREAM_CODEC
STREAM_CODEC
field_48349
PACKET_CODEC
public static final PacketCodec<RegistryByteBuf, List<ItemStack>>
OPTIONAL_LIST_STREAM_CODEC
OPTIONAL_LIST_STREAM_CODEC
field_49269
OPTIONAL_LIST_PACKET_CODEC
private static final org.slf4j.Logger
LOGGER
LOGGER
field_8033
LOGGER
public static final ItemStack
EMPTY
EMPTY
field_8037
EMPTY
private static final Text
DISABLED_ITEM_TOOLTIP
DISABLED_ITEM_TOOLTIP
field_40211
DISABLED_TEXT
private int
count
count
field_8031
count
private int
popTime
popTime
field_8030
bobbingAnimationTime
private final RegistryEntry<Item>
item
item
field_8038
item
private final MergedComponentMap
components
components
field_49270
components

Constructor summary

ModifierConstructor
public (ItemConvertible item, int count)
public (ItemConvertible item)
public (RegistryEntry<Item> itemEntry, int count)
public (RegistryEntry<Item> entry)
public (RegistryEntry<Item> item, int count, ComponentChanges changes)
private (RegistryEntry<Item> item, int count, MergedComponentMap components)
private (Void v)

Method summary

Modifier and TypeMethod
public static com.mojang.serialization.DataResult<ItemStack>
validateStrict(ItemStack itemStack)
validateStrict(ItemStack itemStack)
method_57372(class_1799 arg0)
validate(ItemStack stack)
private static PacketCodec<RegistryByteBuf, ItemStack>
createOptionalStreamCodec(StreamCodec<RegistryFriendlyByteBuf, DataComponentPatch> patchCodec)
createOptionalStreamCodec(StreamCodec<RegistryFriendlyByteBuf, DataComponentPatch> patchCodec)
method_68810(class_9139<class_9129, class_9326> arg0)
createOptionalPacketCodec(PacketCodec<RegistryByteBuf, ComponentChanges> componentsPacketCodec)
public static PacketCodec<RegistryByteBuf, ItemStack>
validatedStreamCodec(StreamCodec<RegistryFriendlyByteBuf, ItemStack> codec)
validatedStreamCodec(StreamCodec<RegistryFriendlyByteBuf, ItemStack> codec)
method_59693(class_9139<class_9129, class_1799> arg0)
createExtraValidatingPacketCodec(PacketCodec<RegistryByteBuf, ItemStack> basePacketCodec)
public Optional<TooltipData>
getTooltipImage()
getTooltipImage()
method_32347()
getTooltipData()
public ComponentMap
getComponents()
getComponents()
method_57353()
getComponents()
public ComponentMap
getPrototype()
getPrototype()
method_58658()
getDefaultComponents()
public ComponentChanges
getComponentsPatch()
getComponentsPatch()
method_57380()
getComponentChanges()
public ComponentMap
immutableComponents()
immutableComponents()
method_65359()
getImmutableComponents()
public boolean
hasNonDefault(DataComponentType<?> type)
hasNonDefault(DataComponentType<?> type)
method_65797(class_9331<?> arg0)
hasChangedComponent(ComponentType<?> type)
private static com.mojang.serialization.DataResult<?>
validateComponents(DataComponentMap components)
validateComponents(DataComponentMap components)
method_59691(class_9323 arg0)
validateComponents(ComponentMap components)
private static com.mojang.serialization.DataResult<?>
validateContainedItemSizes(Iterable<? extends ItemInstance> items)
validateContainedItemSizes(Iterable<? extends ItemInstance> items)
method_1_842(Iterable<? extends class_1_96> arg0)
validateContainedItemStackViews(Iterable<? extends ItemStackView> itemStackViews)
public boolean
isEmpty()
isEmpty()
method_7960()
isEmpty()
public boolean
isItemEnabled(FeatureFlagSet enabledFeatures)
isItemEnabled(FeatureFlagSet enabledFeatures)
method_45435(class_7699 arg0)
isItemEnabled(FeatureSet enabledFeatures)
public ItemStack
split(int amount)
split(int amount)
method_7971(int arg0)
split(int amount)
public ItemStack
copyAndClear()
copyAndClear()
method_51164()
copyAndEmpty()
public Item
getItem()
getItem()
method_7909()
getItem()
public RegistryEntry<Item>
typeHolder()
typeHolder()
method_40180()
getRegistryEntry()
public boolean
is(Predicate<Holder<Item>> item)
is(Predicate<Holder<Item>> item)
method_41407(Predicate<class_6880<class_1792>> arg0)
itemMatches(Predicate<RegistryEntry<Item>> predicate)
public ActionResult
useOn(UseOnContext context)
useOn(UseOnContext context)
method_7981(class_1838 arg0)
useOnBlock(ItemUsageContext context)
public float
getDestroySpeed(BlockState state)
getDestroySpeed(BlockState state)
method_7924(class_2680 arg0)
getMiningSpeedMultiplier(BlockState state)
public ActionResult
use(Level level, Player player, InteractionHand hand)
use(Level level, Player player, InteractionHand hand)
method_7913(class_1937 arg0, class_1657 arg1, class_1268 arg2)
use(World world, PlayerEntity user, Hand hand)
public ItemStack
finishUsingItem(Level level, LivingEntity livingEntity)
finishUsingItem(Level level, LivingEntity livingEntity)
method_7910(class_1937 arg0, class_1309 arg1)
finishUsing(World world, LivingEntity user)
private ItemStack
applyAfterUseComponentSideEffects(LivingEntity user, ItemStack stackBeforeUsing)
applyAfterUseComponentSideEffects(LivingEntity user, ItemStack stackBeforeUsing)
method_62837(class_1309 arg0, class_1799 arg1)
applyRemainderAndCooldown(LivingEntity user, ItemStack stack)
public boolean
isStackable()
isStackable()
method_7946()
isStackable()
public boolean
isDamageableItem()
isDamageableItem()
method_7963()
isDamageable()
public boolean
isDamaged()
isDamaged()
method_7986()
isDamaged()
public int
getDamageValue()
getDamageValue()
method_7919()
getDamage()
public void
setDamageValue(int value)
setDamageValue(int value)
method_7974(int arg0)
setDamage(int damage)
public int
getMaxDamage()
getMaxDamage()
method_7936()
getMaxDamage()
public boolean
isBroken()
isBroken()
method_61657()
shouldBreak()
public boolean
nextDamageWillBreak()
nextDamageWillBreak()
method_63692()
willBreakNextUse()
public void
hurtAndBreak(int amount, ServerLevel level, ServerPlayer player, Consumer<Item> onBreak)
hurtAndBreak(int amount, ServerLevel level, ServerPlayer player, Consumer<Item> onBreak)
method_7956(int arg0, class_3218 arg1, class_3222 arg2, Consumer<class_1792> arg3)
damage(int amount, ServerWorld world, ServerPlayerEntity player, Consumer<Item> breakCallback)
private int
processDurabilityChange(int amount, ServerLevel level, ServerPlayer player)
processDurabilityChange(int amount, ServerLevel level, ServerPlayer player)
method_61651(int arg0, class_3218 arg1, class_3222 arg2)
calculateDamage(int baseDamage, ServerWorld world, ServerPlayerEntity player)
private void
applyDamage(int newDamage, ServerPlayer player, Consumer<Item> onBreak)
applyDamage(int newDamage, ServerPlayer player, Consumer<Item> onBreak)
method_61652(int arg0, class_3222 arg1, Consumer<class_1792> arg2)
onDurabilityChange(int damage, ServerPlayerEntity player, Consumer<Item> breakCallback)
public void
hurtWithoutBreaking(int amount, Player player)
hurtWithoutBreaking(int amount, Player player)
method_61653(int arg0, class_1657 arg1)
damage(int amount, PlayerEntity player)
public void
hurtAndBreak(int amount, LivingEntity owner, InteractionHand hand)
hurtAndBreak(int amount, LivingEntity owner, InteractionHand hand)
method_71012(int arg0, class_1309 arg1, class_1268 arg2)
damage(int amount, LivingEntity entity, Hand hand)
public void
hurtAndBreak(int amount, LivingEntity owner, EquipmentSlot slot)
hurtAndBreak(int amount, LivingEntity owner, EquipmentSlot slot)
method_7970(int arg0, class_1309 arg1, class_1304 arg2)
damage(int amount, LivingEntity entity, EquipmentSlot slot)
public ItemStack
hurtAndConvertOnBreak(int amount, ItemLike newItem, LivingEntity owner, EquipmentSlot slot)
hurtAndConvertOnBreak(int amount, ItemLike newItem, LivingEntity owner, EquipmentSlot slot)
method_60986(int arg0, class_1935 arg1, class_1309 arg2, class_1304 arg3)
damage(int amount, ItemConvertible itemAfterBreaking, LivingEntity entity, EquipmentSlot slot)
public boolean
isBarVisible()
isBarVisible()
method_31578()
isItemBarVisible()
public int
getBarWidth()
getBarWidth()
method_31579()
getItemBarStep()
public int
getBarColor()
getBarColor()
method_31580()
getItemBarColor()
public boolean
overrideStackedOnOther(Slot slot, ClickAction clickAction, Player player)
overrideStackedOnOther(Slot slot, ClickAction clickAction, Player player)
method_31575(class_1735 arg0, class_5536 arg1, class_1657 arg2)
onStackClicked(Slot slot, ClickType clickType, PlayerEntity player)
public boolean
overrideOtherStackedOnMe(ItemStack other, Slot slot, ClickAction clickAction, Player player, SlotAccess carriedItem)
overrideOtherStackedOnMe(ItemStack other, Slot slot, ClickAction clickAction, Player player, SlotAccess carriedItem)
method_31576(class_1799 arg0, class_1735 arg1, class_5536 arg2, class_1657 arg3, class_5630 arg4)
onClicked(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player, StackReference cursorStackReference)
public boolean
hurtEnemy(LivingEntity mob, LivingEntity attacker)
hurtEnemy(LivingEntity mob, LivingEntity attacker)
method_7979(class_1309 arg0, class_1309 arg1)
postHit(LivingEntity target, LivingEntity user)
public void
postHurtEnemy(LivingEntity mob, LivingEntity attacker)
postHurtEnemy(LivingEntity mob, LivingEntity attacker)
method_59979(class_1309 arg0, class_1309 arg1)
postDamageEntity(LivingEntity target, LivingEntity user)
public void
mineBlock(Level level, BlockState state, BlockPos pos, Player owner)
mineBlock(Level level, BlockState state, BlockPos pos, Player owner)
method_7952(class_1937 arg0, class_2680 arg1, class_2338 arg2, class_1657 arg3)
postMine(World world, BlockState state, BlockPos pos, PlayerEntity miner)
public boolean
isCorrectToolForDrops(BlockState state)
isCorrectToolForDrops(BlockState state)
method_7951(class_2680 arg0)
isSuitableFor(BlockState state)
public ActionResult
interactLivingEntity(Player player, LivingEntity target, InteractionHand hand)
interactLivingEntity(Player player, LivingEntity target, InteractionHand hand)
method_7920(class_1657 arg0, class_1309 arg1, class_1268 arg2)
useOnEntity(PlayerEntity user, LivingEntity entity, Hand hand)
public ItemStack
copy()
copy()
method_7972()
copy()
public ItemStack
copyWithCount(int count)
copyWithCount(int count)
method_46651(int arg0)
copyWithCount(int count)
public ItemStack
transmuteCopy(ItemLike newItem)
transmuteCopy(ItemLike newItem)
method_60503(class_1935 arg0)
withItem(ItemConvertible item)
public ItemStack
transmuteCopy(ItemLike newItem, int newCount)
transmuteCopy(ItemLike newItem, int newCount)
method_56701(class_1935 arg0, int arg1)
copyComponentsToNewStack(ItemConvertible item, int count)
private ItemStack
transmuteCopyIgnoreEmpty(ItemLike newItem, int newCount)
transmuteCopyIgnoreEmpty(ItemLike newItem, int newCount)
method_56704(class_1935 arg0, int arg1)
copyComponentsToNewStackIgnoreEmpty(ItemConvertible item, int count)
public static boolean
matches(ItemStack a, ItemStack b)
matches(ItemStack a, ItemStack b)
method_7973(class_1799 arg0, class_1799 arg1)
areEqual(ItemStack left, ItemStack right)
public static boolean
listMatches(List<ItemStack> left, List<ItemStack> right)
listMatches(List<ItemStack> left, List<ItemStack> right)
method_57362(List<class_1799> arg0, List<class_1799> arg1)
stacksEqual(List<ItemStack> left, List<ItemStack> right)
public static boolean
isSameItem(ItemStack a, ItemStack b)
isSameItem(ItemStack a, ItemStack b)
method_7984(class_1799 arg0, class_1799 arg1)
areItemsEqual(ItemStack left, ItemStack right)
public static boolean
isSameItemSameComponents(ItemStack a, ItemStack b)
isSameItemSameComponents(ItemStack a, ItemStack b)
method_31577(class_1799 arg0, class_1799 arg1)
areItemsAndComponentsEqual(ItemStack stack, ItemStack otherStack)
public static boolean
matchesIgnoringComponents(ItemStack a, ItemStack b, Predicate<DataComponentType<?>> ignoredPredicate)
matchesIgnoringComponents(ItemStack a, ItemStack b, Predicate<DataComponentType<?>> ignoredPredicate)
method_75222(class_1799 arg0, class_1799 arg1, Predicate<class_9331<?>> arg2)
shouldSkipHandAnimationOnSwap(ItemStack from, ItemStack to, Predicate<ComponentType<?>> skippedComponent)
public static com.mojang.serialization.MapCodec<ItemStack>
lenientOptionalFieldOf(String name)
lenientOptionalFieldOf(String name)
method_56702(String arg0)
createOptionalCodec(String fieldName)
public static int
hashItemAndComponents(ItemStack item)
hashItemAndComponents(ItemStack item)
method_57355(class_1799 arg0)
hashCode(ItemStack stack)
public static int
hashStackList(List<ItemStack> items)
hashStackList(List<ItemStack> items)
method_57361(List<class_1799> arg0)
listHashCode(List<ItemStack> stacks)
public void
inventoryTick(Level level, Entity owner, EquipmentSlot slot)
inventoryTick(Level level, Entity owner, EquipmentSlot slot)
method_7917(class_1937 arg0, class_1297 arg1, class_1304 arg2)
inventoryTick(World world, Entity entity, EquipmentSlot slot)
public void
onCraftedBy(Player player, int craftCount)
onCraftedBy(Player player, int craftCount)
method_7982(class_1657 arg0, int arg1)
onCraftByPlayer(PlayerEntity player, int amount)
public void
onCraftedBySystem(Level level)
onCraftedBySystem(Level level)
method_54466(class_1937 arg0)
onCraftByCrafter(World world)
public int
getUseDuration(LivingEntity user)
getUseDuration(LivingEntity user)
method_7935(class_1309 arg0)
getMaxUseTime(LivingEntity user)
public UseAction
getUseAnimation()
getUseAnimation()
method_7976()
getUseAction()
public void
releaseUsing(Level level, LivingEntity entity, int remainingTime)
releaseUsing(Level level, LivingEntity entity, int remainingTime)
method_7930(class_1937 arg0, class_1309 arg1, int arg2)
onStoppedUsing(World world, LivingEntity user, int remainingUseTicks)
public void
causeUseVibration(Entity causer, Holder$Reference<GameEvent> event)
causeUseVibration(Entity causer, Holder$Reference<GameEvent> event)
method_76590(class_1297 arg0, class_6880$class_6883<class_5712> arg1)
emitUseGameEvent(Entity user, RegistryEntry$Reference<GameEvent> gameEvent)
public boolean
useOnRelease()
useOnRelease()
method_7967()
isUsedOnRelease()
public <T> T
set(DataComponentType<T> type, T value)
set(DataComponentType<T> type, T value)
method_57379(class_9331<T> arg0, T arg1)
set(ComponentType<T> type, T value)
public <T> T
set(TypedDataComponent<T> value)
set(TypedDataComponent<T> value)
method_74887(class_9336<T> arg0)
set(Component<T> component)
public <T> void
copyFrom(DataComponentType<T> type, DataComponentGetter source)
copyFrom(DataComponentType<T> type, DataComponentGetter source)
method_66697(class_9331<T> arg0, class_9473 arg1)
copy(ComponentType<T> type, ComponentsAccess from)
public <T, U> T
update(DataComponentType<T> type, T defaultValue, U value, BiFunction<T, U, T> combiner)
update(DataComponentType<T> type, T defaultValue, U value, BiFunction<T, U, T> combiner)
method_57367(class_9331<T> arg0, T arg1, U arg2, BiFunction<T, U, T> arg3)
apply(ComponentType<T> type, T defaultValue, U change, BiFunction<T, U, T> applier)
public <T> T
update(DataComponentType<T> type, T defaultValue, UnaryOperator<T> function)
update(DataComponentType<T> type, T defaultValue, UnaryOperator<T> function)
method_57368(class_9331<T> arg0, T arg1, UnaryOperator<T> arg2)
apply(ComponentType<T> type, T defaultValue, UnaryOperator<T> applier)
public <T> T
remove(DataComponentType<? extends T> type)
remove(DataComponentType<? extends T> type)
method_57381(class_9331<? extends T> arg0)
remove(ComponentType<? extends T> type)
public void
applyComponentsAndValidate(DataComponentPatch patch)
applyComponentsAndValidate(DataComponentPatch patch)
method_59692(class_9326 arg0)
applyChanges(ComponentChanges changes)
public void
applyComponents(DataComponentPatch patch)
applyComponents(DataComponentPatch patch)
method_57366(class_9326 arg0)
applyUnvalidatedChanges(ComponentChanges changes)
public void
applyComponents(DataComponentMap components)
applyComponents(DataComponentMap components)
method_57365(class_9323 arg0)
applyComponentsFrom(ComponentMap components)
public Text
getHoverName()
getHoverName()
method_7964()
getName()
public Text
getCustomName()
getCustomName()
method_65130()
getCustomName()
public Text
getItemName()
getItemName()
method_63693()
getItemName()
public Text
getStyledHoverName()
getStyledHoverName()
method_63015()
getFormattedName()
public <T extends TooltipAppender> void
addToTooltip(DataComponentType<T> type, Item$TooltipContext context, TooltipDisplay display, Consumer<Component> consumer, TooltipFlag flag)
addToTooltip(DataComponentType<T> type, Item$TooltipContext context, TooltipDisplay display, Consumer<Component> consumer, TooltipFlag flag)
method_57369(class_9331<T> arg0, class_1792$class_9635 arg1, class_10712 arg2, Consumer<class_2561> arg3, class_1836 arg4)
appendComponentTooltip(ComponentType<T> componentType, Item$TooltipContext context, TooltipDisplayComponent displayComponent, Consumer<Text> textConsumer, TooltipType type)
public List<Text>
getTooltipLines(Item$TooltipContext context, Player player, TooltipFlag tooltipFlag)
getTooltipLines(Item$TooltipContext context, Player player, TooltipFlag tooltipFlag)
method_7950(class_1792$class_9635 arg0, class_1657 arg1, class_1836 arg2)
getTooltip(Item$TooltipContext context, PlayerEntity player, TooltipType type)
public void
addDetailsToTooltip(Item$TooltipContext context, TooltipDisplay display, Player player, TooltipFlag tooltipFlag, Consumer<Component> builder)
addDetailsToTooltip(Item$TooltipContext context, TooltipDisplay display, Player player, TooltipFlag tooltipFlag, Consumer<Component> builder)
method_67194(class_1792$class_9635 arg0, class_10712 arg1, class_1657 arg2, class_1836 arg3, Consumer<class_2561> arg4)
appendTooltip(Item$TooltipContext context, TooltipDisplayComponent displayComponent, PlayerEntity player, TooltipType type, Consumer<Text> textConsumer)
private void
addUnitComponentToTooltip(DataComponentType<?> dataComponentType, Component component, TooltipDisplay display, Consumer<Component> builder)
addUnitComponentToTooltip(DataComponentType<?> dataComponentType, Component component, TooltipDisplay display, Consumer<Component> builder)
method_75223(class_9331<?> arg0, class_2561 arg1, class_10712 arg2, Consumer<class_2561> arg3)
appendTooltipIfComponentExists(ComponentType<?> type, Text tooltip, TooltipDisplayComponent displayComponent, Consumer<Text> textConsumer)
private void
addAttributeTooltips(Consumer<Component> consumer, TooltipDisplay display, Player player)
addAttributeTooltips(Consumer<Component> consumer, TooltipDisplay display, Player player)
method_57363(Consumer<class_2561> arg0, class_10712 arg1, class_1657 arg2)
appendAttributeModifiersTooltip(Consumer<Text> textConsumer, TooltipDisplayComponent displayComponent, PlayerEntity player)
public boolean
hasFoil()
hasFoil()
method_7958()
hasGlint()
public Rarity
getRarity()
getRarity()
method_7932()
getRarity()
public boolean
isEnchantable()
isEnchantable()
method_7923()
isEnchantable()
public void
enchant(Holder<Enchantment> enchantment, int level)
enchant(Holder<Enchantment> enchantment, int level)
method_7978(class_6880<class_1887> arg0, int arg1)
addEnchantment(RegistryEntry<Enchantment> enchantment, int level)
public boolean
isEnchanted()
isEnchanted()
method_7942()
hasEnchantments()
public ItemEnchantmentsComponent
getEnchantments()
getEnchantments()
method_58657()
getEnchantments()
public void
forEachModifier(EquipmentSlotGroup slot, org.apache.commons.lang3.function.TriConsumer<Holder<Attribute>, AttributeModifier, ItemAttributeModifiers$Display> consumer)
forEachModifier(EquipmentSlotGroup slot, org.apache.commons.lang3.function.TriConsumer<Holder<Attribute>, AttributeModifier, ItemAttributeModifiers$Display> consumer)
method_60617(class_9274 arg0, org.apache.commons.lang3.function.TriConsumer<class_6880<class_1320>, class_1322, class_9285$class_11193> arg1)
applyAttributeModifier(AttributeModifierSlot slot, org.apache.commons.lang3.function.TriConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier, AttributeModifiersComponent$Display> attributeModifierConsumer)
public void
forEachModifier(EquipmentSlot slot, BiConsumer<Holder<Attribute>, AttributeModifier> consumer)
forEachModifier(EquipmentSlot slot, BiConsumer<Holder<Attribute>, AttributeModifier> consumer)
method_57354(class_1304 arg0, BiConsumer<class_6880<class_1320>, class_1322> arg1)
applyAttributeModifiers(EquipmentSlot slot, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> attributeModifierConsumer)
public Text
getDisplayName()
getDisplayName()
method_7954()
toHoverableText()
public SwingAnimationComponent
getSwingAnimation()
getSwingAnimation()
method_75218()
getSwingAnimation()
public boolean
canPlaceOnBlockInAdventureMode(BlockInWorld blockInWorld)
canPlaceOnBlockInAdventureMode(BlockInWorld blockInWorld)
method_57357(class_2694 arg0)
canPlaceOn(CachedBlockPosition pos)
public boolean
canBreakBlockInAdventureMode(BlockInWorld blockInWorld)
canBreakBlockInAdventureMode(BlockInWorld blockInWorld)
method_57373(class_2694 arg0)
canBreak(CachedBlockPosition pos)
public int
getPopTime()
getPopTime()
method_7965()
getBobbingAnimationTime()
public void
setPopTime(int popTime)
setPopTime(int popTime)
method_7912(int arg0)
setBobbingAnimationTime(int bobbingAnimationTime)
public int
getCount()
getCount()
method_7947()
getCount()
public int
count()
count()
comp_1_67()
count()
public void
setCount(int count)
setCount(int count)
method_7939(int arg0)
setCount(int count)
public void
limitSize(int maxStackSize)
limitSize(int maxStackSize)
method_58408(int arg0)
capCount(int maxCount)
public void
grow(int amount)
grow(int amount)
method_7933(int arg0)
increment(int amount)
public void
shrink(int amount)
shrink(int amount)
method_7934(int arg0)
decrement(int amount)
public void
consume(int amount, LivingEntity owner)
consume(int amount, LivingEntity owner)
method_57008(int arg0, class_1309 arg1)
decrementUnlessCreative(int amount, LivingEntity entity)
public ItemStack
consumeAndReturn(int amount, LivingEntity owner)
consumeAndReturn(int amount, LivingEntity owner)
method_60504(int arg0, class_1309 arg1)
splitUnlessCreative(int amount, LivingEntity entity)
public void
onUseTick(Level level, LivingEntity livingEntity, int ticksRemaining)
onUseTick(Level level, LivingEntity livingEntity, int ticksRemaining)
method_7949(class_1937 arg0, class_1309 arg1, int arg2)
usageTick(World world, LivingEntity user, int remainingUseTicks)
public void
onDestroyed(ItemEntity itemEntity)
onDestroyed(ItemEntity itemEntity)
method_33262(class_1542 arg0)
onItemEntityDestroyed(ItemEntity entity)
public boolean
canBeHurtBy(DamageSource source)
canBeHurtBy(DamageSource source)
method_58407(class_1282 arg0)
takesDamageFrom(DamageSource source)
public boolean
isValidRepairItem(ItemStack repairItem)
isValidRepairItem(ItemStack repairItem)
method_61655(class_1799 arg0)
canRepairWith(ItemStack ingredient)
public boolean
canDestroyBlock(BlockState state, Level level, BlockPos pos, Player player)
canDestroyBlock(BlockState state, Level level, BlockPos pos, Player player)
method_66334(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1657 arg3)
canMine(BlockState state, World world, BlockPos pos, PlayerEntity player)
public DamageSource
getDamageSource(LivingEntity attacker)
getDamageSource(LivingEntity attacker)
method_75220(class_1309 arg0)
getDamageSource(LivingEntity attacker)