SoundEventRegistration.java

net.minecraft.client.resources.sounds.SoundEventRegistration

信息

  • 全限定名:net.minecraft.client.resources.sounds.SoundEventRegistration
  • 类型:public class
  • 包:net.minecraft.client.resources.sounds
  • 源码路径:src/main/java/net/minecraft/client/resources/sounds/SoundEventRegistration.java
  • 起始行号:L9
  • 职责:

    TODO

字段/常量

  • sounds

    • 类型: List<Sound>
    • 修饰符: private final
    • 源码定位: L10
    • 说明:

      TODO

  • replace

    • 类型: boolean
    • 修饰符: private final
    • 源码定位: L11
    • 说明:

      TODO

  • subtitle

    • 类型: String
    • 修饰符: private final
    • 源码定位: L12
    • 说明:

      TODO

内部类/嵌套类型

构造器

public SoundEventRegistration(List<Sound> sounds, boolean replace, String subtitle) @ L14

  • 构造器名:SoundEventRegistration
  • 源码定位:L14
  • 修饰符:public

参数:

  • sounds: List
  • replace: boolean
  • subtitle: String

说明:

TODO

方法

下面的方法块按源码顺序生成。

public List<Sound> getSounds() @ L20

  • 方法名:getSounds
  • 源码定位:L20
  • 返回类型:List
  • 修饰符:public

参数:

说明:

TODO

public boolean isReplace() @ L24

  • 方法名:isReplace
  • 源码定位:L24
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public String getSubtitle() @ L28

  • 方法名:getSubtitle
  • 源码定位:L28
  • 返回类型:String
  • 修饰符:public

参数:

说明:

TODO

代码

@OnlyIn(Dist.CLIENT)
public class SoundEventRegistration {
    private final List<Sound> sounds;
    private final boolean replace;
    private final @Nullable String subtitle;
 
    public SoundEventRegistration(List<Sound> sounds, boolean replace, @Nullable String subtitle) {
        this.sounds = sounds;
        this.replace = replace;
        this.subtitle = subtitle;
    }
 
    public List<Sound> getSounds() {
        return this.sounds;
    }
 
    public boolean isReplace() {
        return this.replace;
    }
 
    public @Nullable String getSubtitle() {
        return this.subtitle;
    }
}

引用的其他类

  • Sound
    • 引用位置: 参数/字段/返回值