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 pPlayer) private boolean
dropContent
(ItemStack pStack, Player pPlayer) private void
dropContent
(Level pLevel, Player pPlayer, ItemStack pStack) static List
<BundleItem> int
getBarColor
(ItemStack p_150773_) int
getBarWidth
(ItemStack p_150771_) static Item
getByColor
(DyeColor pColor) static float
getFullnessDisplay
(ItemStack pStack) static int
getNumberOfItemsToShow
(ItemStack pBundle) static int
getSelectedItem
(ItemStack pBundle) static ItemStack
getSelectedItemStack
(ItemStack pBundle) getTooltipImage
(ItemStack p_150775_) getUseAnimation
(ItemStack p_389672_) int
getUseDuration
(ItemStack p_371683_, LivingEntity p_371530_) static boolean
hasSelectedItem
(ItemStack pBundle) boolean
isBarVisible
(ItemStack p_150769_) void
onDestroyed
(ItemEntity p_150728_) void
onUseTick
(Level p_371661_, LivingEntity p_371559_, ItemStack p_371431_, int p_371432_) Called as the item is being used by an entity.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 pLevel, Entity pEntity) private static void
playInsertFailSound
(Entity pEntity) private static void
playInsertSound
(Entity pEntity) private static void
playRemoveOneSound
(Entity pEntity) removeOneItemFromBundle
(ItemStack pStack, Player pPlayer, BundleContents pBundleContents) static void
toggleSelectedItem
(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, 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 pStack, Player pPlayer, BundleContents pBundleContents) -
onUseTick
Description copied from class:Item
Called as the item is being used by an entity. -
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
-