net.minecraft.component.type

public class BundleContentsComponent$Builder

extends AbstractContainerComponentBuilder<BundleContentsComponent>

All mapped superinterfaces:

AbstractContainerComponent$Builder, SlotContainer

net.minecraft.world.item.component.BundleContents$Mutable
net.minecraft.class_9276$class_9277
net.minecraft.component.type.BundleContentsComponent$Builder

Field summary

Modifier and TypeField
private org.apache.commons.lang3.math.Fraction
weight
field_49297
occupancy
private int
selectedItem
field_52593
selectedStackIndex
private boolean
needsFlattening
field_1_7507
dirty

Constructor summary

ModifierConstructor
private (List<ItemStack> stacks, org.apache.commons.lang3.math.Fraction occupancy, int selectedStackIndex)
public ()

Method summary

Modifier and TypeMethod
public BundleContentsComponent$Builder
clearItems()
method_59709()
clear()
private int
findStackIndexWithinRange(ItemStack itemsToAdd, int minInclusive, int maxExclusive)
method_1_6861(class_1799 arg0, int arg1, int arg2)
getInsertionIndex(ItemStack stack, int start, int end)
private int
findStackIndex(ItemStack itemsToAdd)
method_57434(class_1799 arg0)
getInsertionIndex(ItemStack stack)
private int
getMaxAmountToAdd(org.apache.commons.lang3.math.Fraction itemWeight)
method_57436(org.apache.commons.lang3.math.Fraction arg0)
getMaxAllowed(org.apache.commons.lang3.math.Fraction spacePerItem)
public int
tryInsert(ItemStack itemsToAdd)
method_57432(class_1799 arg0)
add(ItemStack stack)
public int
tryTransfer(Slot slot, Player player)
method_57431(class_1735 arg0, class_1657 arg1)
add(Slot slot, PlayerEntity player)
public void
toggleSelectedItem(int selectedItem)
method_64662(int arg0)
setSelectedStackIndex(int selectedStackIndex)
private boolean
indexIsOutsideAllowedBounds(int selectedItem)
method_66335(int arg0)
isOutOfBounds(int index)
public ItemStack
removeOne()
method_57430()
removeSelected()
private static org.apache.commons.lang3.math.Fraction
getStackedWeight(org.apache.commons.lang3.math.Fraction weight, int count)
method_1_6863(org.apache.commons.lang3.math.Fraction arg0, int arg1)
getTotalStackOccupancy(org.apache.commons.lang3.math.Fraction occupancyPerItem, int count)
private static org.apache.commons.lang3.math.Fraction
getStackedWeight(ItemStack stack)
method_1_6862(class_1799 arg0)
getTotalStackOccupancy(ItemStack stack)
public org.apache.commons.lang3.math.Fraction
weight()
method_57433()
getOccupancy()
public int
replaceSlotItems(ItemProvider newItems, SlotSelector slotSelector)
method_1_6667(class_1_1040 arg0, class_1_1052 arg1)
copyFrom(ItemIterator arg0, SlotSelector arg1)
public void
modifySlots(Consumer<? super SlotAccess> consumer, SlotSelector slotSelector)
method_1_6665(Consumer<? super class_5630> arg0, class_1_1052 arg1)
forEach(Consumer<? super StackReference> arg0, SlotSelector arg1)
protected int
insertNewSlots(ItemProvider newItems, SlotSelector slotSelector)
method_1_7069(class_1_1040 arg0, class_1_1052 arg1)
addItemStacks(ItemIterator arg0, SlotSelector arg1)
protected boolean
setItem(int slot, ItemStack itemStack)
method_1_7072(int arg0, class_1799 arg1)
set(int arg0, ItemStack arg1)
protected boolean
addSlotWithItem(ItemStack itemStack)
method_1_7067(class_1799 arg0)
addItemStack(ItemStack arg0)
private static org.apache.commons.lang3.math.Fraction
getWeightWithAddedItems(org.apache.commons.lang3.math.Fraction weight, ItemStack itemsToAdd)
method_1_6864(org.apache.commons.lang3.math.Fraction arg0, class_1799 arg1)
getOccupancyAfterInsertion(org.apache.commons.lang3.math.Fraction occupancy, ItemStack stack)
public boolean
canInsertNewSlots()
method_1_7068()
canAcceptMoreItems()
private void
mergeIdenticalStacks()
method_1_6865()
collapse()
public BundleContentsComponent
toImmutable()
method_1_7002()
build()
public Object
toImmutable()
method_1_7002()
build()