net.minecraft.component.type

public record InstrumentComponent

implements TooltipAppender

net.minecraft.world.item.component.InstrumentComponent
net.minecraft.class_10710
net.minecraft.component.type.InstrumentComponent

Field summary

Modifier and TypeField
private final LazyRegistryEntryReference<Instrument>
instrument
comp_3598
instrument
public static final com.mojang.serialization.Codec<InstrumentComponent>
CODEC
field_56311
CODEC
public static final PacketCodec<RegistryByteBuf, InstrumentComponent>
STREAM_CODEC
field_56312
PACKET_CODEC

Constructor summary

ModifierConstructor
public (RegistryEntry<Instrument> instrument)
public (RegistryKey<Instrument> instrument)
public (LazyRegistryEntryReference<Instrument> instrument)

Method summary

Modifier and TypeMethod
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)
public Optional<RegistryEntry<Instrument>>
unwrap(HolderLookup$Provider registries)
method_67211(class_7225$class_7874 arg0)
getInstrument(RegistryWrapper$WrapperLookup registries)
public LazyRegistryEntryReference<Instrument>
instrument()
comp_3598()
instrument()
private static void
lambda$addToTooltip$0(Consumer arg0, Holder arg1)
method_75727(Consumer arg0, class_6880 arg1)
method_75727(Consumer arg0, RegistryEntry instrument)