SoundOptionsScreen.java
net.minecraft.client.gui.screens.options.SoundOptionsScreen
信息
- 全限定名:net.minecraft.client.gui.screens.options.SoundOptionsScreen
- 类型:public class
- 包:net.minecraft.client.gui.screens.options
- 源码路径:src/main/java/net/minecraft/client/gui/screens/options/SoundOptionsScreen.java
- 起始行号:L13
- 继承:OptionsSubScreen
- 职责:
TODO
字段/常量
TITLE- 类型:
Component - 修饰符:
private static final - 源码定位:
L14 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
public SoundOptionsScreen(Screen lastScreen, Options options) @ L16
- 构造器名:SoundOptionsScreen
- 源码定位:L16
- 修饰符:public
参数:
- lastScreen: Screen
- options: Options
说明:
TODO
方法
下面的方法块按源码顺序生成。
protected void addOptions() @ L20
- 方法名:addOptions
- 源码定位:L20
- 返回类型:void
- 修饰符:protected
参数:
- 无
说明:
TODO
private OptionInstance<?>[] getAllSoundOptionsExceptMaster() @ L29
- 方法名:getAllSoundOptionsExceptMaster
- 源码定位:L29
- 返回类型:OptionInstance<?>[]
- 修饰符:private
参数:
- 无
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public class SoundOptionsScreen extends OptionsSubScreen {
private static final Component TITLE = Component.translatable("options.sounds.title");
public SoundOptionsScreen(Screen lastScreen, Options options) {
super(lastScreen, options, TITLE);
}
@Override
protected void addOptions() {
this.list.addBig(this.options.getSoundSourceOptionInstance(SoundSource.MASTER));
this.list.addSmall(this.getAllSoundOptionsExceptMaster());
this.list.addBig(this.options.soundDevice());
this.list.addSmall(this.options.showSubtitles(), this.options.directionalAudio());
this.list.addSmall(this.options.musicFrequency(), this.options.musicToast());
}
private OptionInstance<?>[] getAllSoundOptionsExceptMaster() {
return Arrays.stream(SoundSource.values())
.filter(s -> s != SoundSource.MASTER)
.map(this.options::getSoundSourceOptionInstance)
.toArray(OptionInstance[]::new);
}
}引用的其他类
-
- 引用位置:
返回值
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
继承
- 引用位置:
-
- 引用位置:
字段/方法调用 - 关联成员:
Component.translatable()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
SoundSource.values()
- 引用位置: