net.minecraft.item

public record SimpleItemStackView

implements ItemStackView

net.minecraft.world.item.ItemStackTemplate
net.minecraft.class_1_107
net.minecraft.item.SimpleItemStackView

Field summary

Modifier and TypeField
private final RegistryEntry<Item>
item
comp_1_77
item
private final int
count
comp_1_67
count
private final ComponentChanges
components
comp_1_76
components
private static final org.slf4j.Logger
LOGGER
field_1_1004
LOGGER
public static final com.mojang.serialization.MapCodec<SimpleItemStackView>
MAP_CODEC
field_1_1005
MAP_CODEC
public static final com.mojang.serialization.Codec<SimpleItemStackView>
CODEC
field_1_1003
CODEC
public static final PacketCodec<RegistryByteBuf, SimpleItemStackView>
STREAM_CODEC
field_1_1006
PACKET_CODEC

Constructor summary

ModifierConstructor
public (Item item)
public (Item item, int count)
public (Item item, ComponentChanges components)
public (RegistryEntry<Item> item, int count, ComponentChanges components)

Method summary

Modifier and TypeMethod
public static SimpleItemStackView
fromNonEmptyStack(ItemStack itemStack)
method_1_960(class_1799 arg0)
fromItemStack(ItemStack stack)
public static SimpleItemStackView
fromStack(ItemStack itemStack)
method_1_6378(class_1799 arg0)
fromOptionalItemStack(ItemStack stack)
public static SimpleItemStackView
fromNonEmptyStack(ItemStack itemStack, int newCount)
method_1_6606(class_1799 arg0, int arg1)
fromItemStackWithCount(ItemStack stack, int count)
public SimpleItemStackView
withCount(int count)
method_1_1283(int arg0)
withCount(int count)
public ItemStack
create()
method_1_959()
toItemStack()
private ItemStack
validate(ItemStack result)
method_1_963(class_1799 arg0)
validateStack(ItemStack stack)
public ItemStack
apply(DataComponentPatch additionalPatch)
method_1_958(class_9326 arg0)
toItemStack(ComponentChanges components)
public ItemStack
apply(int count, DataComponentPatch additionalPatch)
method_1_1282(int arg0, class_9326 arg1)
toItemStack(int count, ComponentChanges components)
public RegistryEntry<Item>
typeHolder()
method_40180()
getRegistryEntry()
public <T> T
get(DataComponentType<? extends T> type)
method_58694(class_9331<? extends T> arg0)
get(ComponentType<? extends T> arg0)
public RegistryEntry<Item>
item()
comp_1_77()
item()
public int
count()
comp_1_67()
count()
public ComponentChanges
components()
comp_1_76()
components()
private static SimpleItemStackView
lambda$static$1(Holder arg0)
method_1_962(class_6880 arg0)
method_1_962(RegistryEntry item)
private static com.mojang.datafixers.kinds.App
lambda$static$0(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_1_961(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_1_961(com.mojang.serialization.codecs.RecordCodecBuilder$Instance instance)