net.minecraft.item

public final class ItemStack

afj
net.minecraft.class_1071
net.minecraft.item.ItemStack
net.minecraft.item.ItemStack

Field summary

Modifier and TypeField
public static final ItemStack
a
field_15108
EMPTY
EMPTY
public static final DecimalFormat
b
field_6949
MODIFIER_FORMAT
DECIMALFORMAT
private int
c
field_4376
size
stackSize
private int
d
field_4377
popAnimationTime
animationsToGo
private final Item
e
field_6974
item
item
private NbtCompound
f
field_4379
nbt
stackTagCompound
private boolean
g
field_15109
cachedIsEmpty
isEmpty
private int
h
field_4380
metadata
itemDamage
private ItemFrameEntity
i
field_5446
itemFrame
itemFrame
private Block
j
field_12184
cachedMineBlockOverride
canDestroyCacheBlock
private boolean
k
field_12185
cachedMineBlockOverrideResult
canDestroyCacheResult
private Block
l
field_12186
cachedPlaceOnBlockOverride
canPlaceOnCacheBlock
private boolean
m
field_12187
cachedPlaceOnBlockOverrideResult
canPlaceOnCacheResult

Constructor summary

ModifierConstructor
public (Block block)
public (Block block, int size)
public (Block block, int size, int metadata)
public (Item item)
public (Item item, int size)
public (Item item, int size, int metadata)
public (NbtCompound nbt)

Method summary

