private void onGuiOpen(GuiEvent.Open event) { OpenModLoader.getLogger().info("Opening gui: " + event.getGui()); if (event.getGui() instanceof GuiLanguage) { event.setCanceled(true); } else if (event.getGui() instanceof GuiMainMenu) { if (!UpdateManager.getOutdatedMods().isEmpty()) { OpenModLoader.getSidedHandler().openSnackbar(new TextComponentString("Mod updates found!")); } } }
public GuiSlotLanguage(GuiLanguage p_i1042_1_) { super(p_i1042_1_.field_73882_e, p_i1042_1_.field_73880_f, p_i1042_1_.field_73881_g, 32, p_i1042_1_.field_73881_g - 65 + 4, 18); this.field_77252_a = p_i1042_1_; this.field_77251_g = Lists.newArrayList(); this.field_77253_h = Maps.newHashMap(); Iterator var2 = GuiLanguage.func_135011_a(p_i1042_1_).func_135040_d().iterator(); while(var2.hasNext()) { Language var3 = (Language)var2.next(); this.field_77253_h.put(var3.func_135034_a(), var3); this.field_77251_g.add(var3.func_135034_a()); } }
protected void func_77213_a(int p_77213_1_, boolean p_77213_2_) { Language var3 = (Language)this.field_77253_h.get(this.field_77251_g.get(p_77213_1_)); GuiLanguage.func_135011_a(this.field_77252_a).func_135045_a(var3); GuiLanguage.func_74043_a(this.field_77252_a).field_74363_ab = var3.func_135034_a(); this.field_77252_a.field_73882_e.func_110436_a(); this.field_77252_a.field_73886_k.func_78264_a(GuiLanguage.func_135011_a(this.field_77252_a).func_135042_a()); this.field_77252_a.field_73886_k.func_78275_b(GuiLanguage.func_135011_a(this.field_77252_a).func_135044_b()); GuiLanguage.func_74042_b(this.field_77252_a).field_73744_e = I18n.func_135053_a("gui.done"); GuiLanguage.func_74043_a(this.field_77252_a).func_74303_b(); }
protected void func_73875_a(GuiButton p_73875_1_) { if(p_73875_1_.field_73741_f == 0) { this.field_73882_e.func_71373_a(new GuiOptions(this, this.field_73882_e.field_71474_y)); } if(p_73875_1_.field_73741_f == 5) { this.field_73882_e.func_71373_a(new GuiLanguage(this, this.field_73882_e.field_71474_y, this.field_73882_e.func_135016_M())); } if(p_73875_1_.field_73741_f == 1) { this.field_73882_e.func_71373_a(new GuiSelectWorld(this)); } if(p_73875_1_.field_73741_f == 2) { this.field_73882_e.func_71373_a(new GuiMultiplayer(this)); } if(p_73875_1_.field_73741_f == 14 && this.field_130023_H.field_73748_h) { this.func_140005_i(); } if(p_73875_1_.field_73741_f == 4) { this.field_73882_e.func_71400_g(); } if(p_73875_1_.field_73741_f == 11) { this.field_73882_e.func_71371_a("Demo_World", "Demo_World", DemoWorldServer.field_73071_a); } if(p_73875_1_.field_73741_f == 12) { ISaveFormat var2 = this.field_73882_e.func_71359_d(); WorldInfo var3 = var2.func_75803_c("Demo_World"); if(var3 != null) { GuiYesNo var4 = GuiSelectWorld.func_74061_a(this, var3.func_76065_j(), 12); this.field_73882_e.func_71373_a(var4); } } }
/** * Called by the controls from the buttonList when activated. (Mouse pressed for buttons) */ protected void actionPerformed(GuiButton button) throws IOException { if (button.id == 0) { this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings)); } if (button.id == 5) { this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager())); } if (button.id == 1) { this.mc.displayGuiScreen(new GuiWorldSelection(this)); } if (button.id == 2) { this.mc.displayGuiScreen(new GuiMultiplayer(this)); } if (button.id == 4) { this.mc.shutdown(); } if (button.id == 11) { this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings); } if (button.id == 12) { ISaveFormat isaveformat = this.mc.getSaveLoader(); WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World"); if (worldinfo != null) { this.mc.displayGuiScreen(new GuiYesNo(this, I18n.format("selectWorld.deleteQuestion", new Object[0]), "\'" + worldinfo.getWorldName() + "\' " + I18n.format("selectWorld.deleteWarning", new Object[0]), I18n.format("selectWorld.deleteButton", new Object[0]), I18n.format("gui.cancel", new Object[0]), 12)); } } if (button.id == 21) { this.mc.displayGuiScreen(new CheataGui(this)); } if (button.id == 24) { try { final URL url = new URL("https://github.com/CheataClient/CheataClient"); URI uri = url.toURI(); Desktop.getDesktop().browse(uri); } catch (URISyntaxException e) { e.printStackTrace(); } } }
protected void actionPerformed(GuiButton p_146284_1_) { if (p_146284_1_.id == 0) { this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings)); } if (p_146284_1_.id == 5) { this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager())); } if (p_146284_1_.id == 1) { this.mc.displayGuiScreen(new GuiSelectWorld(this)); } if (p_146284_1_.id == 2) { this.mc.displayGuiScreen(new GuiMultiplayer(this)); } if (p_146284_1_.id == 14) { this.func_140005_i(); } if (p_146284_1_.id == 4) { this.mc.shutdown(); } if (p_146284_1_.id == 6) { this.mc.displayGuiScreen(new GuiModList(this)); } if (p_146284_1_.id == 11) { this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings); } if (p_146284_1_.id == 12) { ISaveFormat isaveformat = this.mc.getSaveLoader(); WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World"); if (worldinfo != null) { GuiYesNo guiyesno = GuiSelectWorld.func_152129_a(this, worldinfo.getWorldName(), 12); this.mc.displayGuiScreen(guiyesno); } } }
protected void actionPerformed(GuiButton button) throws IOException { if (button.id == 0) { this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings)); } if (button.id == 5) { this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc .getLanguageManager())); } if (button.id == 1) { this.mc.displayGuiScreen(new GuiSelectWorld(this)); } if (button.id == 2) { this.mc.displayGuiScreen(new GuiMultiplayer(this)); } if (button.id == 14 && this.realmsButton.visible) { this.switchToRealms(); } if (button.id == 4) { this.mc.shutdown(); } if (button.id == 6) { this.mc.displayGuiScreen(new net.minecraftforge.fml.client.GuiModList(this)); } if (button.id == 11) { this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings); } if (button.id == 12) { ISaveFormat isaveformat = this.mc.getSaveLoader(); WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World"); if (worldinfo != null) { GuiYesNo guiyesno = GuiSelectWorld .func_152129_a(this, worldinfo.getWorldName(), 12); this.mc.displayGuiScreen(guiyesno); } } }
protected void func_73875_a(GuiButton p_73875_1_) { if(p_73875_1_.field_73742_g) { if(p_73875_1_.field_73741_f < 100 && p_73875_1_ instanceof GuiSmallButton) { this.field_74051_d.func_74306_a(((GuiSmallButton)p_73875_1_).func_73753_a(), 1); p_73875_1_.field_73744_e = this.field_74051_d.func_74297_c(EnumOptions.func_74379_a(p_73875_1_.field_73741_f)); } if(p_73875_1_.field_73741_f == 101) { this.field_73882_e.field_71474_y.func_74303_b(); this.field_73882_e.func_71373_a(new GuiVideoSettings(this, this.field_74051_d)); } if(p_73875_1_.field_73741_f == 100) { this.field_73882_e.field_71474_y.func_74303_b(); this.field_73882_e.func_71373_a(new GuiControls(this, this.field_74051_d)); } if(p_73875_1_.field_73741_f == 102) { this.field_73882_e.field_71474_y.func_74303_b(); this.field_73882_e.func_71373_a(new GuiLanguage(this, this.field_74051_d, this.field_73882_e.func_135016_M())); } if(p_73875_1_.field_73741_f == 103) { this.field_73882_e.field_71474_y.func_74303_b(); this.field_73882_e.func_71373_a(new ScreenChatOptions(this, this.field_74051_d)); } if(p_73875_1_.field_73741_f == 104) { this.field_73882_e.field_71474_y.func_74303_b(); this.field_73882_e.func_71373_a(new GuiSnooper(this, this.field_74051_d)); } if(p_73875_1_.field_73741_f == 200) { this.field_73882_e.field_71474_y.func_74303_b(); this.field_73882_e.func_71373_a(this.field_74053_c); } if(p_73875_1_.field_73741_f == 105) { this.field_73882_e.field_71474_y.func_74303_b(); this.field_73882_e.func_71373_a(new GuiScreenTemporaryResourcePackSelect(this, this.field_74051_d)); } } }
protected boolean func_77218_a(int p_77218_1_) { return ((String)this.field_77251_g.get(p_77218_1_)).equals(GuiLanguage.func_135011_a(this.field_77252_a).func_135041_c().func_135034_a()); }
protected void func_77214_a(int p_77214_1_, int p_77214_2_, int p_77214_3_, int p_77214_4_, Tessellator p_77214_5_) { this.field_77252_a.field_73886_k.func_78275_b(true); this.field_77252_a.func_73732_a(this.field_77252_a.field_73886_k, ((Language)this.field_77253_h.get(this.field_77251_g.get(p_77214_1_))).toString(), this.field_77252_a.field_73880_f / 2, p_77214_3_ + 1, 16777215); this.field_77252_a.field_73886_k.func_78275_b(GuiLanguage.func_135011_a(this.field_77252_a).func_135041_c().func_135035_b()); }