Package net.minecraft.item
Class BundleItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.BundleItem
- All Implemented Interfaces:
ItemConvertible
public class BundleItem extends Item
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.Settings -
Field Summary
Fields Modifier and Type Field Description private static intITEM_BAR_COLORFields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, group -
Constructor Summary
Constructors Constructor Description BundleItem(Item.Settings settings) -
Method Summary
Methods inherited from class net.minecraft.item.Item
appendStacks, asItem, byRawId, canMine, canRepair, damage, finishUsing, fromBlock, getAttributeModifiers, getDefaultStack, getDrinkSound, getEatSound, getEnchantability, getEquipSound, getFoodComponent, getGroup, getMaxCount, getMaxDamage, getMaxUseTime, getMiningSpeedMultiplier, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getTranslationKey, getTranslationKey, getUseAction, hasGlint, hasRecipeRemainder, hasStoredInventory, inventoryTick, isDamageable, isEnchantable, isFireproof, isFood, isIn, isNetworkSynced, isSuitableFor, isUsedOnRelease, onCraft, onStoppedUsing, postHit, postMine, postProcessTag, raycast, shouldSyncTagToClient, toString, usageTick, useOnBlock, useOnEntity
-
Field Details
-
ITEM_BAR_COLOR
private static final int ITEM_BAR_COLOR
-
-
Constructor Details
-
BundleItem
-
-
Method Details
-
getAmountFilled
-
onStackClicked
public boolean onStackClicked(ItemStack stack, Slot slot, ClickType clickType, PlayerInventory playerInventory)- Overrides:
onStackClickedin classItem
-
onClicked
public boolean onClicked(ItemStack stack, ItemStack otherStack, Slot slot, ClickType clickType, PlayerInventory playerInventory) -
use
Called when an item is used by a player. The use action, by default, is bound to the right mouse button.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
world.isClient().- Overrides:
usein classItem- Parameters:
world- the world the item was used inuser- the player who used the itemhand- the hand used- Returns:
- a typed action result that specifies whether using the item was successful. The action result contains the new item stack that the player's hand will be set to.
-
isItemBarVisible
- Overrides:
isItemBarVisiblein classItem
-
getItemBarStep
- Overrides:
getItemBarStepin classItem
-
getItemBarColor
- Overrides:
getItemBarColorin classItem
-
addToBundle
-
method_32344
-
getItemOccupancy
-
getBundleOccupancy
-
method_32759
-
dropAllBundledItems
-
getBundledStacks
-
getTooltipData
- Overrides:
getTooltipDatain classItem
-
appendTooltip
@Environment(CLIENT) public void appendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context)- Overrides:
appendTooltipin classItem
-
onItemEntityDestroyed
- Overrides:
onItemEntityDestroyedin classItem
-