本文整理汇总了Java中net.minecraft.client.settings.GameSettings.Options方法的典型用法代码示例。如果您正苦于以下问题:Java GameSettings.Options方法的具体用法?Java GameSettings.Options怎么用?Java GameSettings.Options使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.settings.GameSettings
的用法示例。
在下文中一共展示了GameSettings.Options方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initGui
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
/**
* Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
* window resizes, the buttonList is cleared beforehand.
*/
public void initGui()
{
this.keyBindingList = new GuiKeyBindingList(this, this.mc);
this.buttonList.add(new GuiButton(200, this.width / 2 - 155, this.height - 29, 150, 20, I18n.format("gui.done", new Object[0])));
this.buttonList.add(this.buttonReset = new GuiButton(201, this.width / 2 - 155 + 160, this.height - 29, 150, 20, I18n.format("controls.resetAll", new Object[0])));
this.screenTitle = I18n.format("controls.title", new Object[0]);
int i = 0;
for (GameSettings.Options gamesettings$options : optionsArr)
{
if (gamesettings$options.getEnumFloat())
{
this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, 18 + 24 * (i >> 1), gamesettings$options));
}
else
{
this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, 18 + 24 * (i >> 1), gamesettings$options, this.options.getKeyBinding(gamesettings$options)));
}
++i;
}
}
示例2: initGui
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
/**
* Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
* window resizes, the buttonList is cleared beforehand.
*/
public void initGui()
{
int i = 0;
for (GameSettings.Options gamesettings$options : enumOptions)
{
int j = this.width / 2 - 155 + i % 2 * 160;
int k = this.height / 6 + 21 * (i / 2) - 10;
if (!gamesettings$options.getEnumFloat())
{
this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options, this.settings.getKeyBinding(gamesettings$options)));
}
else
{
this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options));
}
++i;
}
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168 + 11, I18n.format("gui.done", new Object[0])));
}
示例3: initGui
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
/**
* Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
* window resizes, the buttonList is cleared beforehand.
*/
public void initGui()
{
int i = 0;
this.field_146401_i = I18n.format("options.chat.title", new Object[0]);
for (GameSettings.Options gamesettings$options : field_146399_a)
{
if (gamesettings$options.getEnumFloat())
{
this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), gamesettings$options));
}
else
{
this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), gamesettings$options, this.game_settings.getKeyBinding(gamesettings$options)));
}
++i;
}
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 120, I18n.format("gui.done", new Object[0])));
}
示例4: initGui
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
/**
* Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
* window resizes, the buttonList is cleared beforehand.
*/
public void initGui() {
this.screenTitle = I18n.format("options.videoTitle");
this.buttonList.clear();
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height - 27, I18n.format("gui.done")));
if(OpenGlHelper.vboSupported) {
this.optionsRowList = new GuiNewOptionsRowList(this.mc, this.width, this.height, 32, this.height - 32, 25, VIDEO_OPTIONS);
} else {
GameSettings.Options[] agamesettings$options = new GameSettings.Options[VIDEO_OPTIONS.length - 1];
int i = 0;
for(GameSettings.Options gamesettings$options : VIDEO_OPTIONS) {
if(gamesettings$options == GameSettings.Options.USE_VBO) {
break;
}
agamesettings$options[i] = gamesettings$options;
++i;
}
this.optionsRowList = new GuiNewOptionsRowList(this.mc, this.width, this.height, 32, this.height - 32, 25, agamesettings$options);
}
}
示例5: initGui
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
/**
* Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
* window resizes, the buttonList is cleared beforehand.
*/
public void initGui()
{
this.keyBindingList = new GuiKeyBindingList(this, this.mc);
this.buttonList.add(new GuiButton(200, this.width / 2 - 155, this.height - 29, 150, 20, I18n.format("gui.done", new Object[0])));
this.buttonReset = this.addButton(new GuiButton(201, this.width / 2 - 155 + 160, this.height - 29, 150, 20, I18n.format("controls.resetAll", new Object[0])));
this.screenTitle = I18n.format("controls.title", new Object[0]);
int i = 0;
for (GameSettings.Options gamesettings$options : OPTIONS_ARR)
{
if (gamesettings$options.getEnumFloat())
{
this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, 18 + 24 * (i >> 1), gamesettings$options));
}
else
{
this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, 18 + 24 * (i >> 1), gamesettings$options, this.options.getKeyBinding(gamesettings$options)));
}
++i;
}
}
示例6: initGui
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
/**
* Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
* window resizes, the buttonList is cleared beforehand.
*/
public void initGui()
{
this.title = I18n.format("of.options.otherTitle", new Object[0]);
this.buttonList.clear();
for (int i = 0; i < enumOptions.length; ++i)
{
GameSettings.Options gamesettings$options = enumOptions[i];
int j = this.width / 2 - 155 + i % 2 * 160;
int k = this.height / 6 + 21 * (i / 2) - 12;
if (!gamesettings$options.getEnumFloat())
{
this.buttonList.add(new GuiOptionButtonOF(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options, this.settings.getKeyBinding(gamesettings$options)));
}
else
{
this.buttonList.add(new GuiOptionSliderOF(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options));
}
}
this.buttonList.add(new GuiButton(210, this.width / 2 - 100, this.height / 6 + 168 + 11 - 44, I18n.format("of.options.other.reset", new Object[0])));
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168 + 11, I18n.format("gui.done", new Object[0])));
}
示例7: initGui
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
/**
* Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
* window resizes, the buttonList is cleared beforehand.
*/
public void initGui()
{
this.title = I18n.format("of.options.qualityTitle", new Object[0]);
this.buttonList.clear();
for (int i = 0; i < enumOptions.length; ++i)
{
GameSettings.Options gamesettings$options = enumOptions[i];
int j = this.width / 2 - 155 + i % 2 * 160;
int k = this.height / 6 + 21 * (i / 2) - 12;
if (!gamesettings$options.getEnumFloat())
{
this.buttonList.add(new GuiOptionButtonOF(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options, this.settings.getKeyBinding(gamesettings$options)));
}
else
{
this.buttonList.add(new GuiOptionSliderOF(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options));
}
}
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168 + 11, I18n.format("gui.done", new Object[0])));
}
示例8: createButton
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
private GuiButton createButton(Minecraft mcIn, int p_148182_2_, int p_148182_3_, GameSettings.Options options)
{
if (options == null)
{
return null;
}
else
{
int i = options.returnEnumOrdinal();
return (GuiButton)(options.getEnumFloat() ? new GuiOptionSlider(i, p_148182_2_, p_148182_3_, options) : new GuiOptionButton(i, p_148182_2_, p_148182_3_, options, mcIn.gameSettings.getKeyBinding(options)));
}
}
示例9: func_148182_a
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
private GuiButton func_148182_a(Minecraft mcIn, int p_148182_2_, int p_148182_3_, GameSettings.Options p_148182_4_)
{
if (p_148182_4_ == null)
{
return null;
}
else
{
int i = p_148182_4_.returnEnumOrdinal();
return (GuiButton)(p_148182_4_.getEnumFloat() ? new GuiOptionSlider(i, p_148182_2_, p_148182_3_, p_148182_4_) : new GuiOptionButton(i, p_148182_2_, p_148182_3_, p_148182_4_, mcIn.gameSettings.getKeyBinding(p_148182_4_)));
}
}
示例10: initGui
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
/**
* Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
* window resizes, the buttonList is cleared beforehand.
*/
public void initGui()
{
this.title = I18n.format("options.title", new Object[0]);
int i = 0;
for (GameSettings.Options gamesettings$options : SCREEN_OPTIONS)
{
if (gamesettings$options.getEnumFloat())
{
this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 - 12 + 24 * (i >> 1), gamesettings$options));
}
else
{
GuiOptionButton guioptionbutton = new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 - 12 + 24 * (i >> 1), gamesettings$options, this.settings.getKeyBinding(gamesettings$options));
this.buttonList.add(guioptionbutton);
}
++i;
}
if (this.mc.theWorld != null)
{
EnumDifficulty enumdifficulty = this.mc.theWorld.getDifficulty();
this.difficultyButton = new GuiButton(108, this.width / 2 - 155 + i % 2 * 160, this.height / 6 - 12 + 24 * (i >> 1), 150, 20, this.getDifficultyText(enumdifficulty));
this.buttonList.add(this.difficultyButton);
if (this.mc.isSingleplayer() && !this.mc.theWorld.getWorldInfo().isHardcoreModeEnabled())
{
this.difficultyButton.setWidth(this.difficultyButton.getButtonWidth() - 20);
this.lockButton = new GuiLockIconButton(109, this.difficultyButton.xPosition + this.difficultyButton.getButtonWidth(), this.difficultyButton.yPosition);
this.buttonList.add(this.lockButton);
this.lockButton.setLocked(this.mc.theWorld.getWorldInfo().isDifficultyLocked());
this.lockButton.enabled = !this.lockButton.isLocked();
this.difficultyButton.enabled = !this.lockButton.isLocked();
}
else
{
this.difficultyButton.enabled = false;
}
}
else
{
this.buttonList.add(new GuiOptionButton(GameSettings.Options.REALMS_NOTIFICATIONS.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 - 12 + 24 * (i >> 1), GameSettings.Options.REALMS_NOTIFICATIONS, this.settings.getKeyBinding(GameSettings.Options.REALMS_NOTIFICATIONS)));
}
this.buttonList.add(new GuiButton(110, this.width / 2 - 155, this.height / 6 + 48 - 6, 150, 20, I18n.format("options.skinCustomisation", new Object[0])));
this.buttonList.add(new GuiButton(106, this.width / 2 + 5, this.height / 6 + 48 - 6, 150, 20, I18n.format("options.sounds", new Object[0])));
this.buttonList.add(new GuiButton(101, this.width / 2 - 155, this.height / 6 + 72 - 6, 150, 20, I18n.format("options.video", new Object[0])));
this.buttonList.add(new GuiButton(100, this.width / 2 + 5, this.height / 6 + 72 - 6, 150, 20, I18n.format("options.controls", new Object[0])));
this.buttonList.add(new GuiButton(102, this.width / 2 - 155, this.height / 6 + 96 - 6, 150, 20, I18n.format("options.language", new Object[0])));
this.buttonList.add(new GuiButton(103, this.width / 2 + 5, this.height / 6 + 96 - 6, 150, 20, I18n.format("options.chat.title", new Object[0])));
this.buttonList.add(new GuiButton(105, this.width / 2 - 155, this.height / 6 + 120 - 6, 150, 20, I18n.format("options.resourcepack", new Object[0])));
this.buttonList.add(new GuiButton(104, this.width / 2 + 5, this.height / 6 + 120 - 6, 150, 20, I18n.format("options.snooper.view", new Object[0])));
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, I18n.format("gui.done", new Object[0])));
}
示例11: returnEnumOptions
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
public GameSettings.Options returnEnumOptions()
{
return this.enumOptions;
}
示例12: GuiOptionSliderOF
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
public GuiOptionSliderOF(int p_i47_1_, int p_i47_2_, int p_i47_3_, GameSettings.Options p_i47_4_)
{
super(p_i47_1_, p_i47_2_, p_i47_3_, p_i47_4_);
this.option = p_i47_4_;
}
示例13: initGui
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
/**
* Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
* window resizes, the buttonList is cleared beforehand.
*/
public void initGui()
{
int i = 0;
this.field_146442_a = I18n.format("options.title", new Object[0]);
for (GameSettings.Options gamesettings$options : field_146440_f)
{
if (gamesettings$options.getEnumFloat())
{
this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 - 12 + 24 * (i >> 1), gamesettings$options));
}
else
{
GuiOptionButton guioptionbutton = new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 - 12 + 24 * (i >> 1), gamesettings$options, this.game_settings_1.getKeyBinding(gamesettings$options));
this.buttonList.add(guioptionbutton);
}
++i;
}
if (this.mc.theWorld != null)
{
EnumDifficulty enumdifficulty = this.mc.theWorld.getDifficulty();
this.field_175357_i = new GuiButton(108, this.width / 2 - 155 + i % 2 * 160, this.height / 6 - 12 + 24 * (i >> 1), 150, 20, this.func_175355_a(enumdifficulty));
this.buttonList.add(this.field_175357_i);
if (this.mc.isSingleplayer() && !this.mc.theWorld.getWorldInfo().isHardcoreModeEnabled())
{
this.field_175357_i.setWidth(this.field_175357_i.getButtonWidth() - 20);
this.field_175356_r = new GuiLockIconButton(109, this.field_175357_i.xPosition + this.field_175357_i.getButtonWidth(), this.field_175357_i.yPosition);
this.buttonList.add(this.field_175356_r);
this.field_175356_r.func_175229_b(this.mc.theWorld.getWorldInfo().isDifficultyLocked());
this.field_175356_r.enabled = !this.field_175356_r.func_175230_c();
this.field_175357_i.enabled = !this.field_175356_r.func_175230_c();
}
else
{
this.field_175357_i.enabled = false;
}
}
this.buttonList.add(new GuiButton(110, this.width / 2 - 155, this.height / 6 + 48 - 6, 150, 20, I18n.format("options.skinCustomisation", new Object[0])));
this.buttonList.add(new GuiButton(8675309, this.width / 2 + 5, this.height / 6 + 48 - 6, 150, 20, "Super Secret Settings...")
{
public void playPressSound(SoundHandler soundHandlerIn)
{
SoundEventAccessorComposite soundeventaccessorcomposite = soundHandlerIn.getRandomSoundFromCategories(new SoundCategory[] {SoundCategory.ANIMALS, SoundCategory.BLOCKS, SoundCategory.MOBS, SoundCategory.PLAYERS, SoundCategory.WEATHER});
if (soundeventaccessorcomposite != null)
{
soundHandlerIn.playSound(PositionedSoundRecord.create(soundeventaccessorcomposite.getSoundEventLocation(), 0.5F));
}
}
});
this.buttonList.add(new GuiButton(106, this.width / 2 - 155, this.height / 6 + 72 - 6, 150, 20, I18n.format("options.sounds", new Object[0])));
this.buttonList.add(new GuiButton(107, this.width / 2 + 5, this.height / 6 + 72 - 6, 150, 20, I18n.format("options.stream", new Object[0])));
this.buttonList.add(new GuiButton(101, this.width / 2 - 155, this.height / 6 + 96 - 6, 150, 20, I18n.format("options.video", new Object[0])));
this.buttonList.add(new GuiButton(100, this.width / 2 + 5, this.height / 6 + 96 - 6, 150, 20, I18n.format("options.controls", new Object[0])));
this.buttonList.add(new GuiButton(102, this.width / 2 - 155, this.height / 6 + 120 - 6, 150, 20, I18n.format("options.language", new Object[0])));
this.buttonList.add(new GuiButton(103, this.width / 2 + 5, this.height / 6 + 120 - 6, 150, 20, I18n.format("options.chat.title", new Object[0])));
this.buttonList.add(new GuiButton(105, this.width / 2 - 155, this.height / 6 + 144 - 6, 150, 20, I18n.format("options.resourcepack", new Object[0])));
this.buttonList.add(new GuiButton(104, this.width / 2 + 5, this.height / 6 + 144 - 6, 150, 20, I18n.format("options.snooper.view", new Object[0])));
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, I18n.format("gui.done", new Object[0])));
}
示例14: GuiOptionSlider
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
public GuiOptionSlider(int p_i45016_1_, int p_i45016_2_, int p_i45016_3_, GameSettings.Options p_i45016_4_)
{
this(p_i45016_1_, p_i45016_2_, p_i45016_3_, p_i45016_4_, 0.0F, 1.0F);
}
示例15: GuiOptionSlider
import net.minecraft.client.settings.GameSettings; //导入方法依赖的package包/类
public GuiOptionSlider(int buttonId, int x, int y, GameSettings.Options optionIn)
{
this(buttonId, x, y, optionIn, 0.0F, 1.0F);
}