本文整理汇总了Java中net.minecraft.client.gui.GuiNewChat.func_146233_a方法的典型用法代码示例。如果您正苦于以下问题:Java GuiNewChat.func_146233_a方法的具体用法?Java GuiNewChat.func_146233_a怎么用?Java GuiNewChat.func_146233_a使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.gui.GuiNewChat
的用法示例。
在下文中一共展示了GuiNewChat.func_146233_a方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getKeyBinding
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
/**
* Gets a key binding.
*/
public String getKeyBinding(GameSettings.Options p_74297_1_)
{
String s = I18n.format(p_74297_1_.getEnumString(), new Object[0]) + ": ";
if (p_74297_1_.getEnumFloat())
{
float f1 = this.getOptionFloatValue(p_74297_1_);
float f = p_74297_1_.normalizeValue(f1);
return p_74297_1_ == GameSettings.Options.SENSITIVITY ? (f == 0.0F ? s + I18n.format("options.sensitivity.min", new Object[0]) : (f == 1.0F ? s + I18n.format("options.sensitivity.max", new Object[0]) : s + (int)(f * 200.0F) + "%")) : (p_74297_1_ == GameSettings.Options.FOV ? (f1 == 70.0F ? s + I18n.format("options.fov.min", new Object[0]) : (f1 == 110.0F ? s + I18n.format("options.fov.max", new Object[0]) : s + (int)f1)) : (p_74297_1_ == GameSettings.Options.FRAMERATE_LIMIT ? (f1 == p_74297_1_.valueMax ? s + I18n.format("options.framerateLimit.max", new Object[0]) : s + (int)f1 + " fps") : (p_74297_1_ == GameSettings.Options.GAMMA ? (f == 0.0F ? s + I18n.format("options.gamma.min", new Object[0]) : (f == 1.0F ? s + I18n.format("options.gamma.max", new Object[0]) : s + "+" + (int)(f * 100.0F) + "%")) : (p_74297_1_ == GameSettings.Options.SATURATION ? s + (int)(f * 400.0F) + "%" : (p_74297_1_ == GameSettings.Options.CHAT_OPACITY ? s + (int)(f * 90.0F + 10.0F) + "%" : (p_74297_1_ == GameSettings.Options.CHAT_HEIGHT_UNFOCUSED ? s + GuiNewChat.func_146243_b(f) + "px" : (p_74297_1_ == GameSettings.Options.CHAT_HEIGHT_FOCUSED ? s + GuiNewChat.func_146243_b(f) + "px" : (p_74297_1_ == GameSettings.Options.CHAT_WIDTH ? s + GuiNewChat.func_146233_a(f) + "px" : (p_74297_1_ == GameSettings.Options.RENDER_DISTANCE ? s + (int)f1 + " chunks" : (p_74297_1_ == GameSettings.Options.ANISOTROPIC_FILTERING ? (f1 == 1.0F ? s + I18n.format("options.off", new Object[0]) : s + (int)f1) : (p_74297_1_ == GameSettings.Options.MIPMAP_LEVELS ? (f1 == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int)f1) : (p_74297_1_ == GameSettings.Options.STREAM_FPS ? s + TwitchStream.func_152948_a(f) + " fps" : (p_74297_1_ == GameSettings.Options.STREAM_KBPS ? s + TwitchStream.func_152946_b(f) + " Kbps" : (p_74297_1_ == GameSettings.Options.STREAM_BYTES_PER_PIXEL ? s + String.format("%.3f bpp", new Object[] {Float.valueOf(TwitchStream.func_152947_c(f))}): (f == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int)(f * 100.0F) + "%")))))))))))))));
}
else if (p_74297_1_.getEnumBoolean())
{
boolean flag = this.getOptionOrdinalValue(p_74297_1_);
return flag ? s + I18n.format("options.on", new Object[0]) : s + I18n.format("options.off", new Object[0]);
}
else if (p_74297_1_ == GameSettings.Options.DIFFICULTY)
{
return s + I18n.format(this.difficulty.getDifficultyResourceKey(), new Object[0]);
}
else if (p_74297_1_ == GameSettings.Options.GUI_SCALE)
{
return s + getTranslation(GUISCALES, this.guiScale);
}
else if (p_74297_1_ == GameSettings.Options.CHAT_VISIBILITY)
{
return s + I18n.format(this.chatVisibility.getResourceKey(), new Object[0]);
}
else if (p_74297_1_ == GameSettings.Options.PARTICLES)
{
return s + getTranslation(PARTICLES, this.particleSetting);
}
else if (p_74297_1_ == GameSettings.Options.AMBIENT_OCCLUSION)
{
return s + getTranslation(AMBIENT_OCCLUSIONS, this.ambientOcclusion);
}
else if (p_74297_1_ == GameSettings.Options.STREAM_COMPRESSION)
{
return s + getTranslation(field_152391_aS, this.field_152405_O);
}
else if (p_74297_1_ == GameSettings.Options.STREAM_CHAT_ENABLED)
{
return s + getTranslation(field_152392_aT, this.field_152408_R);
}
else if (p_74297_1_ == GameSettings.Options.STREAM_CHAT_USER_FILTER)
{
return s + getTranslation(field_152393_aU, this.field_152409_S);
}
else if (p_74297_1_ == GameSettings.Options.STREAM_MIC_TOGGLE_BEHAVIOR)
{
return s + getTranslation(field_152394_aV, this.field_152410_T);
}
else if (p_74297_1_ == GameSettings.Options.GRAPHICS)
{
if (this.fancyGraphics)
{
return s + I18n.format("options.graphics.fancy", new Object[0]);
}
else
{
String s1 = "options.graphics.fast";
return s + I18n.format("options.graphics.fast", new Object[0]);
}
}
else
{
return s;
}
}
示例2: getKeyBinding
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
public String getKeyBinding(GameSettings.Options p_74297_1_)
{
String s = I18n.format(p_74297_1_.getEnumString(), new Object[0]) + ": ";
if (p_74297_1_.getEnumFloat())
{
float f1 = this.getOptionFloatValue(p_74297_1_);
float f = p_74297_1_.normalizeValue(f1);
return p_74297_1_ == GameSettings.Options.SENSITIVITY ? (f == 0.0F ? s + I18n.format("options.sensitivity.min", new Object[0]) : (f == 1.0F ? s + I18n.format("options.sensitivity.max", new Object[0]) : s + (int)(f * 200.0F) + "%")) : (p_74297_1_ == GameSettings.Options.FOV ? (f1 == 70.0F ? s + I18n.format("options.fov.min", new Object[0]) : (f1 == 110.0F ? s + I18n.format("options.fov.max", new Object[0]) : s + (int)f1)) : (p_74297_1_ == GameSettings.Options.FRAMERATE_LIMIT ? (f1 == p_74297_1_.valueMax ? s + I18n.format("options.framerateLimit.max", new Object[0]) : s + (int)f1 + " fps") : (p_74297_1_ == GameSettings.Options.GAMMA ? (f == 0.0F ? s + I18n.format("options.gamma.min", new Object[0]) : (f == 1.0F ? s + I18n.format("options.gamma.max", new Object[0]) : s + "+" + (int)(f * 100.0F) + "%")) : (p_74297_1_ == GameSettings.Options.SATURATION ? s + (int)(f * 400.0F) + "%" : (p_74297_1_ == GameSettings.Options.CHAT_OPACITY ? s + (int)(f * 90.0F + 10.0F) + "%" : (p_74297_1_ == GameSettings.Options.CHAT_HEIGHT_UNFOCUSED ? s + GuiNewChat.func_146243_b(f) + "px" : (p_74297_1_ == GameSettings.Options.CHAT_HEIGHT_FOCUSED ? s + GuiNewChat.func_146243_b(f) + "px" : (p_74297_1_ == GameSettings.Options.CHAT_WIDTH ? s + GuiNewChat.func_146233_a(f) + "px" : (p_74297_1_ == GameSettings.Options.RENDER_DISTANCE ? s + (int)f1 + " chunks" : (p_74297_1_ == GameSettings.Options.ANISOTROPIC_FILTERING ? (f1 == 1.0F ? s + I18n.format("options.off", new Object[0]) : s + (int)f1) : (p_74297_1_ == GameSettings.Options.MIPMAP_LEVELS ? (f1 == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int)f1) : (p_74297_1_ == GameSettings.Options.STREAM_FPS ? s + TwitchStream.func_152948_a(f) + " fps" : (p_74297_1_ == GameSettings.Options.STREAM_KBPS ? s + TwitchStream.func_152946_b(f) + " Kbps" : (p_74297_1_ == GameSettings.Options.STREAM_BYTES_PER_PIXEL ? s + String.format("%.3f bpp", new Object[] {Float.valueOf(TwitchStream.func_152947_c(f))}): (f == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int)(f * 100.0F) + "%")))))))))))))));
}
else if (p_74297_1_.getEnumBoolean())
{
boolean flag = this.getOptionOrdinalValue(p_74297_1_);
return flag ? s + I18n.format("options.on", new Object[0]) : s + I18n.format("options.off", new Object[0]);
}
else if (p_74297_1_ == GameSettings.Options.DIFFICULTY)
{
return s + I18n.format(this.difficulty.getDifficultyResourceKey(), new Object[0]);
}
else if (p_74297_1_ == GameSettings.Options.GUI_SCALE)
{
return s + getTranslation(GUISCALES, this.guiScale);
}
else if (p_74297_1_ == GameSettings.Options.CHAT_VISIBILITY)
{
return s + I18n.format(this.chatVisibility.getResourceKey(), new Object[0]);
}
else if (p_74297_1_ == GameSettings.Options.PARTICLES)
{
return s + getTranslation(PARTICLES, this.particleSetting);
}
else if (p_74297_1_ == GameSettings.Options.AMBIENT_OCCLUSION)
{
return s + getTranslation(AMBIENT_OCCLUSIONS, this.ambientOcclusion);
}
else if (p_74297_1_ == GameSettings.Options.STREAM_COMPRESSION)
{
return s + getTranslation(field_152391_aS, this.field_152405_O);
}
else if (p_74297_1_ == GameSettings.Options.STREAM_CHAT_ENABLED)
{
return s + getTranslation(field_152392_aT, this.field_152408_R);
}
else if (p_74297_1_ == GameSettings.Options.STREAM_CHAT_USER_FILTER)
{
return s + getTranslation(field_152393_aU, this.field_152409_S);
}
else if (p_74297_1_ == GameSettings.Options.STREAM_MIC_TOGGLE_BEHAVIOR)
{
return s + getTranslation(field_152394_aV, this.field_152410_T);
}
else if (p_74297_1_ == GameSettings.Options.GRAPHICS)
{
if (this.fancyGraphics)
{
return s + I18n.format("options.graphics.fancy", new Object[0]);
}
else
{
String s1 = "options.graphics.fast";
return s + I18n.format("options.graphics.fast", new Object[0]);
}
}
else
{
return s;
}
}