net.minecraft.world.item

public class Item

implements FeatureElement, ItemLike

cmt
net.minecraft.world.item.Item
net.minecraft.class_1792
net.minecraft.item.Item
net.minecraft.src.C_1381_
net.minecraft.world.item.Item

Field summary

Modifier and TypeField
private static final org.slf4j.Logger
a
LOGGER
field_27017
LOGGER
f_150883_
public static final Map<Block, Item>
l
BY_BLOCK
field_8003
BLOCK_ITEMS
f_41373_
protected static final UUID
m
BASE_ATTACK_DAMAGE_UUID
field_8006
ATTACK_DAMAGE_MODIFIER_ID
f_41374_
protected static final UUID
n
BASE_ATTACK_SPEED_UUID
field_8001
ATTACK_SPEED_MODIFIER_ID
f_41375_
public static final int
o
MAX_STACK_SIZE
field_30887
DEFAULT_MAX_COUNT
f_150884_
public static final int
p
EAT_DURATION
field_30888
DEFAULT_MAX_USE_TIME
f_150885_
public static final int
q
MAX_BAR_WIDTH
field_30889
ITEM_BAR_STEPS
f_150886_
private final Holder$Reference<Item>
b
builtInRegistryHolder
field_36401
registryEntry
f_204113_
private final Rarity
c
rarity
field_8009
rarity
f_41369_
private final int
d
maxStackSize
field_8013
maxCount
f_41370_
private final int
e
maxDamage
field_8012
maxDamage
f_41371_
private final boolean
f
isFireResistant
field_21979
fireproof
f_41372_
private final Item
g
craftingRemainingItem
field_8008
recipeRemainder
f_41378_
private String
h
descriptionId
field_8014
translationKey
f_41379_
private final FoodProperties
i
foodProperties
field_18672
foodComponent
f_41380_
private final FeatureFlagSet
j
requiredFeatures
field_40209
requiredFeatures
f_243811_

Constructor summary

ModifierConstructor
public (Item$Properties settings)

Method summary

