public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer) { int metadata = world.getBlockMetadata(i, j, k); if (metadata == 2) ModLoader.openGUI( entityplayer, new GuiVehicleCrafting(entityplayer.inventory, world, i, j, k)); else ModLoader.openGUI( entityplayer, new GuiPlaneCrafting(entityplayer.inventory, world, i, j, k, metadata == 1)); return true; }
public static boolean launchGUI(EntityPlayer entityplayer, TileEntity tileentity) { ModLoader.openGUI( entityplayer, mod_IC2_ChargingBench.guiIdChargingBench, (IInventory) tileentity, ((TileEntityChargingBench) tileentity).getGuiContainer(entityplayer.inventory)); return true; }
public static void handleGUI(Packet100OpenWindow packet100openwindow) { if (!hasInit) { initializePrivate(); } BaseModMp basemodmp = (BaseModMp) guiModMap.get(Integer.valueOf(packet100openwindow.field_73429_b)); GuiScreen guiscreen = basemodmp.handleGUI(packet100openwindow.field_73429_b); if (guiscreen != null) { ModLoader.openGUI(ModLoader.getMinecraftInstance().field_71439_g, guiscreen); ModLoader.getMinecraftInstance().field_71439_g.field_71070_bA.field_75152_c = packet100openwindow.field_73431_a; } }
@Override protected void actionPerformed(GuiButton guibutton) { // If the button is clicked, toggle and save the setting if (guibutton instanceof SettingsToggleButton) { SettingsToggleButton button = (SettingsToggleButton) guibutton; button.buttonPressed(); } else if (guibutton.id == 15) { this.pageIndex++; this.buttonList.clear(); this.initGui(); } else if (guibutton.id == 16) { this.pageIndex--; this.buttonList.clear(); this.initGui(); } else { if (mod_Undercast.CONFIG.showGSClass && UndercastData.currentGSClass.equals("Unknown") && UndercastData.currentServerType == ServerType.ghostsquadron) { Minecraft.getMinecraft().thePlayer.sendChatMessage("/class"); } ModLoader.openGUI(mc.thePlayer, parentScreen); } }
@Override protected void actionPerformed(GuiButton button) { UpdateManagerMod mod = null; if (selected >= 0) mod = mods.get(getSelected()); if (button.enabled) switch (button.id) { case 0: { ModLoader.openGUI( ModLoader.getMinecraftInstance().thePlayer, new GuiModListWithUMButton(parentGui)); break; } case 1: { UpdateManager.openWebpage(UpdateManager.umWebpage); break; } case 2: { try { URL url = new URL("https://dl.dropbox.com/u/43671482/Update%20Manager/MotW.txt"); BufferedReader r = new BufferedReader(new InputStreamReader(url.openStream())); UpdateManager.openWebpage(r.readLine()); } catch (IOException e) { e.printStackTrace(); } break; } case 3: { ModLoader.openGUI(ModLoader.getMinecraftInstance().thePlayer, new GuiSettings(this)); break; } case 4: { UpdateManager.openWebpage(mod.getModURL()); break; } case 5: { ModLoader.openGUI( ModLoader.getMinecraftInstance().thePlayer, new GuiChangelog(this, mod)); break; } case 6: { if (mod.getDisclaimerURL() == null) { if (!ThreadDownloadMod.downloadings.contains(mod.getModName())) { new ThreadDownloadMod(mod.getDirectDownloadURL(), mod); button.enabled = false; } } else ModLoader.openGUI( ModLoader.getMinecraftInstance().thePlayer, new GuiDisclaimer(this, mod)); break; } case 7: { Sys.openURL( "file://" + new File(Minecraft.getMinecraftDir(), "downloadedMods").getAbsolutePath()); break; } case 8: { mod.onSpecialButtonClicked(); break; } } super.actionPerformed(button); }