Java 类net.minecraft.client.gui.stream.GuiStreamOptions 实例源码

项目:Cauldron    文件:GuiOptions.java   
protected void actionPerformed(GuiButton p_146284_1_)
{
    if (p_146284_1_.enabled)
    {
        if (p_146284_1_.id < 100 && p_146284_1_ instanceof GuiOptionButton)
        {
            this.field_146443_h.setOptionValue(((GuiOptionButton)p_146284_1_).returnEnumOptions(), 1);
            p_146284_1_.displayString = this.field_146443_h.getKeyBinding(GameSettings.Options.getEnumOptions(p_146284_1_.id));
        }

        if (p_146284_1_.id == 8675309)
        {
            this.mc.entityRenderer.activateNextShader();
        }

        if (p_146284_1_.id == 101)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(new GuiVideoSettings(this, this.field_146443_h));
        }

        if (p_146284_1_.id == 100)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(new GuiControls(this, this.field_146443_h));
        }

        if (p_146284_1_.id == 102)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(new GuiLanguage(this, this.field_146443_h, this.mc.getLanguageManager()));
        }

        if (p_146284_1_.id == 103)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(new ScreenChatOptions(this, this.field_146443_h));
        }

        if (p_146284_1_.id == 104)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(new GuiSnooper(this, this.field_146443_h));
        }

        if (p_146284_1_.id == 200)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(this.field_146441_g);
        }

        if (p_146284_1_.id == 105)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(new GuiScreenResourcePacks(this));
        }

        if (p_146284_1_.id == 106)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(new GuiScreenOptionsSounds(this, this.field_146443_h));
        }

        if (p_146284_1_.id == 107)
        {
            this.mc.gameSettings.saveOptions();
            IStream istream = this.mc.func_152346_Z();

            if (istream.func_152936_l() && istream.func_152928_D())
            {
                this.mc.displayGuiScreen(new GuiStreamOptions(this, this.field_146443_h));
            }
            else
            {
                GuiStreamUnavailable.func_152321_a(this);
            }
        }
    }
}
项目:Cauldron    文件:GuiOptions.java   
protected void actionPerformed(GuiButton p_146284_1_)
{
    if (p_146284_1_.enabled)
    {
        if (p_146284_1_.id < 100 && p_146284_1_ instanceof GuiOptionButton)
        {
            this.field_146443_h.setOptionValue(((GuiOptionButton)p_146284_1_).returnEnumOptions(), 1);
            p_146284_1_.displayString = this.field_146443_h.getKeyBinding(GameSettings.Options.getEnumOptions(p_146284_1_.id));
        }

        if (p_146284_1_.id == 8675309)
        {
            this.mc.entityRenderer.activateNextShader();
        }

        if (p_146284_1_.id == 101)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(new GuiVideoSettings(this, this.field_146443_h));
        }

        if (p_146284_1_.id == 100)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(new GuiControls(this, this.field_146443_h));
        }

        if (p_146284_1_.id == 102)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(new GuiLanguage(this, this.field_146443_h, this.mc.getLanguageManager()));
        }

        if (p_146284_1_.id == 103)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(new ScreenChatOptions(this, this.field_146443_h));
        }

        if (p_146284_1_.id == 104)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(new GuiSnooper(this, this.field_146443_h));
        }

        if (p_146284_1_.id == 200)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(this.field_146441_g);
        }

        if (p_146284_1_.id == 105)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(new GuiScreenResourcePacks(this));
        }

        if (p_146284_1_.id == 106)
        {
            this.mc.gameSettings.saveOptions();
            this.mc.displayGuiScreen(new GuiScreenOptionsSounds(this, this.field_146443_h));
        }

        if (p_146284_1_.id == 107)
        {
            this.mc.gameSettings.saveOptions();
            IStream istream = this.mc.func_152346_Z();

            if (istream.func_152936_l() && istream.func_152928_D())
            {
                this.mc.displayGuiScreen(new GuiStreamOptions(this, this.field_146443_h));
            }
            else
            {
                GuiStreamUnavailable.func_152321_a(this);
            }
        }
    }
}