API reference Obsidian.API.Loot
InstrumentDefinition class
A vanilla instrument (the sound a goat horn plays). The vanilla instruments are in InstrumentsRegistry.
public sealed class InstrumentDefinition
In Obsidian.API.
Constructors
public InstrumentDefinition();Properties
public required ChatMessage Description { get; init; }Id
public required int Id { get; init; }Index in vanilla's instrument registry, which is sorted by id; the id clients know the instrument by.
Identifier
public required string Identifier { get; init; }Registry id, e.g. minecraft:ponder_goat_horn.
Range
public required float Range { get; init; }How far the sound can be heard, in blocks.
SoundEvent
public required string SoundEvent { get; init; }The sound event id, e.g. minecraft:item.goat_horn.sound.0.
UseDuration
public required float UseDuration { get; init; }How long the instrument plays, in seconds.
Methods
ToInstrumentData()
public InstrumentData ToInstrumentData();The instrument as the value of an item's minecraft:instrument component.