net.minecraft.world.item

public class Item

implements FeatureElement, ItemLike

cyo
net.minecraft.world.item.Item
net.minecraft.class_1792
net.minecraft.item.Item

Field summary

Modifier and TypeField
public static final com.mojang.serialization.Codec<Holder<Item>>
e
CODEC
field_54952
ENTRY_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, Holder<Item>>
f
STREAM_CODEC
field_55708
ENTRY_PACKET_CODEC
private static final org.slf4j.Logger
a
LOGGER
field_27017
LOGGER
public static final Map<Block, Item>
g
BY_BLOCK
field_8003
BLOCK_ITEMS
public static final ResourceLocation
h
BASE_ATTACK_DAMAGE_ID
field_8006
BASE_ATTACK_DAMAGE_MODIFIER_ID
public static final ResourceLocation
i
BASE_ATTACK_SPEED_ID
field_8001
BASE_ATTACK_SPEED_MODIFIER_ID
public static final int
j
DEFAULT_MAX_STACK_SIZE
field_30887
DEFAULT_MAX_COUNT
public static final int
k
ABSOLUTE_MAX_STACK_SIZE
field_49998
MAX_MAX_COUNT
public static final int
l
MAX_BAR_WIDTH
field_30889
ITEM_BAR_STEPS
protected static final int
m
APPROXIMATELY_INFINITE_USE_DURATION
field_56296
field_56296
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
n
descriptionId
field_8014
translationKey
private final FeatureFlagSet
o
requiredFeatures
field_40209
requiredFeatures

Constructor summary

ModifierConstructor
public (Item$Properties settings)

Method summary

Modifier and TypeMethod
public static int
a(cyo 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(dlu arg0)
byBlock(Block arg0)
method_7867(class_2248 arg0)
fromBlock(Block block)
public Holder$Reference<Item>
e()
builtInRegistryHolder()
method_40131()
getRegistryEntry()
public DataComponentMap
f()
components()
method_57347()
getComponents()
public int
g()
getDefaultMaxStackSize()
method_7882()
getMaxCount()
public void
a(dip arg0, bwz arg1, cys 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(cmx arg0)
onDestroyed(ItemEntity arg0)
method_33261(class_1542 arg0)
onItemEntityDestroyed(ItemEntity entity)
public void
l(cys arg0)
verifyComponentsAfterLoad(ItemStack arg0)
method_7860(class_1799 arg0)
postProcessComponents(ItemStack stack)
public boolean
a(cys arg0, dzo arg1, dip arg2, iu arg3, bwz arg4)
canDestroyBlock(ItemStack arg0, BlockState arg1, Level arg2, BlockPos arg3, LivingEntity arg4)
method_7885(class_1799 arg0, class_2680 arg1, class_1937 arg2, class_2338 arg3, class_1309 arg4)
canMine(ItemStack stack, BlockState state, World world, BlockPos pos, LivingEntity user)
public Item
h()
asItem()
method_8389()
asItem()
public InteractionResult
a(dcn arg0)
useOn(UseOnContext arg0)
method_7884(class_1838 arg0)
useOnBlock(ItemUsageContext context)
public float
a(cys arg0, dzo arg1)
getDestroySpeed(ItemStack arg0, BlockState arg1)
method_58404(class_1799 arg0, class_2680 arg1)
getMiningSpeed(ItemStack stack, BlockState state)
public InteractionResult
a(dip arg0, cqs arg1, btx 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(cys arg0, dip arg1, bwz 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(cys arg0)
isBarVisible(ItemStack arg0)
method_31567(class_1799 arg0)
isItemBarVisible(ItemStack stack)
public int
e(cys arg0)
getBarWidth(ItemStack arg0)
method_31569(class_1799 arg0)
getItemBarStep(ItemStack stack)
public int
f(cys arg0)
getBarColor(ItemStack arg0)
method_31571(class_1799 arg0)
getItemBarColor(ItemStack stack)
public boolean
a(cys arg0, cwh arg1, cuu arg2, cqs 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(cys arg0, cys arg1, cwh arg2, cuu arg3, cqs arg4, bxq 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(bwa arg0, float arg1, bup 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(bwz arg0)
getDamageSource(LivingEntity arg0)
method_64193(class_1309 arg0)
getDamageSource(LivingEntity user)
public void
a(cys arg0, bwz arg1, bwz 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(cys arg0, bwz arg1, bwz 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(cys arg0, dip arg1, dzo arg2, iu arg3, bwz 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(cys arg0, dzo arg1)
isCorrectToolForDrops(ItemStack arg0, BlockState arg1)
method_58405(class_1799 arg0, class_2680 arg1)
isCorrectForDrops(ItemStack stack, BlockState state)
public InteractionResult
a(cys arg0, cqs arg1, bwz arg2, btx 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
i()
getCraftingRemainder()
method_7858()
getRecipeRemainder()
public void
a(cys arg0, dip arg1, bwa 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(cys arg0, dip arg1, cqs 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(cys arg0, dip arg1)
onCraftedPostProcess(ItemStack arg0, Level arg1)
method_7843(class_1799 arg0, class_1937 arg1)
onCraft(ItemStack stack, World world)
public ItemUseAnimation
b(cys arg0)
getUseAnimation(ItemStack arg0)
method_7853(class_1799 arg0)
getUseAction(ItemStack stack)
public int
a(cys arg0, bwz arg1)
getUseDuration(ItemStack arg0, LivingEntity arg1)
method_7881(class_1799 arg0, class_1309 arg1)
getMaxUseTime(ItemStack stack, LivingEntity user)
public boolean
a(cys arg0, dip arg1, bwz 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(cys arg0, cyo$b arg1, dbw arg2, Consumer<ww> arg3, dah arg4)
appendHoverText(ItemStack arg0, Item$TooltipContext arg1, TooltipDisplay arg2, Consumer<Component> arg3, TooltipFlag arg4)
method_67187(class_1799 arg0, class_1792$class_9635 arg1, class_10712 arg2, Consumer<class_2561> arg3, class_1836 arg4)
method_67187(ItemStack arg0, Item$TooltipContext arg1, class_10712 arg2, Consumer<Text> arg3, TooltipType arg4)
public Optional<TooltipComponent>
k(cys arg0)
getTooltipImage(ItemStack arg0)
method_32346(class_1799 arg0)
getTooltipData(ItemStack stack)
public final String
j()
getDescriptionId()
method_7876()
getTranslationKey()
public final Component
l()
getName()
method_63680()
getName()
public Component
a(cys arg0)
getName(ItemStack arg0)
method_7864(class_1799 arg0)
getName(ItemStack stack)
public boolean
c_(cys arg0)
isFoil(ItemStack arg0)
method_7886(class_1799 arg0)
hasGlint(ItemStack stack)
protected static BlockHitResult
a(dip arg0, cqs arg1, dhy$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_(cys arg0)
useOnRelease(ItemStack arg0)
method_7838(class_1799 arg0)
isUsedOnRelease(ItemStack stack)
public ItemStack
m()
getDefaultInstance()
method_7854()
getDefaultStack()
public boolean
d()
canFitInsideContainerItems()
method_31568()
canBeNested()
public FeatureFlagSet
k()
requiredFeatures()
method_45322()
getRequiredFeatures()
public boolean
a(cys arg0, cqs arg1)
shouldPrintOpWarning(ItemStack arg0, Player arg1)
method_65353(class_1799 arg0, class_1657 arg1)
shouldShowOperatorBlockWarnings(ItemStack stack, PlayerEntity player)