Java 类net.minecraft.client.stream.TwitchStream 实例源码

项目:DecompiledMinecraft    文件:Minecraft.java   
private void initStream()
{
    try
    {
        this.stream = new TwitchStream(this, (Property)Iterables.getFirst(this.twitchDetails.get("twitch_access_token"), null));
    }
    catch (Throwable throwable)
    {
        this.stream = new NullStream(throwable);
        logger.error("Couldn\'t initialize twitch stream");
    }
}
项目:BaseClient    文件:Minecraft.java   
private void initStream()
{
    try
    {
        this.stream = new TwitchStream(this, (Property)Iterables.getFirst(this.twitchDetails.get("twitch_access_token"), null));
    }
    catch (Throwable throwable)
    {
        this.stream = new NullStream(throwable);
        logger.error("Couldn\'t initialize twitch stream");
    }
}
项目:BaseClient    文件:Minecraft.java   
private void initStream() {
    try {
        this.stream = new TwitchStream(this,
                (Property) Iterables.getFirst(this.twitchDetails.get("twitch_access_token"), null));
    } catch (Throwable throwable) {
        this.stream = new NullStream(throwable);
        logger.error("Couldn\'t initialize twitch stream");
    }
}
项目:DecompiledMinecraft    文件:GameSettings.java   
/**
 * 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.RENDER_CLOUDS ? (f1 == p_74297_1_.valueMin ? s + I18n.format("options.cloudHeight.min", new Object[0]) : s + ((int)f1 + 128)) : (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.calculateChatboxHeight(f) + "px" : (p_74297_1_ == GameSettings.Options.CHAT_HEIGHT_FOCUSED ? s + GuiNewChat.calculateChatboxHeight(f) + "px" : (p_74297_1_ == GameSettings.Options.CHAT_WIDTH ? s + GuiNewChat.calculateChatboxWidth(f) + "px" : (p_74297_1_ == GameSettings.Options.RENDER_DISTANCE ? s + (int)f1 + " chunks" : (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.formatStreamFps(f) + " fps" : (p_74297_1_ == GameSettings.Options.STREAM_KBPS ? s + TwitchStream.formatStreamKbps(f) + " Kbps" : (p_74297_1_ == GameSettings.Options.STREAM_BYTES_PER_PIXEL ? s + String.format("%.3f bpp", new Object[] {Float.valueOf(TwitchStream.formatStreamBps(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.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(STREAM_COMPRESSIONS, this.streamCompression);
    }
    else if (p_74297_1_ == GameSettings.Options.STREAM_CHAT_ENABLED)
    {
        return s + getTranslation(STREAM_CHAT_MODES, this.streamChatEnabled);
    }
    else if (p_74297_1_ == GameSettings.Options.STREAM_CHAT_USER_FILTER)
    {
        return s + getTranslation(STREAM_CHAT_FILTER_MODES, this.streamChatUserFilter);
    }
    else if (p_74297_1_ == GameSettings.Options.STREAM_MIC_TOGGLE_BEHAVIOR)
    {
        return s + getTranslation(STREAM_MIC_MODES, this.streamMicToggleBehavior);
    }
    else if (p_74297_1_ == GameSettings.Options.RENDER_CLOUDS)
    {
        return s + getTranslation(field_181149_aW, this.clouds);
    }
    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;
    }
}
项目:BaseClient    文件:GameSettings.java   
/**
 * Gets a key binding.
 */
