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
static final int
static final int
static final int
static final int
private static final int
private static final int
private static final int
Fields inherited from class net.minecraft.world.item.Item
ABSOLUTE_MAX_STACK_SIZE, APPROXIMATELY_INFINITE_USE_DURATION, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, canCombineRepair, CODEC, DEFAULT_MAX_STACK_SIZE, descriptionId, MAX_BAR_WIDTH, STREAM_CODEC
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
broadcastChangesOnContainerMenu
(Player p_376384_) private boolean
dropContent
(ItemStack p_371437_, Player p_371809_) private void
dropContent
(Level p_380196_, Player p_371609_, ItemStack p_371542_) static List
<BundleItem> int
getBarColor
(ItemStack p_150773_) int
getBarWidth
(ItemStack p_150771_) static Item
getByColor
(DyeColor p_374396_) static float
getFullnessDisplay
(ItemStack p_150767_) static int
getNumberOfItemsToShow
(ItemStack p_361742_) static int
getSelectedItem
(ItemStack p_362900_) static ItemStack
getSelectedItemStack
(ItemStack p_361689_) getTooltipImage
(ItemStack p_150775_) getUseAnimation
(ItemStack p_389672_) int
getUseDuration
(ItemStack p_371683_, LivingEntity p_371530_) static boolean
hasSelectedItem
(ItemStack p_362328_) boolean
isBarVisible
(ItemStack p_150769_) void
onDestroyed
(ItemEntity p_150728_) void
onUseTick
(Level p_371661_, LivingEntity p_371559_, ItemStack p_371431_, int p_371432_) boolean
overrideOtherStackedOnMe
(ItemStack p_150742_, ItemStack p_150743_, Slot p_150744_, ClickAction p_150745_, Player p_150746_, SlotAccess p_150747_) boolean
overrideStackedOnOther
(ItemStack p_150733_, Slot p_150734_, ClickAction p_150735_, Player p_150736_) private static void
playDropContentsSound
(Level p_380028_, Entity p_186354_) private static void
playInsertFailSound
(Entity p_364546_) private static void
playInsertSound
(Entity p_186352_) private static void
playRemoveOneSound
(Entity p_186343_) removeOneItemFromBundle
(ItemStack p_371385_, Player p_371941_, BundleContents p_371197_) static void
toggleSelectedItem
(ItemStack p_363912_, int p_363836_) use
(Level p_150760_, Player p_150761_, InteractionHand p_150762_) Methods inherited from class net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canDestroyBlock, canFitInsideContainerItems, components, finishUsingItem, getAttackDamageBonus, 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, 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, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, getAllEnchantments, getBurnTime, getCraftingRemainder, getCreatorModId, getDamage, getDefaultAttributeModifiers, getEnchantmentLevel, getEntityLifespan, getEquipmentSlot, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCustomEntity, 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:
overrideStackedOnOther
in classItem
-
overrideOtherStackedOnMe
public boolean overrideOtherStackedOnMe(ItemStack p_150742_, ItemStack p_150743_, Slot p_150744_, ClickAction p_150745_, Player p_150746_, SlotAccess p_150747_) - Overrides:
overrideOtherStackedOnMe
in classItem
-
use
-
dropContent
-
isBarVisible
- Overrides:
isBarVisible
in classItem
-
getBarWidth
- Overrides:
getBarWidth
in classItem
-
getBarColor
- Overrides:
getBarColor
in classItem
-
toggleSelectedItem
-
hasSelectedItem
-
getSelectedItem
-
getSelectedItemStack
-
getNumberOfItemsToShow
-
dropContent
-
removeOneItemFromBundle
private static Optional<ItemStack> removeOneItemFromBundle(ItemStack p_371385_, Player p_371941_, BundleContents p_371197_) -
onUseTick
-
getUseDuration
- Overrides:
getUseDuration
in classItem
-
getUseAnimation
- Overrides:
getUseAnimation
in classItem
-
getTooltipImage
- Overrides:
getTooltipImage
in classItem
-
onDestroyed
- Overrides:
onDestroyed
in classItem
-
getAllBundleItemColors
-
getByColor
-
playRemoveOneSound
-
playInsertSound
-
playInsertFailSound
-
playDropContentsSound
-
broadcastChangesOnContainerMenu
-