net.minecraft.world.item

public class Item

implements FeatureElement, ItemLike

cul
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>
d
BY_BLOCK
field_8003
BLOCK_ITEMS
f_41373_
public static final ResourceLocation
e
BASE_ATTACK_DAMAGE_ID
field_8006
BASE_ATTACK_DAMAGE_MODIFIER_ID
f_336917_
public static final ResourceLocation
f
BASE_ATTACK_SPEED_ID
field_8001
BASE_ATTACK_SPEED_MODIFIER_ID
f_336649_
public static final int
g
DEFAULT_MAX_STACK_SIZE
field_30887
DEFAULT_MAX_COUNT
f_315532_
public static final int
h
ABSOLUTE_MAX_STACK_SIZE
field_49998
MAX_MAX_COUNT
f_314443_
public static final int
i
MAX_BAR_WIDTH
field_30889
ITEM_BAR_STEPS
f_150886_
private final Holder$Reference<Item>
b
builtInRegistryHolder
field_36401
registryEntry
f_204113_
private final DataComponentMap
c
components
field_49263
components
f_315186_
private final Item
j
craftingRemainingItem
field_8008
recipeRemainder
f_41378_
private String
k
descriptionId
field_8014
translationKey
f_41379_
private final FeatureFlagSet
l
requiredFeatures
field_40209
requiredFeatures
f_243811_

Constructor summary

ModifierConstructor
public (Item$Properties settings)

Method summary

