Class BundleContents
java.lang.Object
net.minecraft.world.item.component.BundleContents
- All Implemented Interfaces:
TooltipComponent
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.commons.lang3.math.Fraction
static final com.mojang.serialization.Codec
<BundleContents> static final BundleContents
static final int
private static final int
(package private) final int
static final StreamCodec
<RegistryFriendlyByteBuf, BundleContents> (package private) final org.apache.commons.lang3.math.Fraction
-
Constructor Summary
ConstructorsConstructorDescriptionBundleContents
(List<ItemStack> p_331417_) BundleContents
(List<ItemStack> p_331277_, org.apache.commons.lang3.math.Fraction p_339622_, int p_361490_) -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
canItemBeInBundle
(ItemStack p_362945_) private static com.mojang.serialization.DataResult
<BundleContents> checkAndCreate
(List<ItemStack> p_381706_) private static org.apache.commons.lang3.math.Fraction
computeContentWeight
(List<ItemStack> p_331148_) boolean
getItemUnsafe
(int p_330802_) int
int
(package private) static org.apache.commons.lang3.math.Fraction
int
hashCode()
boolean
boolean
isEmpty()
items()
int
size()
toString()
org.apache.commons.lang3.math.Fraction
weight()
-
Field Details
-
EMPTY
-
CODEC
-
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- See Also:
-
NO_SELECTED_ITEM_INDEX
public static final int NO_SELECTED_ITEM_INDEX- See Also:
-
items
-
weight
final org.apache.commons.lang3.math.Fraction weight -
selectedItem
final int selectedItem
-
-
Constructor Details
-
BundleContents
-
BundleContents
-
-
Method Details
-
checkAndCreate
private static com.mojang.serialization.DataResult<BundleContents> checkAndCreate(List<ItemStack> p_381706_) -
computeContentWeight
-
getWeight
-
canItemBeInBundle
-
getNumberOfItemsToShow
public int getNumberOfItemsToShow() -
getItemUnsafe
-
itemCopyStream
-
items
-
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
-
hashCode
public int hashCode() -
toString
-