Java 类net.minecraft.client.gui.GuiNewChat 实例源码

项目:EnchantmentRevealer    文件:EnchantmentWorker.java   
private synchronized void dumpError(String tag) {
    state = new State(TextFormatting.RED
            + I18n.format("enchantmentrevealer.error.mainmessage"), NO_STRINGS, NO_INTS,
            observations.get(observations.size() - 1));
    GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    chat.printChatMessage(new TextComponentTranslation("enchantmentrevealer.error.part1",
            new TextComponentTranslation("enchantmentrevealer.error." + tag), "d0sboots",
            "gmai", "l.com").setStyle(new Style().setColor(TextFormatting.RED)
            .setBold(true)));
    chat.printChatMessage(new TextComponentTranslation("enchantmentrevealer.error.part2")
            .setStyle(new Style().setColor(TextFormatting.YELLOW)));
    for (Observation observation : observations) {
        chat.printChatMessage(new TextComponentString(observation.toString())
                .setStyle(new Style().setColor(TextFormatting.YELLOW)));
    }
    observations.clear();
    candidatesLength = 0;
    thread = null;
    shrink();
}
项目:Providence    文件:CommandManager.java   
@SuppressWarnings("unchecked")
@Command({"clear", "cc"})
public void clearChat() {
    GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    List<ChatLine> tempList = new ArrayList<>();
    for (ChatLine c : (ArrayList<ChatLine>) mc.ingameGUI.persistantChatGUI.field_146253_i) {
        if (c.getChatComponent().getFormattedText().contains(Client.NAME)) {
            tempList.add(c);
        }
        for (Method m : getMap().keySet()) {
            Command command = m.getAnnotation(Command.class);
            if (c.getChatComponent().getFormattedText().contains(command.value()[0]) && (c.getChatComponent().getFormattedText().contains("]") || c.getChatComponent().getFormattedText().contains("]") || c.getChatComponent().getFormattedText().contains(","))) {
                tempList.add(c);
            }
        }

    }
    mc.ingameGUI.persistantChatGUI.field_146253_i.removeAll(tempList);
}
项目:ProgressiveDifficulty    文件:ChatUtil.java   
private static void sendNoSpamMessages(ITextComponent[] messages)
{
    GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    for (int i = DELETION_ID + messages.length - 1; i <= lastAdded; i++)
    {
        chat.deleteChatLine(i);
    }
    for (int i = 0; i < messages.length; i++)
    {
        chat.printChatMessageWithOptionalDeletion(messages[i], DELETION_ID + i);
    }
    lastAdded = DELETION_ID + messages.length - 1;
}
项目:ExtraUtilities    文件:PacketTempChatMultiline.java   
private static synchronized void addChat(final IChatComponent[] chat) {
    final GuiNewChat chatGUI = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    for (int i = 0; i < chat.length; ++i) {
        final IChatComponent iChatComponent = chat[i];
        chatGUI.printChatMessageWithOptionalDeletion(iChatComponent, 983423323 + i);
    }
    for (int i = chat.length; i < PacketTempChatMultiline.lastNum; ++i) {
        chatGUI.deleteChatLine(983423323 + i);
    }
    PacketTempChatMultiline.lastNum = Math.max(PacketTempChatMultiline.lastNum, chat.length);
}
项目:CrystalMod    文件:ChatUtil.java   
private static void sendNoSpamMessages(ITextComponent[] messages)
{
    GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    for (int i = DELETION_ID + messages.length - 1; i <= lastAdded; i++)
    {
        chat.deleteChatLine(i);
    }
    for (int i = 0; i < messages.length; i++)
    {
        chat.printChatMessageWithOptionalDeletion(messages[i], DELETION_ID + i);
    }
    lastAdded = DELETION_ID + messages.length - 1;
}
项目:SignPicture    文件:CustomChatRender.java   
@CoreInvoke
public static int hookDrawStringWithShadow(final @Nonnull FontRenderer font, final @Nonnull String str, final int x, final int y, final int color, final @Nonnull GuiNewChat chat, final @Nonnull ChatLine chatline, final int j2, final int opacity) {
    if (chatline instanceof PicChatLine) {
        final PicChatLine cline = (PicChatLine) chatline;
        OpenGL.glPushMatrix();
        OpenGL.glTranslatef(0f, j2, 0f);
        OpenGL.glColor4i(255, 255, 255, opacity);
        cline.draw(chat, font.FONT_HEIGHT);
        OpenGL.glPopMatrix();
        WRenderer.startTexture();
    } else
        // this.mc.fontRenderer.drawStringWithShadow(s, b0, j2-8, 16777215+(i2<<24));
        font.drawStringWithShadow(str, x, y, color);
    return 0;
}
项目:Toms-Mod    文件:TomsModUtils.java   
@SideOnly(Side.CLIENT)
private static void sendNoSpamMessages(ITextComponent[] messages) {
    GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    for (int i = DELETION_ID + messages.length - 1;i <= lastAdded;i++) {
        chat.deleteChatLine(i);
    }
    for (int i = 0;i < messages.length;i++) {
        chat.printChatMessageWithOptionalDeletion(messages[i], DELETION_ID + i);
    }
    lastAdded = DELETION_ID + messages.length - 1;
}
项目:EnderCore    文件:ChatUtil.java   
private static void sendNoSpamMessages(IChatComponent[] messages) {
  GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
  for (int i = DELETION_ID + messages.length - 1; i <= lastAdded; i++) {
    chat.deleteChatLine(i);
  }
  for (int i = 0; i < messages.length; i++) {
    chat.printChatMessageWithOptionalDeletion(messages[i], DELETION_ID + i);
  }
  lastAdded = DELETION_ID + messages.length - 1;
}
项目:Progression    文件:ChatHelper.java   
private static void displayChatMessages(ITextComponent[] messages) {
    GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    for (int i = DELETION_ID + messages.length - 1; i <= lastAdded; i++) {
        chat.deleteChatLine(i);
    }

    for (int i = 0; i < messages.length; i++) {
        chat.printChatMessageWithOptionalDeletion(messages[i], DELETION_ID + i);
    }

    lastAdded = DELETION_ID + messages.length - 1;
}
项目:minema    文件:ChatUtils.java   
public static void print(String msg, TextFormatting format, Object... args) {
    if (MC.ingameGUI == null) {
        return;
    }

    GuiNewChat chat = MC.ingameGUI.getChatGUI();
    TextComponentTranslation ret = new TextComponentTranslation(msg, args);
    ret.getStyle().setColor(format);

    chat.printChatMessage(ret);
}
项目:Runes-of-Wizardry    文件:ChatUtils.java   
private static void sendNoSpamMessages(ITextComponent[] messages)
{
    GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    for (int i = DELETION_ID + messages.length - 1; i <= lastAdded; i++)
    {
        chat.deleteChatLine(i);
    }
    for (int i = 0; i < messages.length; i++)
    {
        chat.printChatMessageWithOptionalDeletion(messages[i], DELETION_ID + i);
    }
    lastAdded = DELETION_ID + messages.length - 1;
}
项目:mineshot    文件:ChatUtils.java   
public static void print(String msg, TextFormatting format, Object... args) {
    if (MC.ingameGUI == null) {
        return;
    }

    GuiNewChat chat = MC.ingameGUI.getChatGUI();
    TextComponentTranslation ret = new TextComponentTranslation(msg, args);
    ret.getStyle().setColor(format);

    chat.printChatMessage(ret);
}
项目:RuneCraftery    文件:GameSettings.java   
public String func_74297_c(EnumOptions p_74297_1_) {
   String var2 = I18n.func_135053_a(p_74297_1_.func_74378_d()) + ": ";
   if(p_74297_1_.func_74380_a()) {
      float var5 = this.func_74296_a(p_74297_1_);
      return p_74297_1_ == EnumOptions.SENSITIVITY?(var5 == 0.0F?var2 + I18n.func_135053_a("options.sensitivity.min"):(var5 == 1.0F?var2 + I18n.func_135053_a("options.sensitivity.max"):var2 + (int)(var5 * 200.0F) + "%")):(p_74297_1_ == EnumOptions.FOV?(var5 == 0.0F?var2 + I18n.func_135053_a("options.fov.min"):(var5 == 1.0F?var2 + I18n.func_135053_a("options.fov.max"):var2 + (int)(70.0F + var5 * 40.0F))):(p_74297_1_ == EnumOptions.GAMMA?(var5 == 0.0F?var2 + I18n.func_135053_a("options.gamma.min"):(var5 == 1.0F?var2 + I18n.func_135053_a("options.gamma.max"):var2 + "+" + (int)(var5 * 100.0F) + "%")):(p_74297_1_ == EnumOptions.CHAT_OPACITY?var2 + (int)(var5 * 90.0F + 10.0F) + "%":(p_74297_1_ == EnumOptions.CHAT_HEIGHT_UNFOCUSED?var2 + GuiNewChat.func_96130_b(var5) + "px":(p_74297_1_ == EnumOptions.CHAT_HEIGHT_FOCUSED?var2 + GuiNewChat.func_96130_b(var5) + "px":(p_74297_1_ == EnumOptions.CHAT_WIDTH?var2 + GuiNewChat.func_96128_a(var5) + "px":(var5 == 0.0F?var2 + I18n.func_135053_a("options.off"):var2 + (int)(var5 * 100.0F) + "%")))))));
   } else if(p_74297_1_.func_74382_b()) {
      boolean var4 = this.func_74308_b(p_74297_1_);
      return var4?var2 + I18n.func_135053_a("options.on"):var2 + I18n.func_135053_a("options.off");
   } else if(p_74297_1_ == EnumOptions.RENDER_DISTANCE) {
      return var2 + func_74299_a(field_74360_ac, this.field_74339_e);
   } else if(p_74297_1_ == EnumOptions.DIFFICULTY) {
      return var2 + func_74299_a(field_74361_ad, this.field_74318_M);
   } else if(p_74297_1_ == EnumOptions.GUI_SCALE) {
      return var2 + func_74299_a(field_74367_ae, this.field_74335_Z);
   } else if(p_74297_1_ == EnumOptions.CHAT_VISIBILITY) {
      return var2 + func_74299_a(field_74369_af, this.field_74343_n);
   } else if(p_74297_1_ == EnumOptions.PARTICLES) {
      return var2 + func_74299_a(field_74364_ag, this.field_74362_aa);
   } else if(p_74297_1_ == EnumOptions.FRAMERATE_LIMIT) {
      return var2 + func_74299_a(field_74365_ah, this.field_74350_i);
   } else if(p_74297_1_ == EnumOptions.AMBIENT_OCCLUSION) {
      return var2 + func_74299_a(field_98303_au, this.field_74348_k);
   } else if(p_74297_1_ == EnumOptions.GRAPHICS) {
      if(this.field_74347_j) {
         return var2 + I18n.func_135053_a("options.graphics.fancy");
      } else {
         String var3 = "options.graphics.fast";
         return var2 + I18n.func_135053_a("options.graphics.fast");
      }
   } else {
      return var2;
   }
}
项目: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;
        }
    }
}
项目:Backmemed    文件:GameSettings.java   
/**
 * Gets a key binding.
 */
