Class BundleContents.Mutable
java.lang.Object
net.minecraft.world.item.component.BundleContents.Mutable
- Enclosing class:
BundleContents
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate org.apache.commons.lang3.math.Fraction -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intfindStackIndex(ItemStack itemsToAdd) private intgetMaxAmountToAdd(org.apache.commons.lang3.math.Fraction itemWeight) private booleanindexIsOutsideAllowedBounds(int selectedItem) @Nullable ItemStackvoidtoggleSelectedItem(int selectedItem) intinttryTransfer(Slot slot, Player player) org.apache.commons.lang3.math.Fractionweight()
-
Field Details
-
items
-
weight
private org.apache.commons.lang3.math.Fraction weight -
selectedItem
private int selectedItem
-
-
Constructor Details
-
Mutable
-
-
Method Details
-
clearItems
-
findStackIndex
-
getMaxAmountToAdd
private int getMaxAmountToAdd(org.apache.commons.lang3.math.Fraction itemWeight) -
tryInsert
-
tryTransfer
-
toggleSelectedItem
public void toggleSelectedItem(int selectedItem) -
indexIsOutsideAllowedBounds
private boolean indexIsOutsideAllowedBounds(int selectedItem) -
removeOne
-
weight
public org.apache.commons.lang3.math.Fraction weight() -
toImmutable
-