Home Commands Examples Getting Started With Scripts Global Keywords

SoundType

Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

script.zs
import crafttweaker.api.sound.SoundType;

Methods

Return Type: SoundEvent

script.zs
// SoundType.getBreakSound() as SoundEvent
mySoundType.getBreakSound();

Return Type: SoundEvent

script.zs
// SoundType.getFallSound() as SoundEvent
mySoundType.getFallSound();

Return Type: SoundEvent

script.zs
// SoundType.getHitSound() as SoundEvent
mySoundType.getHitSound();

Return Type: float

script.zs
// SoundType.getPitch() as float
mySoundType.getPitch();

Return Type: SoundEvent

script.zs
// SoundType.getPlaceSound() as SoundEvent
mySoundType.getPlaceSound();

Return Type: SoundEvent

script.zs
// SoundType.getStepSound() as SoundEvent
mySoundType.getStepSound();

Return Type: float

script.zs
// SoundType.getVolume() as float
mySoundType.getVolume();

Properties

NameTypeHas GetterHas Setter
Name
breakSound
Type
SoundEvent
Has Getter
true
Has Setter
false
Name
fallSound
Type
SoundEvent
Has Getter
true
Has Setter
false
Name
hitSound
Type
SoundEvent
Has Getter
true
Has Setter
false
Name
pitch
Type
float
Has Getter
true
Has Setter
false
Name
placeSound
Type
SoundEvent
Has Getter
true
Has Setter
false
Name
stepSound
Type
SoundEvent
Has Getter
true
Has Setter
false
Name
volume
Type
float
Has Getter
true
Has Setter
false