Class BundleContents.Mutable

java.lang.Object
net.minecraft.world.item.component.BundleContents.Mutable
Enclosing class:
BundleContents

public static class BundleContents.Mutable extends Object
  • Field Details

    • items

      private final List<ItemStack> items
    • weight

      private org.apache.commons.lang3.math.Fraction weight
    • selectedItem

      private int selectedItem
  • Constructor Details

  • Method Details

    • clearItems

      public BundleContents.Mutable clearItems()
    • findStackIndex

      private int findStackIndex(ItemStack itemsToAdd)
    • getMaxAmountToAdd

      private int getMaxAmountToAdd(org.apache.commons.lang3.math.Fraction itemWeight)
    • tryInsert

      public int tryInsert(ItemStack itemsToAdd)
    • tryTransfer

      public int tryTransfer(Slot slot, Player player)
    • toggleSelectedItem

      public void toggleSelectedItem(int selectedItem)
    • indexIsOutsideAllowedBounds

      private boolean indexIsOutsideAllowedBounds(int selectedItem)
    • removeOne

      public @Nullable ItemStack removeOne()
    • weight

      public org.apache.commons.lang3.math.Fraction weight()
    • toImmutable

      public BundleContents toImmutable()