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 intstatic final intstatic final intstatic final intstatic final intprivate static final intprivate 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, canCombineRepair, CODEC, DEFAULT_MAX_STACK_SIZE, descriptionId, MAX_BAR_WIDTHFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidbroadcastChangesOnContainerMenu(Player pPlayer) private booleandropContent(ItemStack pStack, Player pPlayer) private voiddropContent(Level pLevel, Player pPlayer, ItemStack pStack) static List<BundleItem> intgetBarColor(ItemStack p_150773_) intgetBarWidth(ItemStack p_150771_) static ItemgetByColor(DyeColor pColor) static floatgetFullnessDisplay(ItemStack pStack) static intgetNumberOfItemsToShow(ItemStack pBundle) static intgetSelectedItem(ItemStack pBundle) static ItemStackgetSelectedItemStack(ItemStack pBundle) getTooltipImage(ItemStack p_150775_) getUseAnimation(ItemStack p_389672_) intgetUseDuration(ItemStack p_371683_, LivingEntity p_371530_) static booleanhasSelectedItem(ItemStack pBundle) booleanisBarVisible(ItemStack p_150769_) voidonDestroyed(ItemEntity p_150728_) voidonUseTick(Level p_371661_, LivingEntity p_371559_, ItemStack p_371431_, int p_371432_) Called as the item is being used by an entity.booleanoverrideOtherStackedOnMe(ItemStack p_150742_, ItemStack p_150743_, Slot p_150744_, ClickAction p_150745_, Player p_150746_, SlotAccess p_150747_) booleanoverrideStackedOnOther(ItemStack p_150733_, Slot p_150734_, ClickAction p_150735_, Player p_150736_) private static voidplayDropContentsSound(Level pLevel, Entity pEntity) private static voidplayInsertFailSound(Entity pEntity) private static voidplayInsertSound(Entity pEntity) private static voidplayRemoveOneSound(Entity pEntity) removeOneItemFromBundle(ItemStack pStack, Player pPlayer, BundleContents pBundleContents) static voidtoggleSelectedItem(ItemStack pBundle, int pSelectedItem) use(Level p_150760_, Player p_150761_, InteractionHand p_150762_) Methods inherited from class net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canFitInsideContainerItems, components, finishUsingItem, getAttackDamageBonus, getBreakingSound, getCraftingRemainder, getDamageSource, getDefaultInstance, getDefaultMaxStackSize, getDescriptionId, getDestroySpeed, getId, getName, getName, getPlayerPOVHitResult, hurtEnemy, interactLivingEntity, inventoryTick, isCombineRepairable, isCorrectToolForDrops, isFoil, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, postHurtEnemy, releaseUsing, requiredFeatures, shouldPrintOpWarning, 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, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, getAllEnchantments, getBurnTime, getCraftingRemainder, getCreatorModId, getDamage, getDefaultAttributeModifiers, getEnchantmentLevel, getEntityLifespan, getEquipmentSlot, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCustomEntity, isBookEnchantable, isDamageable, isDamaged, isGazeDisguise, isNotReplaceableByPickAction, isPiglinCurrency, isPrimaryItemFor, makesPiglinsNeutral, onAnimalArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, supportsEnchantment
-
Field Details
-
MAX_SHOWN_GRID_ITEMS_X
public static final int MAX_SHOWN_GRID_ITEMS_X- See Also:
-
MAX_SHOWN_GRID_ITEMS_Y
public static final int MAX_SHOWN_GRID_ITEMS_Y- See Also:
-
MAX_SHOWN_GRID_ITEMS
public static final int MAX_SHOWN_GRID_ITEMS- See Also:
-
OVERFLOWING_MAX_SHOWN_GRID_ITEMS
public static final int OVERFLOWING_MAX_SHOWN_GRID_ITEMS- See Also:
-
FULL_BAR_COLOR
private static final int FULL_BAR_COLOR -
BAR_COLOR
private static final int BAR_COLOR -
TICKS_AFTER_FIRST_THROW
private static final int TICKS_AFTER_FIRST_THROW- See Also:
-
TICKS_BETWEEN_THROWS
private static final int TICKS_BETWEEN_THROWS- See Also:
-
TICKS_MAX_THROW_DURATION
private static final int TICKS_MAX_THROW_DURATION- See Also:
-
-
Constructor Details
-
BundleItem
-
-
Method Details
-
getFullnessDisplay
-
overrideStackedOnOther
public boolean overrideStackedOnOther(ItemStack p_150733_, Slot p_150734_, ClickAction p_150735_, Player p_150736_) - Overrides:
overrideStackedOnOtherin classItem
-
overrideOtherStackedOnMe
public boolean overrideOtherStackedOnMe(ItemStack p_150742_, ItemStack p_150743_, Slot p_150744_, ClickAction p_150745_, Player p_150746_, SlotAccess p_150747_) - Overrides:
overrideOtherStackedOnMein classItem
-
use
-
dropContent
-
isBarVisible
- Overrides:
isBarVisiblein classItem
-
getBarWidth
- Overrides:
getBarWidthin classItem
-
getBarColor
- Overrides:
getBarColorin classItem
-
toggleSelectedItem
-
hasSelectedItem
-
getSelectedItem
-
getSelectedItemStack
-
getNumberOfItemsToShow
-
dropContent
-
removeOneItemFromBundle
private static Optional<ItemStack> removeOneItemFromBundle(ItemStack pStack, Player pPlayer, BundleContents pBundleContents) -
onUseTick
Description copied from class:ItemCalled as the item is being used by an entity. -
getUseDuration
- Overrides:
getUseDurationin classItem
-
getUseAnimation
- Overrides:
getUseAnimationin classItem
-
getTooltipImage
- Overrides:
getTooltipImagein classItem
-
onDestroyed
- Overrides:
onDestroyedin classItem
-
getAllBundleItemColors
-
getByColor
-
playRemoveOneSound
-
playInsertSound
-
playInsertFailSound
-
playDropContentsSound
-
broadcastChangesOnContainerMenu
-