net.minecraft.world.item

public class Item

implements FeatureElement, ItemLike

cxl
net.minecraft.world.item.Item
net.minecraft.class_1792
net.minecraft.item.Item
net.minecraft.world.item.Item

Field summary

Modifier and TypeField
public static final com.mojang.serialization.Codec<Holder<Item>>
e
CODEC
field_54952
ENTRY_CODEC
private static final org.slf4j.Logger
a
LOGGER
field_27017
LOGGER
public static final Map<Block, Item>
f
BY_BLOCK
field_8003
BLOCK_ITEMS
public static final ResourceLocation
g
BASE_ATTACK_DAMAGE_ID
field_8006
BASE_ATTACK_DAMAGE_MODIFIER_ID
public static final ResourceLocation
h
BASE_ATTACK_SPEED_ID
field_8001
BASE_ATTACK_SPEED_MODIFIER_ID
public static final int
i
DEFAULT_MAX_STACK_SIZE
field_30887
DEFAULT_MAX_COUNT
public static final int
j
ABSOLUTE_MAX_STACK_SIZE
field_49998
MAX_MAX_COUNT
public static final int
k
MAX_BAR_WIDTH
field_30889
ITEM_BAR_STEPS
private final Holder$Reference<Item>
b
builtInRegistryHolder
field_36401
registryEntry
private final DataComponentMap
c
components
field_49263
components
private final Item
d
craftingRemainingItem
field_8008
recipeRemainder
protected final String
l
descriptionId
field_8014
translationKey
private final FeatureFlagSet
m
requiredFeatures
field_40209
requiredFeatures

Constructor summary

ModifierConstructor
public (Item$Properties settings)

Method summary

Modifier and TypeMethod
public static int
a(cxl arg0)
getId(Item arg0)
method_7880(class_1792 arg0)
getRawId(Item item)
public static Item
b(int arg0)
byId(int arg0)
method_7875(int arg0)
byRawId(int id)
public static Item
a(dkm arg0)
byBlock(Block arg0)
method_7867(class_2248 arg0)
fromBlock(Block block)
public Holder$Reference<Item>
f()
builtInRegistryHolder()
method_40131()
getRegistryEntry()
public DataComponentMap
g()
components()
method_57347()
getComponents()
public int
h()
getDefaultMaxStackSize()
method_7882()
getMaxCount()
public void
a(dhi arg0, bwg arg1, cxp 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)
public void
a(cmb arg0)
onDestroyed(ItemEntity arg0)
method_33261(class_1542 arg0)
onItemEntityDestroyed(ItemEntity entity)
public void
l(cxp arg0)
verifyComponentsAfterLoad(ItemStack arg0)
method_7860(class_1799 arg0)
postProcessComponents(ItemStack stack)
public boolean
a(dxv arg0, dhi arg1, jh arg2, cpx 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)
public Item
j()
asItem()
method_8389()
asItem()
public InteractionResult
a(dbi arg0)
useOn(UseOnContext arg0)
method_7884(class_1838 arg0)
useOnBlock(ItemUsageContext context)
public float
a(cxp arg0, dxv arg1)
getDestroySpeed(ItemStack arg0, BlockState arg1)
method_58404(class_1799 arg0, class_2680 arg1)
getMiningSpeed(ItemStack stack, BlockState state)
public InteractionResult
a(dhi arg0, cpx arg1, bti 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)
public ItemStack
a(cxp arg0, dhi arg1, bwg 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)
public boolean
d(cxp arg0)
isBarVisible(ItemStack arg0)
method_31567(class_1799 arg0)
isItemBarVisible(ItemStack stack)
public int
e(cxp arg0)
getBarWidth(ItemStack arg0)
method_31569(class_1799 arg0)
getItemBarStep(ItemStack stack)
public int
f(cxp arg0)
getBarColor(ItemStack arg0)
method_31571(class_1799 arg0)
getItemBarColor(ItemStack stack)
public boolean
a(cxp arg0, cuz arg1, ctm arg2, cpx 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)
public boolean
a(cxp arg0, cxp arg1, cuz arg2, ctm arg3, cpx arg4, bwy 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)
public float
a(bvk arg0, float arg1, bua 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)
public DamageSource
a(bwg arg0)
getDamageSource(LivingEntity arg0)
method_64193(class_1309 arg0)
getDamageSource(LivingEntity user)
public boolean
a(cxp arg0, bwg arg1, bwg 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)
public void
b(cxp arg0, bwg arg1, bwg 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)
public boolean
a(cxp arg0, dhi arg1, dxv arg2, jh arg3, bwg 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)
public boolean
b(cxp arg0, dxv arg1)
isCorrectToolForDrops(ItemStack arg0, BlockState arg1)
method_58405(class_1799 arg0, class_2680 arg1)
isCorrectForDrops(ItemStack stack, BlockState state)
public InteractionResult
a(cxp arg0, cpx arg1, bwg arg2, bti 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)
public final ItemStack
k()
getCraftingRemainder()
method_7858()
getRecipeRemainder()
public void
a(cxp arg0, dhi arg1, bvk 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)
public void
a(cxp arg0, dhi arg1, cpx 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)
public void
a(cxp arg0, dhi arg1)
onCraftedPostProcess(ItemStack arg0, Level arg1)
method_7843(class_1799 arg0, class_1937 arg1)
onCraft(ItemStack stack, World world)
public ItemUseAnimation
b(cxp arg0)
getUseAnimation(ItemStack arg0)
method_7853(class_1799 arg0)
getUseAction(ItemStack stack)
public int
a(cxp arg0, bwg arg1)
getUseDuration(ItemStack arg0, LivingEntity arg1)
method_7881(class_1799 arg0, class_1309 arg1)
getMaxUseTime(ItemStack stack, LivingEntity user)
public boolean
a(cxp arg0, dhi arg1, bwg 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)
public void
a(cxp arg0, cxl$b arg1, List<xv> arg2, czh 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)
public Optional<TooltipComponent>
k(cxp arg0)
getTooltipImage(ItemStack arg0)
method_32346(class_1799 arg0)
getTooltipData(ItemStack stack)
public final String
l()
getDescriptionId()
method_7876()
getTranslationKey()
public final Component
m()
getName()
method_63680()
getName()
public Component
a(cxp arg0)
getName(ItemStack arg0)
method_7864(class_1799 arg0)
getName(ItemStack stack)
public boolean
c_(cxp arg0)
isFoil(ItemStack arg0)
method_7886(class_1799 arg0)
hasGlint(ItemStack stack)
protected static BlockHitResult
a(dhi arg0, cpx arg1, dgq$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)
public boolean
d_(cxp arg0)
useOnRelease(ItemStack arg0)
method_7838(class_1799 arg0)
isUsedOnRelease(ItemStack stack)
public ItemStack
n()
getDefaultInstance()
method_7854()
getDefaultStack()
public SoundEvent
a()
getBreakingSound()
method_57336()
getBreakSound()
public boolean
e()
canFitInsideContainerItems()
method_31568()
canBeNested()
public FeatureFlagSet
i()
requiredFeatures()
method_45322()
getRequiredFeatures()