net.minecraft.world.item

public class Item

implements FeatureElement, ItemLike

cwm
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(cwm 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(djn 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(dgj arg0, bvi arg1, cwq 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(cld arg0)
onDestroyed(ItemEntity arg0)
method_33261(class_1542 arg0)
onItemEntityDestroyed(ItemEntity entity)
public void
l(cwq arg0)
verifyComponentsAfterLoad(ItemStack arg0)
method_7860(class_1799 arg0)
postProcessComponents(ItemStack stack)
public boolean
a(dwy arg0, dgj arg1, ji arg2, coy 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(daj arg0)
useOn(UseOnContext arg0)
method_7884(class_1838 arg0)
useOnBlock(ItemUsageContext context)
public float
a(cwq arg0, dwy arg1)
getDestroySpeed(ItemStack arg0, BlockState arg1)
method_58404(class_1799 arg0, class_2680 arg1)
getMiningSpeed(ItemStack stack, BlockState state)
public InteractionResult
a(dgj arg0, coy arg1, bsk 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(cwq arg0, dgj arg1, bvi 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(cwq arg0)
isBarVisible(ItemStack arg0)
method_31567(class_1799 arg0)
isItemBarVisible(ItemStack stack)
public int
e(cwq arg0)
getBarWidth(ItemStack arg0)
method_31569(class_1799 arg0)
getItemBarStep(ItemStack stack)
public int
f(cwq arg0)
getBarColor(ItemStack arg0)
method_31571(class_1799 arg0)
getItemBarColor(ItemStack stack)
public boolean
a(cwq arg0, cua arg1, csn arg2, coy 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(cwq arg0, cwq arg1, cua arg2, csn arg3, coy arg4, bwa 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(bum arg0, float arg1, btc 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(bvi arg0)
getDamageSource(LivingEntity arg0)
method_64193(class_1309 arg0)
getDamageSource(LivingEntity user)
public boolean
a(cwq arg0, bvi arg1, bvi 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(cwq arg0, bvi arg1, bvi 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(cwq arg0, dgj arg1, dwy arg2, ji arg3, bvi 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(cwq arg0, dwy arg1)
isCorrectToolForDrops(ItemStack arg0, BlockState arg1)
method_58405(class_1799 arg0, class_2680 arg1)
isCorrectForDrops(ItemStack stack, BlockState state)
public InteractionResult
a(cwq arg0, coy arg1, bvi arg2, bsk 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(cwq arg0, dgj arg1, bum 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(cwq arg0, dgj arg1, coy 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(cwq arg0, dgj arg1)
onCraftedPostProcess(ItemStack arg0, Level arg1)
method_7843(class_1799 arg0, class_1937 arg1)
onCraft(ItemStack stack, World world)
public ItemUseAnimation
b(cwq arg0)
getUseAnimation(ItemStack arg0)
method_7853(class_1799 arg0)
getUseAction(ItemStack stack)
public int
a(cwq arg0, bvi arg1)
getUseDuration(ItemStack arg0, LivingEntity arg1)
method_7881(class_1799 arg0, class_1309 arg1)
getMaxUseTime(ItemStack stack, LivingEntity user)
public boolean
a(cwq arg0, dgj arg1, bvi 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(cwq arg0, cwm$b arg1, List<wp> arg2, cyi 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(cwq 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(cwq arg0)
getName(ItemStack arg0)
method_7864(class_1799 arg0)
getName(ItemStack stack)
public boolean
c_(cwq arg0)
isFoil(ItemStack arg0)
method_7886(class_1799 arg0)
hasGlint(ItemStack stack)
protected static BlockHitResult
a(dgj arg0, coy arg1, dfr$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_(cwq 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()
public boolean
a(cwq arg0, coy arg1)
shouldPrintOpWarning(ItemStack arg0, Player arg1)
method_65353(class_1799 arg0, class_1657 arg1)
shouldShowOperatorBlockWarnings(ItemStack stack, PlayerEntity player)