Modifier and TypeMethod
private void
F()
method_13653()
cacheIsEmpty()
updateEmptyState()
public boolean
b()
method_13654()
isEmpty()
isEmpty()
public static void
a(ph arg0)
method_13311(class_2934 arg0)
registerSchema(DataFixerUpper dfu)
registerFixes(DataFixer fixer)
public ItemStack
a(int arg0)
method_3405(int arg0)
split(int amount)
splitStack(int amount)
public Item
c()
method_3421()
getItem()
getItem()
public InteractionResult
a(aay arg0, ajs arg1, co arg2, ri arg3, cv arg4, float arg5, float arg6, float arg7)
method_11394(class_988 arg0, class_1150 arg1, class_2552 arg2, class_2961 arg3, class_1354 arg4, float arg5, float arg6, float arg7)
useOn(PlayerEntity player, World world, BlockPos pos, InteractionHand hand, Direction face, float faceX, float faceY, float faceZ)
onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
public float
a(atl arg0)
method_11391(class_2232 arg0)
getMiningSpeed(BlockState state)
getStrVsBlock(IBlockState blockIn)
public InteractionResultHolder<ItemStack>
a(ajs arg0, aay arg1, ri arg2)
method_11390(class_1150 arg0, class_988 arg1, class_2961 arg2)
startUsing(World world, PlayerEntity player, InteractionHand hand)
useItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand hand)
public ItemStack
a(ajs arg0, sw arg1)
method_11388(class_1150 arg0, class_1699 arg1)
finishUsing(World world, LivingEntity entity)
onItemUseFinish(World worldIn, EntityLivingBase entityLiving)
public NbtCompound
a(du arg0)
method_3424(class_322 arg0)
writeNbt(NbtCompound nbt)
writeToNBT(NBTTagCompound nbt)
public int
d()
method_3432()
getMaxSize()
getMaxStackSize()
public boolean
e()
method_3435()
isStackable()
isStackable()
public boolean
f()
method_3436()
isDamageable()
isItemStackDamageable()
public boolean
g()
method_3437()
hasCustomData()
getHasSubtypes()
public boolean
h()
method_3438()
isDamaged()
isItemDamaged()
public int
i()
method_3439()
getDamage()
getItemDamage()
public int
j()
method_3440()
getMetadata()
getMetadata()
public void
b(int arg0)
method_3422(int arg0)
setDamage(int damage)
setItemDamage(int meta)
public int
k()
method_3441()
getMaxDamage()
getMaxDamage()
public boolean
a(int arg0, Random arg1)
method_5464(int arg0, Random arg1)
takeDamage(int amount, Random random)
attemptDamageItem(int amount, Random rand)
public void
a(int arg0, sw arg1)
method_6328(int arg0, class_1699 arg1)
takeDamageAndBreak(int amount, LivingEntity holder)
damageItem(int amount, EntityLivingBase entityIn)
public void
a(sw arg0, aay arg1)
method_3412(class_1699 arg0, class_988 arg1)
attack(LivingEntity target, PlayerEntity attacker)
hitEntity(EntityLivingBase entityIn, EntityPlayer playerIn)
public void
a(ajs arg0, atl arg1, co arg2, aay arg3)
method_11306(class_1150 arg0, class_2232 arg1, class_2552 arg2, class_988 arg3)
mineBlock(World world, BlockState state, BlockPos pos, PlayerEntity player)
onBlockDestroyed(World worldIn, IBlockState blockIn, BlockPos pos, EntityPlayer playerIn)
public boolean
b(atl arg0)
method_11396(class_2232 arg0)
canMineBlock(BlockState state)
canHarvestBlock(IBlockState blockIn)
public boolean
a(aay arg0, sw arg1, ri arg2)
method_6329(class_988 arg0, class_1699 arg1, class_2961 arg2)
interact(PlayerEntity player, LivingEntity entity, InteractionHand hand)
interactWithEntity(EntityPlayer playerIn, EntityLivingBase entityIn, EnumHand hand)
public ItemStack
l()
method_3442()
copy()
copy()
public static boolean
a(afj arg0, afj arg1)
method_3415(class_1071 arg0, class_1071 arg1)
matchesNbt(ItemStack stack1, ItemStack stack2)
areItemStackTagsEqual(ItemStack stackA, ItemStack stackB)
public static boolean
b(afj arg0, afj arg1)
method_3426(class_1071 arg0, class_1071 arg1)
matches(ItemStack stack1, ItemStack stack2)
areItemStacksEqual(ItemStack stackA, ItemStack stackB)
private boolean
d(afj arg0)
method_3434(class_1071 arg0)
matches(ItemStack other)
isItemStackEqual(ItemStack other)
public static boolean
c(afj arg0, afj arg1)
method_11311(class_1071 arg0, class_1071 arg1)
matchesItem(ItemStack stack1, ItemStack stack2)
areItemsEqual(ItemStack stackA, ItemStack stackB)
public static boolean
d(afj arg0, afj arg1)
method_11397(class_1071 arg0, class_1071 arg1)
matchesItemIgnoreDamage(ItemStack stack1, ItemStack stack2)
areItemsEqualIgnoreDurability(ItemStack stackA, ItemStack stackB)
public boolean
a(afj arg0)
method_3414(class_1071 arg0)
matchesItem(ItemStack other)
isItemEqual(ItemStack other)
public boolean
b(afj arg0)
method_11395(class_1071 arg0)
matchesItemIgnoreDamage(ItemStack other)
isItemEqualIgnoreDurability(ItemStack stack)
public String
a()
method_3404()
getTranslationKey()
getUnlocalizedName()
public void
a(ajs arg0, sn arg1, int arg2, boolean arg3)
method_3418(class_1150 arg0, class_864 arg1, int arg2, boolean arg3)
tick(World world, Entity entity, int slot, boolean selected)
updateAnimation(World worldIn, Entity entityIn, int inventorySlot, boolean isCurrentItem)
public void
a(ajs arg0, aay arg1, int arg2)
method_3420(class_1150 arg0, class_988 arg1, int arg2)
onResult(World world, PlayerEntity player, int amount)
onCrafting(World worldIn, EntityPlayer playerIn, int amount)
public int
m()
method_3443()
getUseDuration()
getMaxItemUseDuration()
public UseAction
n()
method_3444()
getUseAction()
getItemUseAction()
public void
a(ajs arg0, sw arg1, int arg2)
method_11389(class_1150 arg0, class_1699 arg1, int arg2)
stopUsing(World world, LivingEntity entity, int remainingUseTime)
onPlayerStoppedUsing(World worldIn, EntityLivingBase entityLiving, int timeLeft)
public boolean
o()
method_3445()
hasNbt()
hasTagCompound()
public NbtCompound
p()
method_3446()
getNbt()
getTagCompound()
public NbtCompound
c(String arg0)
method_13655(String arg0)
getOrCreateNbt(String key)
getOrCreateSubCompound(String key)
public NbtCompound
d(String arg0)
method_13657(String arg0)
getNbt(String key)
getSubCompound(String key)
public void
e(String arg0)
method_13659(String arg0)
removeNbt(String key)
removeSubCompound(String key)
public NbtList
q()
method_3447()
getEnchantments()
getEnchantmentTagList()
public void
b(du arg0)
method_3433(class_322 arg0)
setNbt(NbtCompound nbt)
setTagCompound(NBTTagCompound nbt)
public String
r()
method_4623()
getHoverName()
getDisplayName()
public ItemStack
f(String arg0)
method_13661(String arg0)
setLocalizedName(String name)
setTranslatableName(String arg0)
public ItemStack
g(String arg0)
method_6373(String arg0)
setHoverName(String name)
setStackDisplayName(String displayName)
public void
s()
method_6330()
resetHoverName()
clearCustomName()
public boolean
t()
method_4624()
hasCustomHoverName()
hasDisplayName()
public Rarity
v()
method_3450()
getRarity()
getRarity()
public boolean
w()
method_3451()
isEnchantable()
isItemEnchantable()
public void
a(aii arg0, int arg1)
method_3416(class_1127 arg0, int arg1)
addEnchantment(Enchantment enchantment, int level)
addEnchantment(Enchantment ench, int level)
public boolean
x()
method_3452()
hasEnchantments()
isItemEnchanted()
public void
a(String arg0, ei arg1)
method_3409(String arg0, class_605 arg1)
addToNbt(String key, NbtElement nbt)
setTagInfo(String key, NBTBase value)
public boolean
y()
method_4625()
canUseOnBlockInAdventureMode()
canEditBlocks()
public boolean
z()
method_4626()
isInItemFrame()
isOnItemFrame()
public void
a(yz arg0)
method_4619(class_1397 arg0)
setItemFrame(ItemFrameEntity itemFrame)
setItemFrame(EntityItemFrame frame)
public ItemFrameEntity
A()
method_4627()
getItemFrame()
getItemFrame()
public int
B()
method_4618()
getRepairCost()
getRepairCost()
public void
c(int arg0)
method_4621(int arg0)
setRepairCost(int cost)
setRepairCost(int cost)
public com.google.common.collect.Multimap<String, AttributeModifier>
a(ss arg0)
method_11393(class_2968 arg0)
getAttributeModifiers(EquipmentSlot slot)
getAttributeModifiers(EntityEquipmentSlot equipmentSlot)
public void
a(String arg0, tl arg1, ss arg2)
method_11392(String arg0, class_1704 arg1, class_2968 arg2)
addAttributeModifier(String attribute, AttributeModifier modifier, EquipmentSlot slot)
addAttributeModifier(String attributeName, AttributeModifier modifier, EntityEquipmentSlot equipmentSlot)
public Text
C()
method_6371()
getDisplayName()
getTextComponent()
public boolean
a(alu arg0)
method_11309(class_197 arg0)
hasMineBlockOverride(Block block)
canDestroy(Block blockIn)
public boolean
b(alu arg0)
method_11312(class_197 arg0)
hasPlaceOnBlockOverride(Block block)
canPlaceOn(Block blockIn)
public void
d(int arg0)
method_13656(int arg0)
setPopAnimationTime(int popAnimationTime)
setAnimationsToGo(int animations)
public int
E()
method_13652()
getSize()
getCount()
public void
e(int arg0)
method_13658(int arg0)
setSize(int size)
setCount(int size)
public void
f(int arg0)
method_13660(int arg0)
increase(int amount)
grow(int quantity)
public void
g(int arg0)
method_13662(int arg0)
decrease(int amount)
shrink(int quantity)
public List<String>
a(aay arg0, boolean arg1)
method_4620(class_988 arg0, boolean arg1)
getTooltip(PlayerEntity player, boolean advanced)
getTooltip(EntityPlayer playerIn, boolean advanced)
public boolean
u()
method_3449()
hasEnchantmentGlint()
hasEffect()
public int
D()
method_13651()
getPopAnimationTime()
getAnimationsToGo()