Modifier and TypeMethod
public static int
a(cul 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(dfy arg0)
byBlock(Block arg0)
method_7867(class_2248 arg0)
fromBlock(Block block)
m_41439_(C_1706_ p_41440_)
public Holder$Reference<Item>
o()
builtInRegistryHolder()
method_40131()
getRegistryEntry()
m_204114_()
public DataComponentMap
p()
components()
method_57347()
getComponents()
m_320917_()
public int
q()
getDefaultMaxStackSize()
method_7882()
getMaxCount()
m_320193_()
public void
a(dcw arg0, btn arg1, cuq 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(cjh arg0)
onDestroyed(ItemEntity arg0)
method_33261(class_1542 arg0)
onItemEntityDestroyed(ItemEntity entity)
m_142023_(C_976_ arg0)
public void
m(cuq arg0)
verifyComponentsAfterLoad(ItemStack arg0)
method_7860(class_1799 arg0)
postProcessComponents(ItemStack stack)
m_324094_(C_1391_ arg0)
public boolean
a(dtc arg0, dcw arg1, jd arg2, cmx 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
r()
asItem()
method_8389()
asItem()
m_5456_()
public InteractionResult
a(cyf arg0)
useOn(UseOnContext arg0)
method_7884(class_1838 arg0)
useOnBlock(ItemUsageContext context)
m_6225_(C_1450_ arg0)
public float
a(cuq arg0, dtc arg1)
getDestroySpeed(ItemStack arg0, BlockState arg1)
method_58404(class_1799 arg0, class_2680 arg1)
getMiningSpeed(ItemStack stack, BlockState state)
m_8102_(C_1391_ p_41426_, C_2064_ arg1)
public InteractionResultHolder<ItemStack>
a(dcw arg0, cmx arg1, bqq 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(cuq arg0, dcw arg1, btn 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 boolean
d(cuq arg0)
isBarVisible(ItemStack arg0)
method_31567(class_1799 arg0)
isItemBarVisible(ItemStack stack)
m_142522_(C_1391_ arg0)
public int
e(cuq arg0)
getBarWidth(ItemStack arg0)
method_31569(class_1799 arg0)
getItemBarStep(ItemStack stack)
m_142158_(C_1391_ arg0)
public int
f(cuq arg0)
getBarColor(ItemStack arg0)
method_31571(class_1799 arg0)
getItemBarColor(ItemStack stack)
m_142159_(C_1391_ arg0)
public boolean
a(cuq arg0, crq arg1, cqd arg2, cmx 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(cuq arg0, cuq arg1, crq arg2, cqd arg3, cmx arg4, bug 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 float
a(bsr arg0, float arg1, brk arg2)
getAttackDamageBonus(Entity arg0, float arg1, DamageSource arg2)
method_58403(class_1297 arg0, float arg1, class_1282 arg2)
getBonusAttackDamage(Entity target, float baseAttackDamage, DamageSource damageSource)
m_319585_(C_507_ p_327880_, float p_342960_, C_489_ arg2)
public boolean
a(cuq arg0, btn arg1, btn 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 void
b(cuq arg0, btn arg1, btn arg2)
postHurtEnemy(ItemStack arg0, LivingEntity arg1, LivingEntity arg2)
method_59978(class_1799 arg0, class_1309 arg1, class_1309 arg2)
postDamageEntity(ItemStack stack, LivingEntity target, LivingEntity attacker)
m_338515_(C_1391_ p_342300_, C_524_ p_344220_, C_524_ arg2)
public boolean
a(cuq arg0, dcw arg1, dtc arg2, jd arg3, btn 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
b(cuq arg0, dtc arg1)
isCorrectToolForDrops(ItemStack arg0, BlockState arg1)
method_58405(class_1799 arg0, class_2680 arg1)
isCorrectForDrops(ItemStack stack, BlockState state)
m_8096_(C_1391_ p_41450_, C_2064_ arg1)
public InteractionResult
a(cuq arg0, cmx arg1, btn arg2, bqq 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
s()
getDescription()
method_7848()
getName()
m_41466_()
protected String
t()
getOrCreateDescriptionId()
method_7869()
getOrCreateTranslationKey()
m_41467_()
public String
a()
getDescriptionId()
method_7876()
getTranslationKey()
m_5524_()
public String
h(cuq arg0)
getDescriptionId(ItemStack arg0)
method_7866(class_1799 arg0)
getTranslationKey(ItemStack stack)
m_5671_(C_1391_ arg0)
public final Item
u()
getCraftingRemainingItem()
method_7858()
getRecipeRemainder()
m_41469_()
public boolean
v()
hasCraftingRemainingItem()
method_7857()
hasRecipeRemainder()
m_41470_()
public void
a(cuq arg0, dcw arg1, bsr 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(cuq arg0, dcw arg1, cmx 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(cuq arg0, dcw 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
ao_()
isComplex()
method_16698()
isNetworkSynced()
m_7807_()
public UseAnim
b(cuq arg0)
getUseAnimation(ItemStack arg0)
method_7853(class_1799 arg0)
getUseAction(ItemStack stack)
m_6164_(C_1391_ arg0)
public int
a(cuq arg0, btn arg1)
getUseDuration(ItemStack arg0, LivingEntity arg1)
method_7881(class_1799 arg0, class_1309 arg1)
getMaxUseTime(ItemStack stack, LivingEntity user)
m_8105_(C_1391_ p_342054_, C_524_ arg1)
public void
a(cuq arg0, dcw arg1, btn 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(cuq arg0, cul$b arg1, List<wz> arg2, cwm arg3)
appendHoverText(ItemStack arg0, Item$TooltipContext arg1, List<Component> arg2, TooltipFlag arg3)
method_7851(class_1799 arg0, class_1792$class_9635 arg1, List<class_2561> arg2, class_1836 arg3)
appendTooltip(ItemStack stack, Item$TooltipContext context, List<Text> tooltip, TooltipType type)
m_7373_(C_1391_ p_333372_, C_1381_$C_313602_ p_41423_, List<C_4996_> p_41424_, C_1431_ arg3)
public Optional<TooltipComponent>
g(cuq arg0)
getTooltipImage(ItemStack arg0)
method_32346(class_1799 arg0)
getTooltipData(ItemStack stack)
m_142422_(C_1391_ arg0)
public Component
n(cuq arg0)
getName(ItemStack arg0)
method_7864(class_1799 arg0)
getName(ItemStack stack)
m_7626_(C_1391_ arg0)
public boolean
d_(cuq arg0)
isFoil(ItemStack arg0)
method_7886(class_1799 arg0)
hasGlint(ItemStack stack)
m_5812_(C_1391_ arg0)
public boolean
a(cuq arg0)
isEnchantable(ItemStack arg0)
method_7870(class_1799 arg0)
isEnchantable(ItemStack stack)
m_8120_(C_1391_ arg0)
protected static BlockHitResult
a(dcw arg0, cmx arg1, dcf$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
g()
getEnchantmentValue()
method_7837()
getEnchantability()
m_6473_()
public boolean
a(cuq arg0, cuq 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 ItemAttributeModifiers
j()
getDefaultAttributeModifiers()
method_7844()
getAttributeModifiers()
m_7167_()
public boolean
l(cuq arg0)
useOnRelease(ItemStack arg0)
method_7838(class_1799 arg0)
isUsedOnRelease(ItemStack stack)
m_41463_(C_1391_ arg0)
public ItemStack
w()
getDefaultInstance()
method_7854()
getDefaultStack()
m_7968_()
public SoundEvent
ap_()
getDrinkingSound()
method_21831()
getDrinkSound()
m_6023_()
public SoundEvent
aq_()
getEatingSound()
method_21830()
getEatSound()
m_6061_()
public SoundEvent
e()
getBreakingSound()
method_57336()
getBreakSound()
m_318629_()
public boolean
ar_()
canFitInsideContainerItems()
method_31568()
canBeNested()
m_142095_()
public FeatureFlagSet
i()
requiredFeatures()
method_45322()
getRequiredFeatures()
m_245183_()