Class BundleItem

java.lang.Object
net.minecraft.item.Item
net.minecraft.item.BundleItem
All Implemented Interfaces:
ItemConvertible

public class BundleItem extends Item
Mappings:
Namespace Name
official bsq
intermediary net/minecraft/class_5537
named net/minecraft/item/BundleItem
  • Field Details

    • ITEMS_KEY

      private static final String ITEMS_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lbsq;b:Ljava/lang/String;
      intermediary field_30858 Lnet/minecraft/class_5537;field_30858:Ljava/lang/String;
      named ITEMS_KEY Lnet/minecraft/item/BundleItem;ITEMS_KEY:Ljava/lang/String;
    • MAX_STORAGE

      public static final int MAX_STORAGE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lbsq;a:I
      intermediary field_30857 Lnet/minecraft/class_5537;field_30857:I
      named MAX_STORAGE Lnet/minecraft/item/BundleItem;MAX_STORAGE:I
    • field_30859

      private static final int field_30859
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official c Lbsq;c:I
      intermediary field_30859 Lnet/minecraft/class_5537;field_30859:I
      named field_30859 Lnet/minecraft/item/BundleItem;field_30859:I
    • ITEM_BAR_COLOR

      private static final int ITEM_BAR_COLOR
      Mappings:
      Namespace Name Mixin selector
      official d Lbsq;d:I
      intermediary field_27016 Lnet/minecraft/class_5537;field_27016:I
      named ITEM_BAR_COLOR Lnet/minecraft/item/BundleItem;ITEM_BAR_COLOR:I
  • Constructor Details

    • BundleItem

      public BundleItem(Item.Settings settings)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbua;<init>(Lbua$a;)V
      intermediary <init> Lnet/minecraft/class_1792;<init>(Lnet/minecraft/class_1792$class_1793;)V
      named <init> Lnet/minecraft/item/Item;<init>(Lnet/minecraft/item/Item$Settings;)V
  • Method Details

    • getAmountFilled

      public static float getAmountFilled(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official d Lbsq;d(Lbue;)F
      intermediary method_31561 Lnet/minecraft/class_5537;method_31561(Lnet/minecraft/class_1799;)F
      named getAmountFilled Lnet/minecraft/item/BundleItem;getAmountFilled(Lnet/minecraft/item/ItemStack;)F
    • onStackClicked

      public boolean onStackClicked(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player)
      Overrides:
      onStackClicked in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lbua;a(Lbue;Lbro;Lbqf;Lbnr;)Z
      intermediary method_31565 Lnet/minecraft/class_1792;method_31565(Lnet/minecraft/class_1799;Lnet/minecraft/class_1735;Lnet/minecraft/class_5536;Lnet/minecraft/class_1657;)Z
      named onStackClicked Lnet/minecraft/item/Item;onStackClicked(Lnet/minecraft/item/ItemStack;Lnet/minecraft/screen/slot/Slot;Lnet/minecraft/util/ClickType;Lnet/minecraft/entity/player/PlayerEntity;)Z
    • onClicked

      public boolean onClicked(ItemStack stack, ItemStack otherStack, Slot slot, ClickType clickType, PlayerEntity player, StackReference cursorStackReference)
      Overrides:
      onClicked in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lbua;a(Lbue;Lbue;Lbro;Lbqf;Lbnr;Laxy;)Z
      intermediary method_31566 Lnet/minecraft/class_1792;method_31566(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_1735;Lnet/minecraft/class_5536;Lnet/minecraft/class_1657;Lnet/minecraft/class_5630;)Z
      named onClicked Lnet/minecraft/item/Item;onClicked(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;Lnet/minecraft/screen/slot/Slot;Lnet/minecraft/util/ClickType;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/inventory/StackReference;)Z
    • use

      public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand)
      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:
      use in class Item
      Parameters:
      world - the world the item was used in
      user - the player who used the item
      hand - 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.
      Mappings:
      Namespace Name Mixin selector
      official a Lbua;a(Lcad;Lbnr;Lavp;)Lavr;
      intermediary method_7836 Lnet/minecraft/class_1792;method_7836(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1271;
      named use Lnet/minecraft/item/Item;use(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult;
    • isItemBarVisible

      public boolean isItemBarVisible(ItemStack stack)
      Overrides:
      isItemBarVisible in class Item
      Mappings:
      Namespace Name Mixin selector
      official e Lbua;e(Lbue;)Z
      intermediary method_31567 Lnet/minecraft/class_1792;method_31567(Lnet/minecraft/class_1799;)Z
      named isItemBarVisible Lnet/minecraft/item/Item;isItemBarVisible(Lnet/minecraft/item/ItemStack;)Z
    • getItemBarStep

      public int getItemBarStep(ItemStack stack)
      Overrides:
      getItemBarStep in class Item
      Mappings:
      Namespace Name Mixin selector
      official f Lbua;f(Lbue;)I
      intermediary method_31569 Lnet/minecraft/class_1792;method_31569(Lnet/minecraft/class_1799;)I
      named getItemBarStep Lnet/minecraft/item/Item;getItemBarStep(Lnet/minecraft/item/ItemStack;)I
    • getItemBarColor

      public int getItemBarColor(ItemStack stack)
      Overrides:
      getItemBarColor in class Item
      Mappings:
      Namespace Name Mixin selector
      official g Lbua;g(Lbue;)I
      intermediary method_31571 Lnet/minecraft/class_1792;method_31571(Lnet/minecraft/class_1799;)I
      named getItemBarColor Lnet/minecraft/item/Item;getItemBarColor(Lnet/minecraft/item/ItemStack;)I
    • addToBundle

      private static int addToBundle(ItemStack bundle, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official b Lbsq;b(Lbue;Lbue;)I
      intermediary method_31560 Lnet/minecraft/class_5537;method_31560(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)I
      named addToBundle Lnet/minecraft/item/BundleItem;addToBundle(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)I
    • canMergeStack

      private static Optional<NbtCompound> canMergeStack(ItemStack stack, NbtList items)
      Mappings:
      Namespace Name Mixin selector
      official a Lbsq;a(Lbue;Loi;)Ljava/util/Optional;
      intermediary method_32344 Lnet/minecraft/class_5537;method_32344(Lnet/minecraft/class_1799;Lnet/minecraft/class_2499;)Ljava/util/Optional;
      named canMergeStack Lnet/minecraft/item/BundleItem;canMergeStack(Lnet/minecraft/item/ItemStack;Lnet/minecraft/nbt/NbtList;)Ljava/util/Optional;
    • getItemOccupancy

      private static int getItemOccupancy(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official k Lbsq;k(Lbue;)I
      intermediary method_31562 Lnet/minecraft/class_5537;method_31562(Lnet/minecraft/class_1799;)I
      named getItemOccupancy Lnet/minecraft/item/BundleItem;getItemOccupancy(Lnet/minecraft/item/ItemStack;)I
    • getBundleOccupancy

      private static int getBundleOccupancy(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official o Lbsq;o(Lbue;)I
      intermediary method_31563 Lnet/minecraft/class_5537;method_31563(Lnet/minecraft/class_1799;)I
      named getBundleOccupancy Lnet/minecraft/item/BundleItem;getBundleOccupancy(Lnet/minecraft/item/ItemStack;)I
    • removeFirstStack

      private static Optional<ItemStack> removeFirstStack(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official p Lbsq;p(Lbue;)Ljava/util/Optional;
      intermediary method_32759 Lnet/minecraft/class_5537;method_32759(Lnet/minecraft/class_1799;)Ljava/util/Optional;
      named removeFirstStack Lnet/minecraft/item/BundleItem;removeFirstStack(Lnet/minecraft/item/ItemStack;)Ljava/util/Optional;
    • dropAllBundledItems

      private static boolean dropAllBundledItems(ItemStack stack, PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      official a Lbsq;a(Lbue;Lbnr;)Z
      intermediary method_32757 Lnet/minecraft/class_5537;method_32757(Lnet/minecraft/class_1799;Lnet/minecraft/class_1657;)Z
      named dropAllBundledItems Lnet/minecraft/item/BundleItem;dropAllBundledItems(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;)Z
    • getBundledStacks

      private static Stream<ItemStack> getBundledStacks(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official q Lbsq;q(Lbue;)Ljava/util/stream/Stream;
      intermediary method_32345 Lnet/minecraft/class_5537;method_32345(Lnet/minecraft/class_1799;)Ljava/util/stream/Stream;
      named getBundledStacks Lnet/minecraft/item/BundleItem;getBundledStacks(Lnet/minecraft/item/ItemStack;)Ljava/util/stream/Stream;
    • getTooltipData

      public Optional<TooltipData> getTooltipData(ItemStack stack)
      Overrides:
      getTooltipData in class Item
      Mappings:
      Namespace Name Mixin selector
      official h Lbua;h(Lbue;)Ljava/util/Optional;
      intermediary method_32346 Lnet/minecraft/class_1792;method_32346(Lnet/minecraft/class_1799;)Ljava/util/Optional;
      named getTooltipData Lnet/minecraft/item/Item;getTooltipData(Lnet/minecraft/item/ItemStack;)Ljava/util/Optional;
    • appendTooltip

      public void appendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context)
      Overrides:
      appendTooltip in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lbua;a(Lbue;Lcad;Ljava/util/List;Lbvr;)V
      intermediary method_7851 Lnet/minecraft/class_1792;method_7851(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Ljava/util/List;Lnet/minecraft/class_1836;)V
      named appendTooltip Lnet/minecraft/item/Item;appendTooltip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Ljava/util/List;Lnet/minecraft/client/item/TooltipContext;)V
    • onItemEntityDestroyed

      public void onItemEntityDestroyed(ItemEntity entity)
      Overrides:
      onItemEntityDestroyed in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lbua;a(Lbkq;)V
      intermediary method_33261 Lnet/minecraft/class_1792;method_33261(Lnet/minecraft/class_1542;)V
      named onItemEntityDestroyed Lnet/minecraft/item/Item;onItemEntityDestroyed(Lnet/minecraft/entity/ItemEntity;)V
    • playRemoveOneSound

      private void playRemoveOneSound(Entity entity)
      Mappings:
      Namespace Name Mixin selector
      official a Lbsq;a(Lawt;)V
      intermediary method_38074 Lnet/minecraft/class_5537;method_38074(Lnet/minecraft/class_1297;)V
      named playRemoveOneSound Lnet/minecraft/item/BundleItem;playRemoveOneSound(Lnet/minecraft/entity/Entity;)V
    • playInsertSound

      private void playInsertSound(Entity entity)
      Mappings:
      Namespace Name Mixin selector
      official b Lbsq;b(Lawt;)V
      intermediary method_38076 Lnet/minecraft/class_5537;method_38076(Lnet/minecraft/class_1297;)V
      named playInsertSound Lnet/minecraft/item/BundleItem;playInsertSound(Lnet/minecraft/entity/Entity;)V
    • playDropContentsSound

      private void playDropContentsSound(Entity entity)
      Mappings:
      Namespace Name Mixin selector
      official c Lbsq;c(Lawt;)V
      intermediary method_38077 Lnet/minecraft/class_5537;method_38077(Lnet/minecraft/class_1297;)V
      named playDropContentsSound Lnet/minecraft/item/BundleItem;playDropContentsSound(Lnet/minecraft/entity/Entity;)V