net.minecraft.component.type

public final class ContainerComponent

implements TooltipAppender

net.minecraft.world.item.component.ItemContainerContents
net.minecraft.class_9288
net.minecraft.component.type.ContainerComponent

Field summary

Modifier and TypeField
private static final int
NO_SLOT
field_51410
ALL_SLOTS_EMPTY
private static final int
MAX_SIZE
field_49337
MAX_SLOTS
public static final ContainerComponent
EMPTY
field_49334
DEFAULT
public static final com.mojang.serialization.Codec<ContainerComponent>
CODEC
field_49335
CODEC
public static final PacketCodec<RegistryByteBuf, ContainerComponent>
STREAM_CODEC
field_49336
PACKET_CODEC
private final DefaultedList<ItemStack>
items
field_49338
stacks
private final int
hashCode
field_51511
hashCode

Constructor summary

ModifierConstructor
private (DefaultedList<ItemStack> stacks)
private (int size)
private (List<ItemStack> stacks)

Method summary

Modifier and TypeMethod
private static ContainerComponent
fromSlots(List<ItemContainerContents$Slot> slots)
method_57496(List<class_9288$class_9289> arg0)
fromSlots(List<ContainerComponent$Slot> slots)
public static ContainerComponent
fromItems(List<ItemStack> itemStacks)
method_57493(List<class_1799> arg0)
fromStacks(List<ItemStack> stacks)
private static int
findLastNonEmptySlot(List<ItemStack> itemStacks)
method_59713(List<class_1799> arg0)
findLastNonEmptyIndex(List<ItemStack> stacks)
private List<ContainerComponent$Slot>
asSlots()
method_57494()
collectSlots()
public void
copyInto(NonNullList<ItemStack> destination)
method_57492(class_2371<class_1799> arg0)
copyTo(DefaultedList<ItemStack> stacks)
public ItemStack
copyOne()
method_58114()
copyFirstStack()
public Stream<ItemStack>
stream()
method_57489()
stream()
public Stream<ItemStack>
nonEmptyStream()
method_59712()
streamNonEmpty()
public Iterable<ItemStack>
nonEmptyItems()
method_59714()
iterateNonEmpty()
public Iterable<ItemStack>
nonEmptyItemsCopy()
method_59715()
iterateNonEmptyCopy()
public void
addToTooltip(Item$TooltipContext context, Consumer<Component> consumer, TooltipFlag flag, DataComponentGetter components)
method_57409(class_1792$class_9635 arg0, Consumer<class_2561> arg1, class_1836 arg2, class_9473 arg3)
appendTooltip(Item$TooltipContext arg0, Consumer<Text> arg1, TooltipType arg2, ComponentsAccess arg3)
private static boolean
lambda$nonEmptyItems$2(ItemStack arg0)
method_59710(class_1799 arg0)
method_59710(ItemStack stack)
private static boolean
lambda$nonEmptyStream$1(ItemStack arg0)
method_59711(class_1799 arg0)
method_59711(ItemStack stack)
private static List
lambda$static$0(ItemContainerContents arg0)
method_57491(class_9288 arg0)
method_57491(ContainerComponent component)