Instrument

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.item.component.Instrument;

Members

Getter
Gets the command string of the Instrument.
script.zs
// Instrument.commandString as string
myInstrument.commandString

Return Type: string

Getter
Gets the range of the Instrument.
script.zs
// Instrument.range as float
myInstrument.range

Return Type: float

Getter
Gets the registry name of the Instrument.
script.zs
// Instrument.registryName as ResourceLocation
myInstrument.registryName

Return Type: ResourceLocation

Getter
Gets the sound event of the Instrument.
script.zs
// Instrument.soundEvent as SoundEvent
myInstrument.soundEvent

Return Type: SoundEvent

Getter
Gets the use duration of the Instrument.
script.zs
// Instrument.useDuration as int
myInstrument.useDuration

Return Type: int