net.minecraft.world.item

public final class ItemStack

bmb
net.minecraft.world.item.ItemStack
net.minecraft.class_1799
net.minecraft.item.ItemStack
net.minecraft.item.ItemStack
net.minecraft.server.v1_16_R3.ItemStack

Field summary

Modifier and TypeField
public static final com.mojang.serialization.Codec<ItemStack>
a
CODEC
field_24671
CODEC
field_234691_a_
private static final org.apache.logging.log4j.Logger
d
LOGGER
field_8033
LOGGER
field_199558_c
public static final ItemStack
b
EMPTY
field_8037
EMPTY
field_190927_a
public static final DecimalFormat
c
ATTRIBUTE_MODIFIER_FORMAT
field_8029
MODIFIER_FORMAT
field_111284_a
private static final Style
e
LORE_STYLE
field_24092
LORE_STYLE
field_234692_e_
private int
f
count
field_8031
count
field_77994_a
count
private int
g
popTime
field_8030
cooldown
field_77992_b
private final Item
h
item
field_8038
item
field_151002_e
item
private CompoundTag
i
tag
field_8040
tag
field_77990_d
tag
private boolean
j
emptyCacheFlag
field_8036
empty
field_190928_g
private Entity
k
entityRepresentation
field_24093
holder
field_234693_k_
private BlockInWorld
l
cachedBreakBlock
field_8039
lastDestroyPos
field_179552_h
private boolean
m
cachedBreakBlockResult
field_8035
lastDestroyResult
field_179553_i
private BlockInWorld
n
cachedPlaceBlock
field_8032
lastPlaceOnPos
field_179550_j
private boolean
o
cachedPlaceBlockResult
field_8034
lastPlaceOnResult
field_179551_k

Constructor summary

ModifierConstructor
public (ItemLike item)
private (ItemLike item, int count, Optional<CompoundTag> tag)
public (ItemLike item, int count)
private (CompoundTag tag)

Method summary

