net.minecraft.component.type

public final class BundleContentsComponent

implements AbstractContainerComponent<BundleContentsComponent>, TooltipData

net.minecraft.world.item.component.BundleContents
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
EMPTY
field_49289
DEFAULT
public static final com.mojang.serialization.Codec<BundleContentsComponent>
CODEC
CODEC
field_49290
CODEC
public static final PacketCodec<RegistryByteBuf, BundleContentsComponent>
STREAM_CODEC
STREAM_CODEC
field_49291
PACKET_CODEC
private static final org.apache.commons.lang3.math.Fraction
BUNDLE_IN_BUNDLE_WEIGHT
BUNDLE_IN_BUNDLE_WEIGHT
field_49292
NESTED_BUNDLE_OCCUPANCY
private static final int
NO_STACK_INDEX
NO_STACK_INDEX
field_49293
ADD_TO_NEW_SLOT
public static final int
NO_SELECTED_ITEM_INDEX
NO_SELECTED_ITEM_INDEX
field_52591
field_52591
public static final com.mojang.serialization.DataResult<org.apache.commons.lang3.math.Fraction>
BEEHIVE_WEIGHT
BEEHIVE_WEIGHT
field_1_1029
FULL
private final List<SimpleItemStackView>
items
items
field_49294
stacks
private final int
selectedItem
selectedItem
field_52592
selectedStackIndex
private final Supplier<com.mojang.serialization.DataResult<org.apache.commons.lang3.math.Fraction>>
weight
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)
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)
getWeight(ItemInstance item)
method_57423(class_1_96 arg0)
getPerItemOccupancy(ItemStackView item)
public static boolean
canItemBeInBundle(ItemStack itemToAdd)
canItemBeInBundle(ItemStack itemToAdd)
method_61667(class_1799 arg0)
canBeBundled(ItemStack stack)
public int
getNumberOfItemsToShow()
getNumberOfItemsToShow()
method_61666()
getNumberOfStacksShown()
public Stream<ItemStack>
itemCopies()
itemCopies()
method_59707()
stream()
public List<SimpleItemStackView>
items()
items()
method_57421()
iterate()
public int
size()
size()
method_57426()
size()
public com.mojang.serialization.DataResult<org.apache.commons.lang3.math.Fraction>
weight()
weight()
method_57428()
getOccupancy()
public boolean
isEmpty()
isEmpty()
method_57429()
isEmpty()
public int
getSelectedItemIndex()
getSelectedItemIndex()
method_61668()
getSelectedStackIndex()
public SimpleItemStackView
getSelectedItem()
getSelectedItem()
method_1_1025()
getSelectedStack()
public BundleContentsComponent
copyWithContents(Stream<ItemStack> newContents)
copyWithContents(Stream<ItemStack> newContents)
method_1_7001(Stream<class_1799> arg0)
fromItemStacks(Stream<ItemStack> arg0)
public BundleContentsComponent$Builder
asMutable()
asMutable()
method_1_7000()
toBuilder()