public static class BlockProperty.BlockSound extends Component implements BlockProperty
| Modifier and Type | Class and Description |
|---|---|
static class |
BlockProperty.BlockSound.BlockSoundTrigger
Triggers for sounds to play on the location of a block
|
BlockProperty.BlockSound, BlockProperty.Hardness, BlockProperty.Opacity, BlockProperty.Replaceable, BlockProperty.Resistance| Constructor and Description |
|---|
BlockSound() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<Sound> |
getCustomSound(java.lang.String customTrigger)
Get the sound associated with a custom Id
|
java.util.Optional<Sound> |
getSound(BlockProperty.BlockSound.BlockSoundTrigger trigger)
Get the sound associated with a trigger
|
BlockProperty.BlockSound |
setBlockSound(BlockProperty.BlockSound.BlockSoundTrigger trigger,
Sound sound)
Sets a sound to play on a specified trigger.
|
BlockProperty.BlockSound |
setCustomBlockSound(java.lang.String customTrigger,
Sound sound)
Sets a sound to an id of choice
|
getID, getProvider, onProviderChangeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsameTypepublic BlockProperty.BlockSound setBlockSound(BlockProperty.BlockSound.BlockSoundTrigger trigger, Sound sound)
BlockProperty.BlockSound.BlockSoundTrigger.CUSTOM_TRIGGER use setCustomBlockSound(String,Sound)trigger - The trigger to set the sound forsound - The sound to play on the triggering of the triggerpublic BlockProperty.BlockSound setCustomBlockSound(java.lang.String customTrigger, Sound sound)
customTrigger - The custom id for the soundsound - The sound to associate with the idpublic java.util.Optional<Sound> getSound(BlockProperty.BlockSound.BlockSoundTrigger trigger)
trigger - The trigger to get the sound forpublic java.util.Optional<Sound> getCustomSound(java.lang.String customTrigger)
customTrigger - The custom id of the sound