public String getKeyBinding(GameSettings.Options p_74297_1_)
{
    String s = this.getKeyBindingOF(p_74297_1_);

    if (s != null)
    {
        return s;
    }
    else
    {
        String s1 = 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 ? s1 + I18n.format("options.sensitivity.min", new Object[0]) : (f == 1.0F ? s1 + I18n.format("options.sensitivity.max", new Object[0]) : s1 + (int)(f * 200.0F) + "%")) : (p_74297_1_ == GameSettings.Options.FOV ? (f1 == 70.0F ? s1 + I18n.format("options.fov.min", new Object[0]) : (f1 == 110.0F ? s1 + I18n.format("options.fov.max", new Object[0]) : s1 + (int)f1)) : (p_74297_1_ == GameSettings.Options.FRAMERATE_LIMIT ? (f1 == p_74297_1_.valueMax ? s1 + I18n.format("options.framerateLimit.max", new Object[0]) : s1 + (int)f1 + " fps") : (p_74297_1_ == GameSettings.Options.RENDER_CLOUDS ? (f1 == p_74297_1_.valueMin ? s1 + I18n.format("options.cloudHeight.min", new Object[0]) : s1 + ((int)f1 + 128)) : (p_74297_1_ == GameSettings.Options.GAMMA ? (f == 0.0F ? s1 + I18n.format("options.gamma.min", new Object[0]) : (f == 1.0F ? s1 + I18n.format("options.gamma.max", new Object[0]) : s1 + "+" + (int)(f * 100.0F) + "%")) : (p_74297_1_ == GameSettings.Options.SATURATION ? s1 + (int)(f * 400.0F) + "%" : (p_74297_1_ == GameSettings.Options.CHAT_OPACITY ? s1 + (int)(f * 90.0F + 10.0F) + "%" : (p_74297_1_ == GameSettings.Options.CHAT_HEIGHT_UNFOCUSED ? s1 + GuiNewChat.calculateChatboxHeight(f) + "px" : (p_74297_1_ == GameSettings.Options.CHAT_HEIGHT_FOCUSED ? s1 + GuiNewChat.calculateChatboxHeight(f) + "px" : (p_74297_1_ == GameSettings.Options.CHAT_WIDTH ? s1 + GuiNewChat.calculateChatboxWidth(f) + "px" : (p_74297_1_ == GameSettings.Options.RENDER_DISTANCE ? s1 + (int)f1 + " chunks" : (p_74297_1_ == GameSettings.Options.MIPMAP_LEVELS ? (f1 == 0.0F ? s1 + I18n.format("options.off", new Object[0]) : s1 + (int)f1) : (p_74297_1_ == GameSettings.Options.STREAM_FPS ? s1 + TwitchStream.formatStreamFps(f) + " fps" : (p_74297_1_ == GameSettings.Options.STREAM_KBPS ? s1 + TwitchStream.formatStreamKbps(f) + " Kbps" : (p_74297_1_ == GameSettings.Options.STREAM_BYTES_PER_PIXEL ? s1 + String.format("%.3f bpp", new Object[] {Float.valueOf(TwitchStream.formatStreamBps(f))}): (f == 0.0F ? s1 + I18n.format("options.off", new Object[0]) : s1 + (int)(f * 100.0F) + "%")))))))))))))));
        }
        else if (p_74297_1_.getEnumBoolean())
        {
            boolean flag = this.getOptionOrdinalValue(p_74297_1_);
            return flag ? s1 + I18n.format("options.on", new Object[0]) : s1 + I18n.format("options.off", new Object[0]);
        }
        else if (p_74297_1_ == GameSettings.Options.GUI_SCALE)
        {
            return s1 + getTranslation(GUISCALES, this.guiScale);
        }
        else if (p_74297_1_ == GameSettings.Options.CHAT_VISIBILITY)
        {
            return s1 + I18n.format(this.chatVisibility.getResourceKey(), new Object[0]);
        }
        else if (p_74297_1_ == GameSettings.Options.PARTICLES)
        {
            return s1 + getTranslation(PARTICLES, this.particleSetting);
        }
        else if (p_74297_1_ == GameSettings.Options.AMBIENT_OCCLUSION)
        {
            return s1 + getTranslation(AMBIENT_OCCLUSIONS, this.ambientOcclusion);
        }
        else if (p_74297_1_ == GameSettings.Options.STREAM_COMPRESSION)
        {
            return s1 + getTranslation(STREAM_COMPRESSIONS, this.streamCompression);
        }
        else if (p_74297_1_ == GameSettings.Options.STREAM_CHAT_ENABLED)
        {
            return s1 + getTranslation(STREAM_CHAT_MODES, this.streamChatEnabled);
        }
        else if (p_74297_1_ == GameSettings.Options.STREAM_CHAT_USER_FILTER)
        {
            return s1 + getTranslation(STREAM_CHAT_FILTER_MODES, this.streamChatUserFilter);
        }
        else if (p_74297_1_ == GameSettings.Options.STREAM_MIC_TOGGLE_BEHAVIOR)
        {
            return s1 + getTranslation(STREAM_MIC_MODES, this.streamMicToggleBehavior);
        }
        else if (p_74297_1_ == GameSettings.Options.RENDER_CLOUDS)
        {
            return s1 + getTranslation(field_181149_aW, this.clouds);
        }
        else if (p_74297_1_ == GameSettings.Options.GRAPHICS)
        {
            if (this.fancyGraphics)
            {
                return s1 + I18n.format("options.graphics.fancy", new Object[0]);
            }
            else
            {
                String s2 = "options.graphics.fast";
                return s1 + I18n.format("options.graphics.fast", new Object[0]);
            }
        }
        else
        {
            return s1;
        }
    }
}
项目:BaseClient    文件:GameSettings.java   
/**
 * Gets a key binding.
 */
