net.minecraft.component.type

public final class BundleContentsComponent

implements 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
private final List<ItemStack>
items
field_49294
stacks
private final org.apache.commons.lang3.math.Fraction
weight
field_49295
occupancy
private final int
selectedItem
field_52592
selectedStackIndex

Constructor summary

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

Method summary

Modifier and TypeMethod
private static com.mojang.serialization.DataResult<BundleContentsComponent>
checkAndCreate(List<ItemStack> items)
method_65061(List<class_1799> arg0)
validateOccupancy(List<ItemStack> stacks)
private static org.apache.commons.lang3.math.Fraction
computeContentWeight(List<ItemStack> items)
method_57425(List<class_1799> arg0)
calculateOccupancy(List<ItemStack> stacks)
private static org.apache.commons.lang3.math.Fraction
getWeight(ItemStack stack)
method_57423(class_1799 arg0)
getOccupancy(ItemStack stack)
public static boolean
canItemBeInBundle(ItemStack itemsToAdd)
method_61667(class_1799 arg0)
canBeBundled(ItemStack stack)
public int
getNumberOfItemsToShow()
method_61666()
getNumberOfStacksShown()
public ItemStack
getItemUnsafe(int index)
method_57422(int arg0)
get(int index)
public Stream<ItemStack>
itemCopyStream()
method_59707()
stream()
public Iterable<ItemStack>
items()
method_57421()
iterate()
public Iterable<ItemStack>
itemsCopy()
method_59708()
iterateCopy()
public int
size()
method_57426()
size()
public org.apache.commons.lang3.math.Fraction
weight()
method_57428()
getOccupancy()
public boolean
isEmpty()
method_57429()
isEmpty()
public int
getSelectedItem()
method_61668()
getSelectedStackIndex()
public boolean
hasSelectedItem()
method_61669()
hasSelectedStack()
private static String
lambda$checkAndCreate$2()
method_65062()
method_65062()
private static List
lambda$static$1(BundleContents arg0)
method_57424(class_9276 arg0)
method_57424(BundleContentsComponent component)
private static com.mojang.serialization.DataResult
lambda$static$0(BundleContents arg0)
method_57427(class_9276 arg0)
method_57427(BundleContentsComponent component)