net.minecraft.component.type

public final class NbtComponent

net.minecraft.world.item.component.CustomData
net.minecraft.class_9279
net.minecraft.component.type.NbtComponent

Field summary

Modifier and TypeField
public static final NbtComponent
EMPTY
field_49302
DEFAULT
public static final com.mojang.serialization.Codec<NbtCompound>
COMPOUND_TAG_CODEC
field_61351
COMPOUND_CODEC
public static final com.mojang.serialization.Codec<NbtComponent>
CODEC
field_49303
CODEC
public static final PacketCodec<io.netty.buffer.ByteBuf, NbtComponent>
STREAM_CODEC
field_49305
PACKET_CODEC
private final NbtCompound
tag
field_49306
nbt

Constructor summary

ModifierConstructor
private (NbtCompound nbt)

Method summary

Modifier and TypeMethod
public static NbtComponent
of(CompoundTag tag)
method_57456(class_2487 arg0)
of(NbtCompound nbt)
public boolean
matchedBy(CompoundTag expectedTag)
method_57460(class_2487 arg0)
matches(NbtCompound nbt)
public static void
update(DataComponentType<CustomData> component, ItemStack itemStack, Consumer<CompoundTag> consumer)
method_57452(class_9331<class_9279> arg0, class_1799 arg1, Consumer<class_2487> arg2)
set(ComponentType<NbtComponent> type, ItemStack stack, Consumer<NbtCompound> nbtSetter)
public static void
set(DataComponentType<CustomData> component, ItemStack itemStack, CompoundTag tag)
method_57453(class_9331<class_9279> arg0, class_1799 arg1, class_2487 arg2)
set(ComponentType<NbtComponent> type, ItemStack stack, NbtCompound nbt)
public NbtComponent
update(Consumer<CompoundTag> consumer)
method_57451(Consumer<class_2487> arg0)
apply(Consumer<NbtCompound> nbtConsumer)
public boolean
isEmpty()
method_57458()
isEmpty()
public NbtCompound
copyTag()
method_57461()
copyNbt()
private static NbtCompound
lambda$static$1(CustomData arg0)
method_57448(class_9279 arg0)
method_57448(NbtComponent component)
private static NbtCompound
lambda$static$0(CustomData arg0)
method_57464(class_9279 arg0)
method_57464(NbtComponent component)