Modifier and TypeMethod
public static int
a(cmt arg0)
getId(Item arg0)
method_7880(class_1792 arg0)
getRawId(Item item)
m_41393_(C_1381_ p_41394_)
public static Item
b(int arg0)
byId(int arg0)
method_7875(int arg0)
byRawId(int id)
m_41445_(int p_41446_)
public static Item
a(cwq arg0)
byBlock(Block arg0)
method_7867(class_2248 arg0)
fromBlock(Block block)
m_41439_(C_1706_ p_41440_)
public Holder$Reference<Item>
j()
builtInRegistryHolder()
method_40131()
getRegistryEntry()
m_204114_()
public void
a(ctp arg0, bml arg1, cmy arg2, int arg3)
onUseTick(Level arg0, LivingEntity arg1, ItemStack arg2, int arg3)
method_7852(class_1937 arg0, class_1309 arg1, class_1799 arg2, int arg3)
usageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks)
m_5929_(C_1596_ p_41429_, C_524_ p_41430_, C_1391_ p_41431_, int arg3)
public void
a(cbu arg0)
onDestroyed(ItemEntity arg0)
method_33261(class_1542 arg0)
onItemEntityDestroyed(ItemEntity entity)
m_142023_(C_976_ arg0)
public void
b(sn arg0)
verifyTagAfterLoad(CompoundTag arg0)
method_7860(class_2487 arg0)
postProcessNbt(NbtCompound nbt)
m_142312_(C_4917_ arg0)
public boolean
a(djh arg0, ctp arg1, hx arg2, cfi arg3)
canAttackBlock(BlockState arg0, Level arg1, BlockPos arg2, Player arg3)
method_7885(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1657 arg3)
canMine(BlockState state, World world, BlockPos pos, PlayerEntity miner)
m_6777_(C_2064_ p_41442_, C_1596_ p_41443_, C_4675_ p_41444_, C_1141_ arg3)
public Item
k()
asItem()
method_8389()
asItem()
m_5456_()
public InteractionResult
a(cpj arg0)
useOn(UseOnContext arg0)
method_7884(class_1838 arg0)
useOnBlock(ItemUsageContext context)
m_6225_(C_1450_ arg0)
public float
a(cmy arg0, djh arg1)
getDestroySpeed(ItemStack arg0, BlockState arg1)
method_7865(class_1799 arg0, class_2680 arg1)
getMiningSpeedMultiplier(ItemStack stack, BlockState state)
m_8102_(C_1391_ p_41426_, C_2064_ arg1)
public InteractionResultHolder<ItemStack>
a(ctp arg0, cfi arg1, bka arg2)
use(Level arg0, Player arg1, InteractionHand arg2)
method_7836(class_1937 arg0, class_1657 arg1, class_1268 arg2)
use(World world, PlayerEntity user, Hand hand)
m_7203_(C_1596_ p_41433_, C_1141_ p_41434_, C_470_ arg2)
public ItemStack
a(cmy arg0, ctp arg1, bml arg2)
finishUsingItem(ItemStack arg0, Level arg1, LivingEntity arg2)
method_7861(class_1799 arg0, class_1937 arg1, class_1309 arg2)
finishUsing(ItemStack stack, World world, LivingEntity user)
m_5922_(C_1391_ p_41410_, C_1596_ p_41411_, C_524_ arg2)
public final int
l()
getMaxStackSize()
method_7882()
getMaxCount()
m_41459_()
public final int
n()
getMaxDamage()
method_7841()
getMaxDamage()
m_41462_()
public boolean
o()
canBeDepleted()
method_7846()
isDamageable()
m_41465_()
public boolean
e(cmy arg0)
isBarVisible(ItemStack arg0)
method_31567(class_1799 arg0)
isItemBarVisible(ItemStack stack)
m_142522_(C_1391_ arg0)
public int
f(cmy arg0)
getBarWidth(ItemStack arg0)
method_31569(class_1799 arg0)
getItemBarStep(ItemStack stack)
m_142158_(C_1391_ arg0)
public int
g(cmy arg0)
getBarColor(ItemStack arg0)
method_31571(class_1799 arg0)
getItemBarColor(ItemStack stack)
m_142159_(C_1391_ arg0)
public boolean
a(cmy arg0, cjw arg1, cij arg2, cfi arg3)
overrideStackedOnOther(ItemStack arg0, Slot arg1, ClickAction arg2, Player arg3)
method_31565(class_1799 arg0, class_1735 arg1, class_5536 arg2, class_1657 arg3)
onStackClicked(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player)
m_142207_(C_1391_ p_150889_, C_1305_ p_150890_, C_141163_ p_150891_, C_1141_ arg3)
public boolean
a(cmy arg0, cmy arg1, cjw arg2, cij arg3, cfi arg4, bnd arg5)
overrideOtherStackedOnMe(ItemStack arg0, ItemStack arg1, Slot arg2, ClickAction arg3, Player arg4, SlotAccess arg5)
method_31566(class_1799 arg0, class_1799 arg1, class_1735 arg2, class_5536 arg3, class_1657 arg4, class_5630 arg5)
onClicked(ItemStack stack, ItemStack otherStack, Slot slot, ClickType clickType, PlayerEntity player, StackReference cursorStackReference)
m_142305_(C_1391_ p_150893_, C_1391_ p_150894_, C_1305_ p_150895_, C_141163_ p_150896_, C_1141_ p_150897_, C_141073_ arg5)
public boolean
a(cmy arg0, bml arg1, bml arg2)
hurtEnemy(ItemStack arg0, LivingEntity arg1, LivingEntity arg2)
method_7873(class_1799 arg0, class_1309 arg1, class_1309 arg2)
postHit(ItemStack stack, LivingEntity target, LivingEntity attacker)
m_7579_(C_1391_ p_41396_, C_524_ p_41397_, C_524_ arg2)
public boolean
a(cmy arg0, ctp arg1, djh arg2, hx arg3, bml arg4)
mineBlock(ItemStack arg0, Level arg1, BlockState arg2, BlockPos arg3, LivingEntity arg4)
method_7879(class_1799 arg0, class_1937 arg1, class_2680 arg2, class_2338 arg3, class_1309 arg4)
postMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner)
m_6813_(C_1391_ p_41417_, C_1596_ p_41418_, C_2064_ p_41419_, C_4675_ p_41420_, C_524_ arg4)
public boolean
a_(djh arg0)
isCorrectToolForDrops(BlockState arg0)
method_7856(class_2680 arg0)
isSuitableFor(BlockState state)
m_8096_(C_2064_ arg0)
public InteractionResult
a(cmy arg0, cfi arg1, bml arg2, bka arg3)
interactLivingEntity(ItemStack arg0, Player arg1, LivingEntity arg2, InteractionHand arg3)
method_7847(class_1799 arg0, class_1657 arg1, class_1309 arg2, class_1268 arg3)
useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand)
m_6880_(C_1391_ p_41399_, C_1141_ p_41400_, C_524_ p_41401_, C_470_ arg3)
public Component
p()
getDescription()
method_7848()
getName()
m_41466_()
protected String
q()
getOrCreateDescriptionId()
method_7869()
getOrCreateTranslationKey()
m_41467_()
public String
a()
getDescriptionId()
method_7876()
getTranslationKey()
m_5524_()
public String
j(cmy arg0)
getDescriptionId(ItemStack arg0)
method_7866(class_1799 arg0)
getTranslationKey(ItemStack stack)
m_5671_(C_1391_ arg0)
public boolean
r()
shouldOverrideMultiplayerNbt()
method_7887()
isNbtSynced()
m_41468_()
public final Item
s()
getCraftingRemainingItem()
method_7858()
getRecipeRemainder()
m_41469_()
public boolean
t()
hasCraftingRemainingItem()
method_7857()
hasRecipeRemainder()
m_41470_()
public void
a(cmy arg0, ctp arg1, blv arg2, int arg3, boolean arg4)
inventoryTick(ItemStack arg0, Level arg1, Entity arg2, int arg3, boolean arg4)
method_7888(class_1799 arg0, class_1937 arg1, class_1297 arg2, int arg3, boolean arg4)
inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected)
m_6883_(C_1391_ p_41405_, C_1596_ p_41406_, C_507_ p_41407_, int p_41408_, boolean arg4)
public void
b(cmy arg0, ctp arg1, cfi arg2)
onCraftedBy(ItemStack arg0, Level arg1, Player arg2)
method_54465(class_1799 arg0, class_1937 arg1, class_1657 arg2)
onCraftByPlayer(ItemStack stack, World world, PlayerEntity player)
m_7836_(C_1391_ p_41448_, C_1596_ p_41449_, C_1141_ arg2)
public void
a(cmy arg0, ctp arg1)
onCraftedPostProcess(ItemStack arg0, Level arg1)
method_7843(class_1799 arg0, class_1937 arg1)
onCraft(ItemStack stack, World world)
m_42912_(C_1391_ p_312645_, C_1596_ arg1)
public boolean
al_()
isComplex()
method_16698()
isNetworkSynced()
m_7807_()
public UseAnim
c(cmy arg0)
getUseAnimation(ItemStack arg0)
method_7853(class_1799 arg0)
getUseAction(ItemStack stack)
m_6164_(C_1391_ arg0)
public int
b(cmy arg0)
getUseDuration(ItemStack arg0)
method_7881(class_1799 arg0)
getMaxUseTime(ItemStack stack)
m_8105_(C_1391_ arg0)
public void
a(cmy arg0, ctp arg1, bml arg2, int arg3)
releaseUsing(ItemStack arg0, Level arg1, LivingEntity arg2, int arg3)
method_7840(class_1799 arg0, class_1937 arg1, class_1309 arg2, int arg3)
onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks)
m_5551_(C_1391_ p_41413_, C_1596_ p_41414_, C_524_ p_41415_, int arg3)
public void
a(cmy arg0, ctp arg1, List<vf> arg2, coq arg3)
appendHoverText(ItemStack arg0, Level arg1, List<Component> arg2, TooltipFlag arg3)
method_7851(class_1799 arg0, class_1937 arg1, List<class_2561> arg2, class_1836 arg3)
appendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context)
m_7373_(C_1391_ p_41422_, C_1596_ p_41423_, List<C_4996_> p_41424_, C_1431_ arg3)
public Optional<TooltipComponent>
h(cmy arg0)
getTooltipImage(ItemStack arg0)
method_32346(class_1799 arg0)
getTooltipData(ItemStack stack)
m_142422_(C_1391_ arg0)
public Component
m(cmy arg0)
getName(ItemStack arg0)
method_7864(class_1799 arg0)
getName(ItemStack stack)
m_7626_(C_1391_ arg0)
public boolean
i(cmy arg0)
isFoil(ItemStack arg0)
method_7886(class_1799 arg0)
hasGlint(ItemStack stack)
m_5812_(C_1391_ arg0)
public Rarity
n(cmy arg0)
getRarity(ItemStack arg0)
method_7862(class_1799 arg0)
getRarity(ItemStack stack)
m_41460_(C_1391_ arg0)
public boolean
d_(cmy arg0)
isEnchantable(ItemStack arg0)
method_7870(class_1799 arg0)
isEnchantable(ItemStack stack)
m_8120_(C_1391_ arg0)
protected static BlockHitResult
a(ctp arg0, cfi arg1, csy$b arg2)
getPlayerPOVHitResult(Level arg0, Player arg1, ClipContext$Fluid arg2)
method_7872(class_1937 arg0, class_1657 arg1, class_3959$class_242 arg2)
raycast(World world, PlayerEntity player, RaycastContext$FluidHandling fluidHandling)
m_41435_(C_1596_ p_41436_, C_1141_ p_41437_, C_1565_$C_1567_ p_41438_)
public int
c()
getEnchantmentValue()
method_7837()
getEnchantability()
m_6473_()
public boolean
a(cmy arg0, cmy arg1)
isValidRepairItem(ItemStack arg0, ItemStack arg1)
method_7878(class_1799 arg0, class_1799 arg1)
canRepair(ItemStack stack, ItemStack ingredient)
m_6832_(C_1391_ p_41403_, C_1391_ arg1)
public com.google.common.collect.Multimap<Attribute, AttributeModifier>
a(bma arg0)
getDefaultAttributeModifiers(EquipmentSlot arg0)
method_7844(class_1304 arg0)
getAttributeModifiers(EquipmentSlot slot)
m_7167_(C_516_ arg0)
public boolean
l(cmy arg0)
useOnRelease(ItemStack arg0)
method_7838(class_1799 arg0)
isUsedOnRelease(ItemStack stack)
m_41463_(C_1391_ arg0)
public ItemStack
am_()
getDefaultInstance()
method_7854()
getDefaultStack()
m_7968_()
public boolean
u()
isEdible()
method_19263()
isFood()
m_41472_()
public FoodProperties
v()
getFoodProperties()
method_19264()
getFoodComponent()
m_41473_()
public SoundEvent
an_()
getDrinkingSound()
method_21831()
getDrinkSound()
m_6023_()
public SoundEvent
ao_()
getEatingSound()
method_21830()
getEatSound()
m_6061_()
public boolean
w()
isFireResistant()
method_24358()
isFireproof()
m_41475_()
public boolean
a(bkt arg0)
canBeHurtBy(DamageSource arg0)
method_24357(class_1282 arg0)
damage(DamageSource source)
m_41386_(C_489_ arg0)
public boolean
ap_()
canFitInsideContainerItems()
method_31568()
canBeNested()
m_142095_()
public FeatureFlagSet
m()
requiredFeatures()
method_45322()
getRequiredFeatures()
m_245183_()