net.minecraft.component

public record Component<T>

net.minecraft.core.component.TypedDataComponent
net.minecraft.class_9336
net.minecraft.component.Component

Field summary

Modifier and TypeField
private final ComponentType<T>
type
comp_2443
type
private final T
value
comp_2444
value
public static final PacketCodec<RegistryByteBuf, Component<?>>
STREAM_CODEC
field_49657
PACKET_CODEC

Constructor summary

ModifierConstructor
public (ComponentType<T> type, T value)

Method summary

Modifier and TypeMethod
static Component<?>
fromEntryUnchecked(Map$Entry<DataComponentType<?>, Object> entry)
method_57944(Map$Entry<class_9331<?>, Object> arg0)
of(Map$Entry<ComponentType<?>, Object> entry)
public static <T> Component<T>
createUnchecked(DataComponentType<T> type, Object value)
method_57945(class_9331<T> arg0, Object arg1)
of(ComponentType<T> type, Object value)
public void
applyTo(PatchedDataComponentMap components)
method_57946(class_9335 arg0)
apply(MergedComponentMap components)
public <D> com.mojang.serialization.DataResult<D>
encodeValue(com.mojang.serialization.DynamicOps<D> ops)
method_57943(com.mojang.serialization.DynamicOps<D> arg0)
encode(com.mojang.serialization.DynamicOps<D> ops)
public ComponentType<T>
type()
comp_2443()
type()
public T
value()
comp_2444()
value()
private String
lambda$encodeValue$0()
method_57947()
method_57947()