net.minecraft.component.type

public final class BundleContentsComponent

implements AbstractContainerComponent<BundleContentsComponent>, TooltipData

net.minecraft.world.item.component.BundleContents
net.minecraft.class_9276
net.minecraft.component.type.BundleContentsComponent

Field summary

Modifier and TypeField
public static final BundleContentsComponent
EMPTY
field_49289
DEFAULT
public static final com.mojang.serialization.Codec<BundleContentsComponent>
CODEC
field_49290
CODEC
public static final PacketCodec<RegistryByteBuf, BundleContentsComponent>
STREAM_CODEC
field_49291
PACKET_CODEC
private static final org.apache.commons.lang3.math.Fraction
BUNDLE_IN_BUNDLE_WEIGHT
field_49292
NESTED_BUNDLE_OCCUPANCY
private static final int
NO_STACK_INDEX
field_49293
ADD_TO_NEW_SLOT
public static final int
NO_SELECTED_ITEM_INDEX
field_52591
field_52591
public static final com.mojang.serialization.DataResult<org.apache.commons.lang3.math.Fraction>
BEEHIVE_WEIGHT
field_1_1029
FULL
private final List<SimpleItemStackView>
items
field_49294
stacks
private final int
selectedItem
field_52592
selectedStackIndex
private final Supplier<com.mojang.serialization.DataResult<org.apache.commons.lang3.math.Fraction>>
weight
field_1_1030
occupancySupplier

Constructor summary

ModifierConstructor
private (List<SimpleItemStackView> stacks, int selectedStackIndex)
public (List<SimpleItemStackView> stacks)

Method summary

Modifier and TypeMethod
private static com.mojang.serialization.DataResult<org.apache.commons.lang3.math.Fraction>
computeContentWeight(List<? extends ItemInstance> items)
method_57425(List<? extends class_1_96> arg0)
calculateOccupancy(List<? extends ItemStackView> stacks)
private static com.mojang.serialization.DataResult<org.apache.commons.lang3.math.Fraction>
getWeight(ItemInstance item)
method_57423(class_1_96 arg0)
getPerItemOccupancy(ItemStackView item)
public static boolean
canItemBeInBundle(ItemStack itemToAdd)
method_61667(class_1799 arg0)
canBeBundled(ItemStack stack)
public int
getNumberOfItemsToShow()
method_61666()
getNumberOfStacksShown()
public Stream<ItemStack>
itemCopies()
method_59707()
stream()
public List<SimpleItemStackView>
items()
method_57421()
iterate()
public int
size()
method_57426()
size()
public com.mojang.serialization.DataResult<org.apache.commons.lang3.math.Fraction>
weight()
method_57428()
getOccupancy()
public boolean
isEmpty()
method_57429()
isEmpty()
public int
getSelectedItemIndex()
method_61668()
getSelectedStackIndex()
public SimpleItemStackView
getSelectedItem()
method_1_1025()
getSelectedStack()
public BundleContentsComponent
copyWithContents(Stream<ItemStack> newContents)
method_1_7001(Stream<class_1799> arg0)
fromItemStacks(Stream<ItemStack> arg0)
public BundleContentsComponent$Builder
asMutable()
method_1_7000()
toBuilder()
public AbstractContainerComponent$Builder
asMutable()
method_1_7000()
toBuilder()
public AbstractContainerComponent
copyWithContents(Stream newContents)
method_1_7001(Stream arg0)
fromItemStacks(Stream arg0)
private static org.apache.commons.lang3.math.Fraction
lambda$getWeight$0(org.apache.commons.lang3.math.Fraction arg0)
method_1_1026(org.apache.commons.lang3.math.Fraction arg0)
method_1_1026(org.apache.commons.lang3.math.Fraction occupancy)
private static String
lambda$computeContentWeight$0()
method_65062()
method_65062()
private com.mojang.serialization.DataResult
lambda$new$0()
method_1_1027()
method_1_1027()
private static List
lambda$static$1(BundleContents arg0)
method_57424(class_9276 arg0)
method_57424(BundleContentsComponent component)
private static List
lambda$static$0(BundleContents arg0)
method_1_1028(class_9276 arg0)
method_1_1028(BundleContentsComponent component)