类 SoundDefinition
java.lang.Object
net.minecraftforge.common.data.SoundDefinition
Contains all the data to completely define a sound event.
-
嵌套类概要
嵌套类修饰符和类型类说明static final class
Identifies a specific sound that has to be played in a sound event, along with all the necessary parameters.static enum
Represents the type of sound that theSoundDefinition.Sound
object represents. -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static SoundDefinition
Creates a newSoundDefinition
, which will host a set ofSoundDefinition.Sound
s 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.(专用程序包) com.google.gson.JsonObject
(专用程序包) 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.
-
字段详细资料
-
sounds
-
replace
private boolean replace -
subtitle
-
-
构造器详细资料
-
SoundDefinition
private SoundDefinition()
-
-
方法详细资料
-
definition
Creates a newSoundDefinition
, which will host a set ofSoundDefinition.Sound
s and the necessary parameters. -
replace
Sets whether this definition should replace any other definition for the same sound event previously applied, rather than overwriting it.- 参数:
replace
- Whether this definition replaces or not.- 返回:
- This definition for chaining.
-
subtitle
Sets 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.
- 参数:
subtitle
- The subtitle to display, or null to disable.- 返回:
- This definition for chaining.
-
with
Adds the given sound to this sound definition.- 参数:
sound
- The sound to add.- 返回:
- This definition for chaining.
-
with
Adds the given sounds to this sound definition.- 参数:
sounds
- The sounds to add.- 返回:
- This definition for chaining.
-
soundList
List<SoundDefinition.Sound> soundList() -
serialize
com.google.gson.JsonObject serialize()
-