public String getKeyBinding(GameSettings.Options settingOption)
{
    String s = this.getKeyBindingOF(settingOption);

    if (s != null)
    {
        return s;
    }
    else
    {
        String s1 = I18n.format(settingOption.getEnumString(), new Object[0]) + ": ";

        if (settingOption.getEnumFloat())
        {
            float f1 = this.getOptionFloatValue(settingOption);
            float f = settingOption.normalizeValue(f1);
            return settingOption == 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) + "%")) : (settingOption == 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)) : (settingOption == GameSettings.Options.FRAMERATE_LIMIT ? (f1 == settingOption.valueMax ? s1 + I18n.format("options.framerateLimit.max", new Object[0]) : s1 + I18n.format("options.framerate", new Object[] {Integer.valueOf((int)f1)})): (settingOption == GameSettings.Options.RENDER_CLOUDS ? (f1 == settingOption.valueMin ? s1 + I18n.format("options.cloudHeight.min", new Object[0]) : s1 + ((int)f1 + 128)) : (settingOption == 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) + "%")) : (settingOption == GameSettings.Options.SATURATION ? s1 + (int)(f * 400.0F) + "%" : (settingOption == GameSettings.Options.CHAT_OPACITY ? s1 + (int)(f * 90.0F + 10.0F) + "%" : (settingOption == GameSettings.Options.CHAT_HEIGHT_UNFOCUSED ? s1 + GuiNewChat.calculateChatboxHeight(f) + "px" : (settingOption == GameSettings.Options.CHAT_HEIGHT_FOCUSED ? s1 + GuiNewChat.calculateChatboxHeight(f) + "px" : (settingOption == GameSettings.Options.CHAT_WIDTH ? s1 + GuiNewChat.calculateChatboxWidth(f) + "px" : (settingOption == GameSettings.Options.RENDER_DISTANCE ? s1 + I18n.format("options.chunks", new Object[] {Integer.valueOf((int)f1)}): (settingOption == GameSettings.Options.MIPMAP_LEVELS ? (f1 == 0.0F ? s1 + I18n.format("options.off", new Object[0]) : s1 + (int)f1) : (f == 0.0F ? s1 + I18n.format("options.off", new Object[0]) : s1 + (int)(f * 100.0F) + "%"))))))))))));
        }
        else if (settingOption.getEnumBoolean())
        {
            boolean flag = this.getOptionOrdinalValue(settingOption);
            return flag ? s1 + I18n.format("options.on", new Object[0]) : s1 + I18n.format("options.off", new Object[0]);
        }
        else if (settingOption == GameSettings.Options.MAIN_HAND)
        {
            return s1 + this.mainHand;
        }
        else if (settingOption == GameSettings.Options.GUI_SCALE)
        {
            return this.guiScale >= GUISCALES.length ? s1 + this.guiScale + "x" : s1 + getTranslation(GUISCALES, this.guiScale);
        }
        else if (settingOption == GameSettings.Options.CHAT_VISIBILITY)
        {
            return s1 + I18n.format(this.chatVisibility.getResourceKey(), new Object[0]);
        }
        else if (settingOption == GameSettings.Options.PARTICLES)
        {
            return s1 + getTranslation(PARTICLES, this.particleSetting);
        }
        else if (settingOption == GameSettings.Options.AMBIENT_OCCLUSION)
        {
            return s1 + getTranslation(AMBIENT_OCCLUSIONS, this.ambientOcclusion);
        }
        else if (settingOption == GameSettings.Options.RENDER_CLOUDS)
        {
            return s1 + getTranslation(CLOUDS_TYPES, this.clouds);
        }
        else if (settingOption == 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 settingOption == GameSettings.Options.ATTACK_INDICATOR ? s1 + getTranslation(ATTACK_INDICATORS, this.attackIndicator) : s1;
        }
    }
}
项目:CustomWorldGen    文件:GameSettings.java   
/**
 * Gets a key binding.
 */
