Package net.minecraftforge.common.data
Class SoundDefinition
java.lang.Object
net.minecraftforge.common.data.SoundDefinition
Contains all the data to completely define a sound event.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classIdentifies a specific sound that has to be played in a sound event, along with all the necessary parameters.static enumRepresents the type of sound that theSoundDefinition.Soundobject represents.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic SoundDefinitionCreates a newSoundDefinition, which will host a set ofSoundDefinition.Sounds and the necessary parameters.replace(boolean replace) Sets whether this definition should replace any other definition for the same sound event previously applied, rather than overwriting it.(package private) com.google.gson.JsonObject(package private) List<SoundDefinition.Sound>Sets the language key for the subtitle that will be displayed whenever this sound is being played.with(SoundDefinition.Sound sound) Adds the given sound to this sound definition.with(SoundDefinition.Sound... sounds) Adds the given sounds to this sound definition.
- 
Field Details- 
sounds
- 
replaceprivate boolean replace
- 
subtitle
 
- 
- 
Constructor Details- 
SoundDefinitionprivate SoundDefinition()
 
- 
- 
Method Details- 
definitionCreates a newSoundDefinition, which will host a set ofSoundDefinition.Sounds and the necessary parameters.
- 
replaceSets whether this definition should replace any other definition for the same sound event previously applied, rather than overwriting it.- Parameters:
- replace- Whether this definition replaces or not.
- Returns:
- This definition for chaining.
 
- 
subtitleSets the language key for the subtitle that will be displayed whenever this sound is being played.The subtitle is optional and the game will skip displaying it if it isn't present. - Parameters:
- subtitle- The subtitle to display, or null to disable.
- Returns:
- This definition for chaining.
 
- 
withAdds the given sound to this sound definition.- Parameters:
- sound- The sound to add.
- Returns:
- This definition for chaining.
 
- 
withAdds the given sounds to this sound definition.- Parameters:
- sounds- The sounds to add.
- Returns:
- This definition for chaining.
 
- 
soundListList<SoundDefinition.Sound> soundList()
- 
serializecom.google.gson.JsonObject serialize()
 
-