类 BundleContents

java.lang.Object
net.minecraft.world.item.component.BundleContents
所有已实现的接口:
TooltipComponent

public final class BundleContents extends Object implements TooltipComponent
  • 字段详细资料

    • EMPTY

      public static final BundleContents EMPTY
    • CODEC

      public static final com.mojang.serialization.Codec<BundleContents> CODEC
    • STREAM_CODEC

      public static final StreamCodec<RegistryFriendlyByteBuf,BundleContents> STREAM_CODEC
    • BUNDLE_IN_BUNDLE_WEIGHT

      private static final org.apache.commons.lang3.math.Fraction BUNDLE_IN_BUNDLE_WEIGHT
    • NO_STACK_INDEX

      private static final int NO_STACK_INDEX
      另请参阅:
    • NO_SELECTED_ITEM_INDEX

      public static final int NO_SELECTED_ITEM_INDEX
      另请参阅:
    • items

      final List<ItemStack> items
    • weight

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

      final int selectedItem
  • 构造器详细资料

    • BundleContents

      BundleContents(List<ItemStack> p_331924_, org.apache.commons.lang3.math.Fraction p_333046_, int p_368623_)
    • BundleContents

      public BundleContents(List<ItemStack> p_334686_)
  • 方法详细资料

    • checkAndCreate

      private static com.mojang.serialization.DataResult<BundleContents> checkAndCreate(List<ItemStack> p_361886_)
    • computeContentWeight

      private static org.apache.commons.lang3.math.Fraction computeContentWeight(List<ItemStack> p_336274_)
    • getWeight

      static org.apache.commons.lang3.math.Fraction getWeight(ItemStack p_334916_)
    • canItemBeInBundle

      public static boolean canItemBeInBundle(ItemStack p_369421_)
    • getNumberOfItemsToShow

      public int getNumberOfItemsToShow()
    • getItemUnsafe

      public ItemStack getItemUnsafe(int p_329557_)
    • itemCopyStream

      public Stream<ItemStack> itemCopyStream()
    • items

      public Iterable<ItemStack> items()
    • itemsCopy

      public Iterable<ItemStack> itemsCopy()
    • size

      public int size()
    • weight

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

      public boolean isEmpty()
    • getSelectedItem

      public int getSelectedItem()
    • hasSelectedItem

      public boolean hasSelectedItem()
    • equals

      public boolean equals(Object p_330764_)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object