public String getKeyBinding(GameSettings.Options p_74297_1_)
{
    String s = this.getKeyBindingOF(p_74297_1_);

    if (s != null)
    {
        return s;
    }
    else
    {
        String s1 = 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 ? s1 + I18n.format("options.sensitivity.min", new Object[0]) : (f == 1.0F ? s1 + I18n.format("options.sensitivity.max", new Object[0]) : s1 + (int)(f * 200.0F) + "%")) : (p_74297_1_ == GameSettings.Options.FOV ? (f1 == 70.0F ? s1 + I18n.format("options.fov.min", new Object[0]) : (f1 == 110.0F ? s1 + I18n.format("options.fov.max", new Object[0]) : s1 + (int)f1)) : (p_74297_1_ == GameSettings.Options.FRAMERATE_LIMIT ? (f1 == p_74297_1_.valueMax ? s1 + I18n.format("options.framerateLimit.max", new Object[0]) : s1 + (int)f1 + " fps") : (p_74297_1_ == GameSettings.Options.RENDER_CLOUDS ? (f1 == p_74297_1_.valueMin ? s1 + I18n.format("options.cloudHeight.min", new Object[0]) : s1 + ((int)f1 + 128)) : (p_74297_1_ == GameSettings.Options.GAMMA ? (f == 0.0F ? s1 + I18n.format("options.gamma.min", new Object[0]) : (f == 1.0F ? s1 + I18n.format("options.gamma.max", new Object[0]) : s1 + "+" + (int)(f * 100.0F) + "%")) : (p_74297_1_ == GameSettings.Options.SATURATION ? s1 + (int)(f * 400.0F) + "%" : (p_74297_1_ == GameSettings.Options.CHAT_OPACITY ? s1 + (int)(f * 90.0F + 10.0F) + "%" : (p_74297_1_ == GameSettings.Options.CHAT_HEIGHT_UNFOCUSED ? s1 + GuiNewChat.calculateChatboxHeight(f) + "px" : (p_74297_1_ == GameSettings.Options.CHAT_HEIGHT_FOCUSED ? s1 + GuiNewChat.calculateChatboxHeight(f) + "px" : (p_74297_1_ == GameSettings.Options.CHAT_WIDTH ? s1 + GuiNewChat.calculateChatboxWidth(f) + "px" : (p_74297_1_ == GameSettings.Options.RENDER_DISTANCE ? s1 + (int)f1 + " chunks" : (p_74297_1_ == GameSettings.Options.MIPMAP_LEVELS ? (f1 == 0.0F ? s1 + I18n.format("options.off", new Object[0]) : s1 + (int)f1) : (p_74297_1_ == GameSettings.Options.STREAM_FPS ? s1 + TwitchStream.formatStreamFps(f) + " fps" : (p_74297_1_ == GameSettings.Options.STREAM_KBPS ? s1 + TwitchStream.formatStreamKbps(f) + " Kbps" : (p_74297_1_ == GameSettings.Options.STREAM_BYTES_PER_PIXEL ? s1 + String.format("%.3f bpp", new Object[] {Float.valueOf(TwitchStream.formatStreamBps(f))}): (f == 0.0F ? s1 + I18n.format("options.off", new Object[0]) : s1 + (int)(f * 100.0F) + "%")))))))))))))));
        }
        else if (p_74297_1_.getEnumBoolean())
        {
            boolean flag = this.getOptionOrdinalValue(p_74297_1_);
            return flag ? s1 + I18n.format("options.on", new Object[0]) : s1 + I18n.format("options.off", new Object[0]);
        }
        else if (p_74297_1_ == GameSettings.Options.GUI_SCALE)
        {
            return s1 + getTranslation(GUISCALES, this.guiScale);
        }
        else if (p_74297_1_ == GameSettings.Options.CHAT_VISIBILITY)
        {
            return s1 + I18n.format(this.chatVisibility.getResourceKey(), new Object[0]);
        }
        else if (p_74297_1_ == GameSettings.Options.PARTICLES)
        {
            return s1 + getTranslation(PARTICLES, this.particleSetting);
        }
        else if (p_74297_1_ == GameSettings.Options.AMBIENT_OCCLUSION)
        {
            return s1 + getTranslation(AMBIENT_OCCLUSIONS, this.ambientOcclusion);
        }
        else if (p_74297_1_ == GameSettings.Options.STREAM_COMPRESSION)
        {
            return s1 + getTranslation(STREAM_COMPRESSIONS, this.streamCompression);
        }
        else if (p_74297_1_ == GameSettings.Options.STREAM_CHAT_ENABLED)
        {
            return s1 + getTranslation(STREAM_CHAT_MODES, this.streamChatEnabled);
        }
        else if (p_74297_1_ == GameSettings.Options.STREAM_CHAT_USER_FILTER)
        {
            return s1 + getTranslation(STREAM_CHAT_FILTER_MODES, this.streamChatUserFilter);
        }
        else if (p_74297_1_ == GameSettings.Options.STREAM_MIC_TOGGLE_BEHAVIOR)
        {
            return s1 + getTranslation(STREAM_MIC_MODES, this.streamMicToggleBehavior);
        }
        else if (p_74297_1_ == GameSettings.Options.RENDER_CLOUDS)
        {
            return s1 + getTranslation(field_181149_aW, this.clouds);
        }
        else if (p_74297_1_ == GameSettings.Options.GRAPHICS)
        {
            if (this.fancyGraphics)
            {
                return s1 + I18n.format("options.graphics.fancy", new Object[0]);
            }
            else
            {
                String s2 = "options.graphics.fast";
                return s1 + I18n.format("options.graphics.fast", new Object[0]);
            }
        }
        else
        {
            return s1;
        }
    }
}
项目:PopularMMOS-EpicProportions-Mod    文件:GameSettings.java   
/**
 * 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;
    }
}
项目:Cauldron    文件:GameSettings.java   
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;
    }
}
项目:Cauldron    文件:GameSettings.java   
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;
    }
}