Package net.minecraft.world.item
Class BundleItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.BundleItem
- All Implemented Interfaces:
FeatureElement,ItemLike,IItemExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.Properties, Item.TooltipContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intFields inherited from class net.minecraft.world.item.Item
ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, canRepair, DEFAULT_MAX_STACK_SIZE, MAX_BAR_WIDTHFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendHoverText(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) private static booleandropContents(ItemStack pStack, Player pPlayer) intgetBarColor(ItemStack pStack) intgetBarWidth(ItemStack pStack) static floatgetFullnessDisplay(ItemStack pStack) getTooltipImage(ItemStack pStack) booleanisBarVisible(ItemStack pStack) voidonDestroyed(ItemEntity pItemEntity) booleanoverrideOtherStackedOnMe(ItemStack pStack, ItemStack pOther, Slot pSlot, ClickAction pAction, Player pPlayer, SlotAccess pAccess) booleanoverrideStackedOnOther(ItemStack pStack, Slot pSlot, ClickAction pAction, Player pPlayer) private voidplayDropContentsSound(Entity pEntity) private voidplayInsertSound(Entity pEntity) private voidplayRemoveOneSound(Entity pEntity) use(Level pLevel, Player pPlayer, InteractionHand pUsedHand) Called to trigger the item's "innate" right click behavior.Methods inherited from class net.minecraft.world.item.Item
asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canFitInsideContainerItems, components, finishUsingItem, getAttackDamageBonus, getBreakingSound, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDefaultMaxStackSize, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, isRepairable, isValidRepairItem, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onUseTick, postHurtEnemy, releaseUsing, requiredFeatures, toString, useOn, useOnRelease, verifyComponentsAfterLoadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IItemExtension
applyEnchantments, canBeHurtBy, canContinueUsing, canDisableShield, canElytraFly, canEquip, canFitInsideContainerItems, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultAttributeModifiers, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, isPrimaryItemFor, makesPiglinsNeutral, onAnimalArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, supportsEnchantment
-
Field Details
-
BAR_COLOR
private static final int BAR_COLOR -
TOOLTIP_MAX_WEIGHT
private static final int TOOLTIP_MAX_WEIGHT- See Also:
-
-
Constructor Details
-
BundleItem
-
-
Method Details
-
getFullnessDisplay
-
overrideStackedOnOther
public boolean overrideStackedOnOther(ItemStack pStack, Slot pSlot, ClickAction pAction, Player pPlayer) - Overrides:
overrideStackedOnOtherin classItem
-
overrideOtherStackedOnMe
public boolean overrideOtherStackedOnMe(ItemStack pStack, ItemStack pOther, Slot pSlot, ClickAction pAction, Player pPlayer, SlotAccess pAccess) - Overrides:
overrideOtherStackedOnMein classItem
-
use
public InteractionResultHolder<ItemStack> use(Level pLevel, Player pPlayer, InteractionHand pUsedHand) Called to trigger the item's "innate" right click behavior. To handle when this item is used on a Block, seeItem.useOn(net.minecraft.world.item.context.UseOnContext). -
isBarVisible
- Overrides:
isBarVisiblein classItem
-
getBarWidth
- Overrides:
getBarWidthin classItem
-
getBarColor
- Overrides:
getBarColorin classItem
-
dropContents
-
getTooltipImage
- Overrides:
getTooltipImagein classItem
-
appendHoverText
public void appendHoverText(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) - Overrides:
appendHoverTextin classItem
-
onDestroyed
- Overrides:
onDestroyedin classItem
-
playRemoveOneSound
-
playInsertSound
-
playDropContentsSound
-