public String getKeyBinding(GameSettings.Options settingOption)
{
    String s = I18n.format(settingOption.getEnumString(), new Object[0]) + ": ";

    if (settingOption.getEnumFloat())
    {
        float f1 = this.getOptionFloatValue(settingOption);
        float f = settingOption.normalizeValue(f1);
        return settingOption == 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) + "%")) : (settingOption == 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)) : (settingOption == GameSettings.Options.FRAMERATE_LIMIT ? (f1 == settingOption.valueMax ? s + I18n.format("options.framerateLimit.max", new Object[0]) : s + (int)f1 + " fps") : (settingOption == GameSettings.Options.RENDER_CLOUDS ? (f1 == settingOption.valueMin ? s + I18n.format("options.cloudHeight.min", new Object[0]) : s + ((int)f1 + 128)) : (settingOption == 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) + "%")) : (settingOption == GameSettings.Options.SATURATION ? s + (int)(f * 400.0F) + "%" : (settingOption == GameSettings.Options.CHAT_OPACITY ? s + (int)(f * 90.0F + 10.0F) + "%" : (settingOption == GameSettings.Options.CHAT_HEIGHT_UNFOCUSED ? s + GuiNewChat.calculateChatboxHeight(f) + "px" : (settingOption == GameSettings.Options.CHAT_HEIGHT_FOCUSED ? s + GuiNewChat.calculateChatboxHeight(f) + "px" : (settingOption == GameSettings.Options.CHAT_WIDTH ? s + GuiNewChat.calculateChatboxWidth(f) + "px" : (settingOption == GameSettings.Options.RENDER_DISTANCE ? s + (int)f1 + " chunks" : (settingOption == GameSettings.Options.MIPMAP_LEVELS ? (f1 == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int)f1) : (f == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int)(f * 100.0F) + "%"))))))))))));
    }
    else if (settingOption.getEnumBoolean())
    {
        boolean flag = this.getOptionOrdinalValue(settingOption);
        return flag ? s + I18n.format("options.on", new Object[0]) : s + I18n.format("options.off", new Object[0]);
    }
    else if (settingOption == GameSettings.Options.MAIN_HAND)
    {
        return s + this.mainHand;
    }
    else if (settingOption == GameSettings.Options.GUI_SCALE)
    {
        return s + getTranslation(GUISCALES, this.guiScale);
    }
    else if (settingOption == GameSettings.Options.CHAT_VISIBILITY)
    {
        return s + I18n.format(this.chatVisibility.getResourceKey(), new Object[0]);
    }
    else if (settingOption == GameSettings.Options.PARTICLES)
    {
        return s + getTranslation(PARTICLES, this.particleSetting);
    }
    else if (settingOption == GameSettings.Options.AMBIENT_OCCLUSION)
    {
        return s + getTranslation(AMBIENT_OCCLUSIONS, this.ambientOcclusion);
    }
    else if (settingOption == GameSettings.Options.RENDER_CLOUDS)
    {
        return s + getTranslation(CLOUDS_TYPES, this.clouds);
    }
    else if (settingOption == 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 settingOption == GameSettings.Options.ATTACK_INDICATOR ? s + getTranslation(ATTACK_INDICATORS, this.attackIndicator) : s;
    }
}
项目:SignPicture    文件:CustomChatRender.java   
private static int getChatWidth(final @Nonnull GuiNewChat chat) {
    return MathHelper.floor_float(chat.func_146228_f()/chat.func_146244_h());
}
项目: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;
    }
}
项目:TeslaCoils    文件:TileEntityTeslaCoil.java   
@SideOnly(Side.CLIENT)
private static void sendSpamlessMessage (int messageID, ITextComponent message)
{        
    final GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    chat.printChatMessageWithOptionalDeletion(message, messageID);
}
项目:TeslaCoils    文件:TileEntityTeslarract.java   
@SideOnly(Side.CLIENT)
private static void sendSpamlessMessage(int messageID, ITextComponent message)
{
    final GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    chat.printChatMessageWithOptionalDeletion(message, messageID);
}
项目:TeslaCoils    文件:TileEntityRelayCoil.java   
@SideOnly(Side.CLIENT)
private static void sendSpamlessMessage(int messageID, ITextComponent message)
{
    final GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    chat.printChatMessageWithOptionalDeletion(message, messageID);
}
项目:TeslaCoils    文件:ItemTuningTool.java   
@SideOnly(Side.CLIENT)
private static void sendSpamlessMessage(int messageID, ITextComponent message)
{        
    final GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    chat.printChatMessageWithOptionalDeletion(message, messageID);
}
项目:Bagginses    文件:ChatUtils.java   
public static void sendNoSpamMessages(int messageID, ITextComponent message)
{
    int deleteID = DELETION_ID+messageID;
    GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    chat.printChatMessageWithOptionalDeletion(message, deleteID);
}
项目:ExpandedRailsMod    文件:GameSettings.java   
/**
 * Gets a key binding.
 */