Modifier and TypeMethod
private void
I()
updateEmptyCacheFlag()
method_7957()
updateEmptyState()
func_190923_F()
checkEmpty()
public static ItemStack
a(md arg0)
of(CompoundTag arg0)
method_7915(class_2487 arg0)
fromNbt(NbtCompound nbt)
func_199557_a(CompoundNBT arg0)
public boolean
a()
isEmpty()
method_7960()
isEmpty()
func_190926_b()
isEmpty()
public ItemStack
a(int arg0)
split(int arg0)
method_7971(int arg0)
split(int amount)
func_77979_a(int arg0)
cloneAndSubtract(int arg0)
public Item
b()
getItem()
method_7909()
getItem()
func_77973_b()
getItem()
public InteractionResult
a(boa arg0)
useOn(UseOnContext arg0)
method_7981(class_1838 arg0)
useOnBlock(ItemUsageContext context)
func_196084_a(ItemUseContext arg0)
placeItem(ItemActionContext arg0)
public float
a(ceh arg0)
getDestroySpeed(BlockState arg0)
method_7924(class_2680 arg0)
getMiningSpeedMultiplier(BlockState state)
func_150997_a(BlockState arg0)
public InteractionResultHolder<ItemStack>
a(brx arg0, bfw arg1, aot arg2)
use(Level arg0, Player arg1, InteractionHand arg2)
method_7913(class_1937 arg0, class_1657 arg1, class_1268 arg2)
use(World world, PlayerEntity user, Hand hand)
func_77957_a(World arg0, PlayerEntity arg1, Hand arg2)
public ItemStack
a(brx arg0, aqm arg1)
finishUsingItem(Level arg0, LivingEntity arg1)
method_7910(class_1937 arg0, class_1309 arg1)
finishUsing(World world, LivingEntity user)
func_77950_b(World arg0, LivingEntity arg1)
public CompoundTag
b(md arg0)
save(CompoundTag arg0)
method_7953(class_2487 arg0)
writeNbt(NbtCompound nbt)
func_77955_b(CompoundNBT arg0)
save(NBTTagCompound arg0)
public int
c()
getMaxStackSize()
method_7914()
getMaxCount()
func_77976_d()
getMaxStackSize()
public boolean
d()
isStackable()
method_7946()
isStackable()
func_77985_e()
isStackable()
public boolean
e()
isDamageableItem()
method_7963()
isDamageable()
func_77984_f()
public boolean
f()
isDamaged()
method_7986()
isDamaged()
func_77951_h()
public int
g()
getDamageValue()
method_7919()
getDamage()
func_77952_i()
getDamage()
public void
b(int arg0)
setDamageValue(int arg0)
method_7974(int arg0)
setDamage(int damage)
func_196085_b(int arg0)
setDamage(int arg0)
public int
h()
getMaxDamage()
method_7936()
getMaxDamage()
func_77958_k()
public boolean
a(int arg0, Random arg1, aah arg2)
hurt(int arg0, Random arg1, ServerPlayer arg2)
method_7970(int arg0, Random arg1, class_3222 arg2)
damage(int amount, Random random, ServerPlayerEntity player)
func_96631_a(int arg0, Random arg1, ServerPlayerEntity arg2)
isDamaged(int arg0, Random arg1, EntityPlayer arg2)
public <T extends LivingEntity> void
a(int arg0, T arg1, Consumer<T> arg2)
hurtAndBreak(int arg0, T arg1, Consumer<T> arg2)
method_7956(int arg0, T arg1, Consumer<T> arg2)
damage(int amount, T entity, Consumer<T> breakCallback)
func_222118_a(int arg0, T arg1, Consumer<T> arg2)
damage(int arg0, T arg1, Consumer<T> arg2)
public void
a(aqm arg0, bfw arg1)
hurtEnemy(LivingEntity arg0, Player arg1)
method_7979(class_1309 arg0, class_1657 arg1)
postHit(LivingEntity target, PlayerEntity attacker)
func_77961_a(LivingEntity arg0, PlayerEntity arg1)
public void
a(brx arg0, ceh arg1, fx arg2, bfw arg3)
mineBlock(Level arg0, BlockState arg1, BlockPos arg2, Player arg3)
method_7952(class_1937 arg0, class_2680 arg1, class_2338 arg2, class_1657 arg3)
postMine(World world, BlockState state, BlockPos pos, PlayerEntity miner)
func_179548_a(World arg0, BlockState arg1, BlockPos arg2, PlayerEntity arg3)
public boolean
b(ceh arg0)
isCorrectToolForDrops(BlockState arg0)
method_7951(class_2680 arg0)
isSuitableFor(BlockState state)
func_150998_b(BlockState arg0)
canDestroySpecialBlock(IBlockData arg0)
public InteractionResult
a(bfw arg0, aqm arg1, aot arg2)
interactLivingEntity(Player arg0, LivingEntity arg1, InteractionHand arg2)
method_7920(class_1657 arg0, class_1309 arg1, class_1268 arg2)
useOnEntity(PlayerEntity user, LivingEntity entity, Hand hand)
func_111282_a_(PlayerEntity arg0, LivingEntity arg1, Hand arg2)
public ItemStack
i()
copy()
method_7972()
copy()
func_77946_l()
cloneItemStack()
public static boolean
a(bmb arg0, bmb arg1)
tagMatches(ItemStack arg0, ItemStack arg1)
method_7975(class_1799 arg0, class_1799 arg1)
areTagsEqual(ItemStack left, ItemStack right)
func_77970_a(ItemStack arg0, ItemStack arg1)
equals(ItemStack arg0, ItemStack arg1)
public static boolean
b(bmb arg0, bmb arg1)
matches(ItemStack arg0, ItemStack arg1)
method_7973(class_1799 arg0, class_1799 arg1)
areEqual(ItemStack left, ItemStack right)
func_77989_b(ItemStack arg0, ItemStack arg1)
matches(ItemStack arg0, ItemStack arg1)
private boolean
c(bmb arg0)
matches(ItemStack arg0)
method_7968(class_1799 arg0)
isEqual(ItemStack stack)
func_77959_d(ItemStack arg0)
public static boolean
c(bmb arg0, bmb arg1)
isSame(ItemStack arg0, ItemStack arg1)
method_7984(class_1799 arg0, class_1799 arg1)
areItemsEqualIgnoreDamage(ItemStack left, ItemStack right)
func_179545_c(ItemStack arg0, ItemStack arg1)
public static boolean
d(bmb arg0, bmb arg1)
isSameIgnoreDurability(ItemStack arg0, ItemStack arg1)
method_7987(class_1799 arg0, class_1799 arg1)
areItemsEqual(ItemStack left, ItemStack right)
func_185132_d(ItemStack arg0, ItemStack arg1)
public boolean
a(bmb arg0)
sameItem(ItemStack arg0)
method_7962(class_1799 arg0)
isItemEqualIgnoreDamage(ItemStack stack)
func_77969_a(ItemStack arg0)
doMaterialsMatch(ItemStack arg0)
public boolean
b(bmb arg0)
sameItemStackIgnoreDurability(ItemStack arg0)
method_7929(class_1799 arg0)
isItemEqual(ItemStack stack)
func_185136_b(ItemStack arg0)
public String
j()
getDescriptionId()
method_7922()
getTranslationKey()
func_77977_a()
public void
a(brx arg0, aqa arg1, int arg2, boolean arg3)
inventoryTick(Level arg0, Entity arg1, int arg2, boolean arg3)
method_7917(class_1937 arg0, class_1297 arg1, int arg2, boolean arg3)
inventoryTick(World world, Entity entity, int slot, boolean selected)
func_77945_a(World arg0, Entity arg1, int arg2, boolean arg3)
public void
a(brx arg0, bfw arg1, int arg2)
onCraftedBy(Level arg0, Player arg1, int arg2)
method_7982(class_1937 arg0, class_1657 arg1, int arg2)
onCraft(World world, PlayerEntity player, int amount)
func_77980_a(World arg0, PlayerEntity arg1, int arg2)
public int
k()
getUseDuration()
method_7935()
getMaxUseTime()
func_77988_m()
public UseAnim
l()
getUseAnimation()
method_7976()
getUseAction()
func_77975_n()
public void
a(brx arg0, aqm arg1, int arg2)
releaseUsing(Level arg0, LivingEntity arg1, int arg2)
method_7930(class_1937 arg0, class_1309 arg1, int arg2)
onStoppedUsing(World world, LivingEntity user, int remainingUseTicks)
func_77974_b(World arg0, LivingEntity arg1, int arg2)
public boolean
m()
useOnRelease()
method_7967()
isUsedOnRelease()
func_222122_m()
public boolean
n()
hasTag()
method_7985()
hasTag()
func_77942_o()
hasTag()
public CompoundTag
o()
getTag()
method_7969()
getTag()
func_77978_p()
getTag()
public CompoundTag
p()
getOrCreateTag()
method_7948()
getOrCreateTag()
func_196082_o()
getOrCreateTag()
public CompoundTag
a(String arg0)
getOrCreateTagElement(String arg0)
method_7911(String arg0)
getOrCreateSubTag(String key)
func_190925_c(String arg0)
public CompoundTag
b(String arg0)
getTagElement(String arg0)
method_7941(String arg0)
getSubTag(String key)
func_179543_a(String arg0)
public void
c(String arg0)
removeTagKey(String arg0)
method_7983(String arg0)
removeSubTag(String key)
func_196083_e(String arg0)
removeTag(String arg0)
public ListTag
q()
getEnchantmentTags()
method_7921()
getEnchantments()
func_77986_q()
getEnchantments()
public void
c(md arg0)
setTag(CompoundTag arg0)
method_7980(class_2487 arg0)
setTag(NbtCompound tag)
func_77982_d(CompoundNBT arg0)
setTag(NBTTagCompound arg0)
public Component
r()
getHoverName()
method_7964()
getName()
func_200301_q()
getName()
public ItemStack
a(nr arg0)
setHoverName(Component arg0)
method_7977(class_2561 arg0)
setCustomName(Text name)
func_200302_a(ITextComponent arg0)
public void
s()
resetHoverName()
method_7925()
removeCustomName()
func_135074_t()
public boolean
t()
hasCustomHoverName()
method_7938()
hasCustomName()
func_82837_s()
hasName()
public void
a(bmb$a arg0)
hideTooltipPart(ItemStack$TooltipPart arg0)
method_30268(class_1799$class_5422 arg0)
addHideFlag(ItemStack$TooltipSection tooltipSection)
func_242395_a(ItemStack$TooltipDisplayFlags arg0)
public boolean
u()
hasFoil()
method_7958()
hasGlint()
func_77962_s()
public Rarity
v()
getRarity()
method_7932()
getRarity()
func_77953_t()
public boolean
w()
isEnchantable()
method_7923()
isEnchantable()
func_77956_u()
canEnchant()
public void
a(bps arg0, int arg1)
enchant(Enchantment arg0, int arg1)
method_7978(class_1887 arg0, int arg1)
addEnchantment(Enchantment enchantment, int level)
func_77966_a(Enchantment arg0, int arg1)
addEnchantment(Enchantment arg0, int arg1)
public boolean
x()
isEnchanted()
method_7942()
hasEnchantments()
func_77948_v()
hasEnchantments()
public void
a(String arg0, mt arg1)
addTagElement(String arg0, Tag arg1)
method_7959(String arg0, class_2520 arg1)
putSubTag(String key, NbtElement tag)
func_77983_a(String arg0, INBT arg1)
public boolean
y()
isFramed()
method_7961()
isInFrame()
func_82839_y()
public void
a(aqa arg0)
setEntityRepresentation(Entity arg0)
method_27320(class_1297 arg0)
setHolder(Entity holder)
func_234695_a_(Entity arg0)
public ItemFrame
z()
getFrame()
method_7945()
getFrame()
func_82836_z()
public Entity
A()
getEntityRepresentation()
method_27319()
getHolder()
func_234694_A_()
public int
B()
getBaseRepairCost()
method_7928()
getRepairCost()
func_82838_A()
getRepairCost()
public void
c(int arg0)
setRepairCost(int arg0)
method_7927(int arg0)
setRepairCost(int repairCost)
func_82841_c(int arg0)
setRepairCost(int arg0)
public com.google.common.collect.Multimap<Attribute, AttributeModifier>
a(aqf arg0)
getAttributeModifiers(EquipmentSlot arg0)
method_7926(class_1304 arg0)
getAttributeModifiers(EquipmentSlot slot)
func_111283_C(EquipmentSlotType arg0)
public void
a(arg arg0, arj arg1, aqf arg2)
addAttributeModifier(Attribute arg0, AttributeModifier arg1, EquipmentSlot arg2)
method_7916(class_1320 arg0, class_1322 arg1, class_1304 arg2)
addAttributeModifier(EntityAttribute attribute, EntityAttributeModifier modifier, EquipmentSlot slot)
func_185129_a(Attribute arg0, AttributeModifier arg1, EquipmentSlotType arg2)
public Component
C()
getDisplayName()
method_7954()
toHoverableText()
func_151000_E()
private static boolean
a(cel arg0, cel arg1)
areSameBlocks(BlockInWorld arg0, BlockInWorld arg1)
method_7918(class_2694 arg0, class_2694 arg1)
areBlocksEqual(CachedBlockPosition first, CachedBlockPosition second)
func_206846_a(CachedBlockInfo arg0, CachedBlockInfo arg1)
public boolean
a(aen arg0, cel arg1)
hasAdventureModeBreakTagForBlock(TagContainer arg0, BlockInWorld arg1)
method_7940(class_5415 arg0, class_2694 arg1)
canDestroy(TagManager tagManager, CachedBlockPosition pos)
func_206848_a(ITagCollectionSupplier arg0, CachedBlockInfo arg1)
public boolean
b(aen arg0, cel arg1)
hasAdventureModePlaceTagForBlock(TagContainer arg0, BlockInWorld arg1)
method_7944(class_5415 arg0, class_2694 arg1)
canPlaceOn(TagManager tagManager, CachedBlockPosition pos)
func_206847_b(ITagCollectionSupplier arg0, CachedBlockInfo arg1)
public int
D()
getPopTime()
method_7965()
getCooldown()
func_190921_D()
public void
d(int arg0)
setPopTime(int arg0)
method_7912(int arg0)
setCooldown(int cooldown)
func_190915_d(int arg0)
public int
E()
getCount()
method_7947()
getCount()
func_190916_E()
getCount()
public void
e(int arg0)
setCount(int arg0)
method_7939(int arg0)
setCount(int count)
func_190920_e(int arg0)
setCount(int arg0)
public void
f(int arg0)
grow(int arg0)
method_7933(int arg0)
increment(int amount)
func_190917_f(int arg0)
add(int arg0)
public void
g(int arg0)
shrink(int arg0)
method_7934(int arg0)
decrement(int amount)
func_190918_g(int arg0)
subtract(int arg0)
public void
b(brx arg0, aqm arg1, int arg2)
onUseTick(Level arg0, LivingEntity arg1, int arg2)
method_7949(class_1937 arg0, class_1309 arg1, int arg2)
usageTick(World world, LivingEntity user, int remainingUseTicks)
func_222121_b(World arg0, LivingEntity arg1, int arg2)
public boolean
F()
isEdible()
method_19267()
isFood()
func_222117_E()
public SoundEvent
G()
getDrinkingSound()
method_21832()
getDrinkSound()
func_226629_F_()
public SoundEvent
H()
getEatingSound()
method_21833()
getEatSound()
func_226630_G_()
public List<Component>
a(bfw arg0, bnl arg1)
getTooltipLines(Player arg0, TooltipFlag arg1)
method_7950(class_1657 arg0, class_1836 arg1)
getTooltip(PlayerEntity player, TooltipContext context)
func_82840_a(PlayerEntity arg0, ITooltipFlag arg1)
private static boolean
a(int arg0, bmb$a arg1)
shouldShowInTooltip(int arg0, ItemStack$TooltipPart arg1)
method_30267(int arg0, class_1799$class_5422 arg1)
isSectionVisible(int flags, ItemStack$TooltipSection tooltipSection)
func_242394_a(int arg0, ItemStack$TooltipDisplayFlags arg1)
private int
J()
getHideFlags()
method_30266()
getHideFlags()
func_242393_J()
public static void
a(List<nr> arg0, mj arg1)
appendEnchantmentNames(List<Component> arg0, ListTag arg1)
method_17870(List<class_2561> arg0, class_2499 arg1)
appendEnchantments(List<Text> tooltip, NbtList enchantments)
func_222120_a(List<ITextComponent> arg0, ListNBT arg1)
private static Collection<Component>
d(String arg0)
expandBlockState(String arg0)
method_7937(String arg0)
parseBlockTag(String tag)
func_206845_f(String arg0)