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 int
private static final int
Fields 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_WIDTH
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) private static boolean
dropContents
(ItemStack pStack, Player pPlayer) int
getBarColor
(ItemStack pStack) int
getBarWidth
(ItemStack pStack) static float
getFullnessDisplay
(ItemStack pStack) getTooltipImage
(ItemStack pStack) boolean
isBarVisible
(ItemStack pStack) void
onDestroyed
(ItemEntity pItemEntity) boolean
overrideOtherStackedOnMe
(ItemStack pStack, ItemStack pOther, Slot pSlot, ClickAction pAction, Player pPlayer, SlotAccess pAccess) boolean
overrideStackedOnOther
(ItemStack pStack, Slot pSlot, ClickAction pAction, Player pPlayer) private void
playDropContentsSound
(Entity pEntity) private void
playInsertSound
(Entity pEntity) private void
playRemoveOneSound
(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, verifyComponentsAfterLoad
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods inherited from interface net.neoforged.neoforge.common.extensions.IItemExtension
applyEnchantments, canBeHurtBy, canContinueUsing, canDisableShield, canElytraFly, canEquip, 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:
overrideStackedOnOther
in classItem
-
overrideOtherStackedOnMe
public boolean overrideOtherStackedOnMe(ItemStack pStack, ItemStack pOther, Slot pSlot, ClickAction pAction, Player pPlayer, SlotAccess pAccess) - Overrides:
overrideOtherStackedOnMe
in 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:
isBarVisible
in classItem
-
getBarWidth
- Overrides:
getBarWidth
in classItem
-
getBarColor
- Overrides:
getBarColor
in classItem
-
dropContents
-
getTooltipImage
- Overrides:
getTooltipImage
in classItem
-
appendHoverText
public void appendHoverText(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) - Overrides:
appendHoverText
in classItem
-
onDestroyed
- Overrides:
onDestroyed
in classItem
-
playRemoveOneSound
-
playInsertSound
-
playDropContentsSound
-