Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

SoundSource

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.sound.SoundSource;

Implements

Undocumented Interfaces

Comparable<Enum>

Enum Constants

SoundSource is an enum with 10 constants. They are accessible like so:

script.zs
// SoundSource.AMBIENT
<constant:minecraft:sound/source:ambient>
// SoundSource.BLOCKS
<constant:minecraft:sound/source:blocks>
// SoundSource.HOSTILE
<constant:minecraft:sound/source:hostile>
// SoundSource.MASTER
<constant:minecraft:sound/source:master>
// SoundSource.MUSIC
<constant:minecraft:sound/source:music>
// SoundSource.NEUTRAL
<constant:minecraft:sound/source:neutral>
// SoundSource.PLAYERS
<constant:minecraft:sound/source:players>
// SoundSource.RECORDS
<constant:minecraft:sound/source:records>
// SoundSource.VOICE
<constant:minecraft:sound/source:voice>
// SoundSource.WEATHER
<constant:minecraft:sound/source:weather>

Members

Getter
script.zs
// SoundSource.name as string
<constant:minecraft:sound/source:ambient>.name

Return Type: string

name() as string
script.zs
// SoundSource.name() as string;
<constant:minecraft:sound/source:ambient>.name();

Return Type: string