public String getKeyBinding(GameSettings.Options settingOption)
{
    String s = I18n.format(settingOption.getEnumString(), new Object[0]) + ": ";

    if (settingOption.getEnumFloat())
    {
        float f1 = this.getOptionFloatValue(settingOption);
        float f = settingOption.normalizeValue(f1);
        return settingOption == 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) + "%")) : (settingOption == 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)) : (settingOption == GameSettings.Options.FRAMERATE_LIMIT ? (f1 == settingOption.valueMax ? s + I18n.format("options.framerateLimit.max", new Object[0]) : s + (int)f1 + " fps") : (settingOption == GameSettings.Options.RENDER_CLOUDS ? (f1 == settingOption.valueMin ? s + I18n.format("options.cloudHeight.min", new Object[0]) : s + ((int)f1 + 128)) : (settingOption == 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) + "%")) : (settingOption == GameSettings.Options.SATURATION ? s + (int)(f * 400.0F) + "%" : (settingOption == GameSettings.Options.CHAT_OPACITY ? s + (int)(f * 90.0F + 10.0F) + "%" : (settingOption == GameSettings.Options.CHAT_HEIGHT_UNFOCUSED ? s + GuiNewChat.calculateChatboxHeight(f) + "px" : (settingOption == GameSettings.Options.CHAT_HEIGHT_FOCUSED ? s + GuiNewChat.calculateChatboxHeight(f) + "px" : (settingOption == GameSettings.Options.CHAT_WIDTH ? s + GuiNewChat.calculateChatboxWidth(f) + "px" : (settingOption == GameSettings.Options.RENDER_DISTANCE ? s + (int)f1 + " chunks" : (settingOption == GameSettings.Options.MIPMAP_LEVELS ? (f1 == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int)f1) : (f == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int)(f * 100.0F) + "%"))))))))))));
    }
    else if (settingOption.getEnumBoolean())
    {
        boolean flag = this.getOptionOrdinalValue(settingOption);
        return flag ? s + I18n.format("options.on", new Object[0]) : s + I18n.format("options.off", new Object[0]);
    }
    else if (settingOption == GameSettings.Options.MAIN_HAND)
    {
        return s + this.mainHand;
    }
    else if (settingOption == GameSettings.Options.GUI_SCALE)
    {
        return s + getTranslation(GUISCALES, this.guiScale);
    }
    else if (settingOption == GameSettings.Options.CHAT_VISIBILITY)
    {
        return s + I18n.format(this.chatVisibility.getResourceKey(), new Object[0]);
    }
    else if (settingOption == GameSettings.Options.PARTICLES)
    {
        return s + getTranslation(PARTICLES, this.particleSetting);
    }
    else if (settingOption == GameSettings.Options.AMBIENT_OCCLUSION)
    {
        return s + getTranslation(AMBIENT_OCCLUSIONS, this.ambientOcclusion);
    }
    else if (settingOption == GameSettings.Options.RENDER_CLOUDS)
    {
        return s + getTranslation(CLOUDS_TYPES, this.clouds);
    }
    else if (settingOption == 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 settingOption == GameSettings.Options.ATTACK_INDICATOR ? s + getTranslation(ATTACK_INDICATORS, this.attackIndicator) : 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;
    }
}
项目:RuneCraftery    文件:GuiIngame.java   
public GuiIngame(Minecraft p_i1036_1_) {
   this.field_73839_d = p_i1036_1_;
   this.field_73840_e = new GuiNewChat(p_i1036_1_);
}
项目:RuneCraftery    文件:GuiIngame.java   
public GuiNewChat func_73827_b() {
   return this.field_73840_e;
}
项目:RuneCraftery    文件:GameSettings.java   
/**
 * Gets a key binding.
 */
