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 stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) private static booleandropContents(ItemStack stack, Player player) intgetBarColor(ItemStack stack) intgetBarWidth(ItemStack stack) static floatgetFullnessDisplay(ItemStack stack) getTooltipImage(ItemStack stack) booleanisBarVisible(ItemStack stack) voidonDestroyed(ItemEntity itemEntity) booleanoverrideOtherStackedOnMe(ItemStack stack, ItemStack other, Slot slot, ClickAction action, Player player, SlotAccess access) booleanoverrideStackedOnOther(ItemStack stack, Slot slot, ClickAction action, Player player) private voidplayDropContentsSound(Entity entity) private voidplayInsertSound(Entity entity) private voidplayRemoveOneSound(Entity entity) use(Level level, Player player, InteractionHand usedHand) 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, 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 stack, Slot slot, ClickAction action, Player player) - Overrides:
overrideStackedOnOtherin classItem
-
overrideOtherStackedOnMe
public boolean overrideOtherStackedOnMe(ItemStack stack, ItemStack other, Slot slot, ClickAction action, Player player, SlotAccess access) - Overrides:
overrideOtherStackedOnMein classItem
-
use
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 stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) - Overrides:
appendHoverTextin classItem
-
onDestroyed
- Overrides:
onDestroyedin classItem
-
playRemoveOneSound
-
playInsertSound
-
playDropContentsSound
-