public String getKeyBinding(EnumOptions par1EnumOptions)
{
    String s = I18n.getString(par1EnumOptions.getEnumString()) + ": ";

    if (par1EnumOptions.getEnumFloat())
    {
        float f = this.getOptionFloatValue(par1EnumOptions);
        return par1EnumOptions == EnumOptions.SENSITIVITY ? (f == 0.0F ? s + I18n.getString("options.sensitivity.min") : (f == 1.0F ? s + I18n.getString("options.sensitivity.max") : s + (int)(f * 200.0F) + "%")) : (par1EnumOptions == EnumOptions.FOV ? (f == 0.0F ? s + I18n.getString("options.fov.min") : (f == 1.0F ? s + I18n.getString("options.fov.max") : s + (int)(70.0F + f * 40.0F))) : (par1EnumOptions == EnumOptions.GAMMA ? (f == 0.0F ? s + I18n.getString("options.gamma.min") : (f == 1.0F ? s + I18n.getString("options.gamma.max") : s + "+" + (int)(f * 100.0F) + "%")) : (par1EnumOptions == EnumOptions.CHAT_OPACITY ? s + (int)(f * 90.0F + 10.0F) + "%" : (par1EnumOptions == EnumOptions.CHAT_HEIGHT_UNFOCUSED ? s + GuiNewChat.func_96130_b(f) + "px" : (par1EnumOptions == EnumOptions.CHAT_HEIGHT_FOCUSED ? s + GuiNewChat.func_96130_b(f) + "px" : (par1EnumOptions == EnumOptions.CHAT_WIDTH ? s + GuiNewChat.func_96128_a(f) + "px" : (f == 0.0F ? s + I18n.getString("options.off") : s + (int)(f * 100.0F) + "%")))))));
    }
    else if (par1EnumOptions.getEnumBoolean())
    {
        boolean flag = this.getOptionOrdinalValue(par1EnumOptions);
        return flag ? s + I18n.getString("options.on") : s + I18n.getString("options.off");
    }
    else if (par1EnumOptions == EnumOptions.RENDER_DISTANCE)
    {
        return s + getTranslation(RENDER_DISTANCES, this.renderDistance);
    }
    else if (par1EnumOptions == EnumOptions.DIFFICULTY)
    {
        return s + getTranslation(DIFFICULTIES, this.difficulty);
    }
    else if (par1EnumOptions == EnumOptions.GUI_SCALE)
    {
        return s + getTranslation(GUISCALES, this.guiScale);
    }
    else if (par1EnumOptions == EnumOptions.CHAT_VISIBILITY)
    {
        return s + getTranslation(CHAT_VISIBILITIES, this.chatVisibility);
    }
    else if (par1EnumOptions == EnumOptions.PARTICLES)
    {
        return s + getTranslation(PARTICLES, this.particleSetting);
    }
    else if (par1EnumOptions == EnumOptions.FRAMERATE_LIMIT)
    {
        return s + getTranslation(LIMIT_FRAMERATES, this.limitFramerate);
    }
    else if (par1EnumOptions == EnumOptions.AMBIENT_OCCLUSION)
    {
        return s + getTranslation(AMBIENT_OCCLUSIONS, this.ambientOcclusion);
    }
    else if (par1EnumOptions == EnumOptions.GRAPHICS)
    {
        if (this.fancyGraphics)
        {
            return s + I18n.getString("options.graphics.fancy");
        }
        else
        {
            String s1 = "options.graphics.fast";
            return s + I18n.getString("options.graphics.fast");
        }
    }
    else
    {
        return s;
    }
}
项目:TabbyChat-2    文件:IGuiIngame.java   
@Accessor
void setPersistantChatGUI(GuiNewChat chat);
项目:TabbyChat-2    文件:GuiNewChatTC.java   
public static GuiNewChat getInstance() {
    return instance;
}
项目:BetterNutritionMod    文件:GameSettings.java   
/**
 * Gets a key binding.
 */
public String getKeyBinding(EnumOptions par1EnumOptions)
{
    String s = I18n.getString(par1EnumOptions.getEnumString()) + ": ";

    if (par1EnumOptions.getEnumFloat())
    {
        float f = this.getOptionFloatValue(par1EnumOptions);
        return par1EnumOptions == EnumOptions.SENSITIVITY ? (f == 0.0F ? s + I18n.getString("options.sensitivity.min") : (f == 1.0F ? s + I18n.getString("options.sensitivity.max") : s + (int)(f * 200.0F) + "%")) : (par1EnumOptions == EnumOptions.FOV ? (f == 0.0F ? s + I18n.getString("options.fov.min") : (f == 1.0F ? s + I18n.getString("options.fov.max") : s + (int)(70.0F + f * 40.0F))) : (par1EnumOptions == EnumOptions.GAMMA ? (f == 0.0F ? s + I18n.getString("options.gamma.min") : (f == 1.0F ? s + I18n.getString("options.gamma.max") : s + "+" + (int)(f * 100.0F) + "%")) : (par1EnumOptions == EnumOptions.CHAT_OPACITY ? s + (int)(f * 90.0F + 10.0F) + "%" : (par1EnumOptions == EnumOptions.CHAT_HEIGHT_UNFOCUSED ? s + GuiNewChat.func_96130_b(f) + "px" : (par1EnumOptions == EnumOptions.CHAT_HEIGHT_FOCUSED ? s + GuiNewChat.func_96130_b(f) + "px" : (par1EnumOptions == EnumOptions.CHAT_WIDTH ? s + GuiNewChat.func_96128_a(f) + "px" : (f == 0.0F ? s + I18n.getString("options.off") : s + (int)(f * 100.0F) + "%")))))));
    }
    else if (par1EnumOptions.getEnumBoolean())
    {
        boolean flag = this.getOptionOrdinalValue(par1EnumOptions);
        return flag ? s + I18n.getString("options.on") : s + I18n.getString("options.off");
    }
    else if (par1EnumOptions == EnumOptions.RENDER_DISTANCE)
    {
        return s + getTranslation(RENDER_DISTANCES, this.renderDistance);
    }
    else if (par1EnumOptions == EnumOptions.DIFFICULTY)
    {
        return s + getTranslation(DIFFICULTIES, this.difficulty);
    }
    else if (par1EnumOptions == EnumOptions.GUI_SCALE)
    {
        return s + getTranslation(GUISCALES, this.guiScale);
    }
    else if (par1EnumOptions == EnumOptions.CHAT_VISIBILITY)
    {
        return s + getTranslation(CHAT_VISIBILITIES, this.chatVisibility);
    }
    else if (par1EnumOptions == EnumOptions.PARTICLES)
    {
        return s + getTranslation(PARTICLES, this.particleSetting);
    }
    else if (par1EnumOptions == EnumOptions.FRAMERATE_LIMIT)
    {
        return s + getTranslation(LIMIT_FRAMERATES, this.limitFramerate);
    }
    else if (par1EnumOptions == EnumOptions.AMBIENT_OCCLUSION)
    {
        return s + getTranslation(AMBIENT_OCCLUSIONS, this.ambientOcclusion);
    }
    else if (par1EnumOptions == EnumOptions.GRAPHICS)
    {
        if (this.fancyGraphics)
        {
            return s + I18n.getString("options.graphics.fancy");
        }
        else
        {
            String s1 = "options.graphics.fast";
            return s + I18n.getString("options.graphics.fast");
        }
    }
    else
    {
        return s;
    }
}
项目:Bookshelf    文件:PlayerUtils.java   
/**
 * Sends a spamless message to the chat. A spamless message is one that only shows up in
 * the chat once. If another version of the message were to be added to chat, the earlier
 * one would be removed.
 *
 * @param messageID A unique message ID used to separate your message from the others. It
 *        is highly recommended to use a random number to prevent conflicts with other mods
 *        doing similar things. Each message type should have it's own ID.
 * @param message The message to send to chat, this message will replace earlier messages
 *        in the gui that use the same ID.
 */
@SideOnly(Side.CLIENT)
public static void sendSpamlessMessage (int messageID, ITextComponent message) {

    final GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    chat.printChatMessageWithOptionalDeletion(message, messageID);
}
项目:MMDLib-old    文件:PlayerUtils.java   
/**
 * Sends a spamless message to the chat. A spamless message is one that only shows up in
 * the chat once. If another version of the message were to be added to chat, the earlier
 * one would be removed.
 * 
 * @param messageID A unique message ID used to separate your message from the others. It
 *        is highly recommended to use a random number to prevent conflicts with other mods
 *        doing similar things. Each message type should have it's own ID.
 * @param message The message to send to chat, this message will replace earlier messages
 *        in the gui that use the same ID.
 */
@SideOnly(Side.CLIENT)
public static void sendSpamlessMessage (int messageID, ITextComponent message) {
    final GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
    chat.printChatMessageWithOptionalDeletion(message, messageID);
}