(Object instance, int paramInt1, int paramInt2, boolean isForge)
| 88 | } |
| 89 | |
| 90 | public static void patchMainMenu(Object instance, int paramInt1, int paramInt2, boolean isForge) { |
| 91 | aya guiMainMenu = (aya) instance; |
| 92 | if (!MinecraftFactory.getClassProxyCallback().isShowLastServer()) |
| 93 | return; |
| 94 | String lastServer; |
| 95 | IButton button; |
| 96 | String server = MinecraftFactory.getClassProxyCallback().getLastServer(); |
| 97 | int x = guiMainMenu.l / 2 + 2; |
| 98 | int y = paramInt1 + paramInt2; |
| 99 | if (server != null) { |
| 100 | String[] parts = server.split(":"); |
| 101 | String host = parts[parts.length - 2]; |
| 102 | int port = Integer.parseInt(parts[parts.length - 1]); |
| 103 | if (port == 25565) { |
| 104 | lastServer = host; |
| 105 | } else { |
| 106 | lastServer = host + ":" + port; |
| 107 | } |
| 108 | lastServer = MinecraftFactory.getVars().shortenToWidth(lastServer, 88); |
| 109 | button = MinecraftFactory.getVars().createButton(99, x, y, 98, 20, lastServer); |
| 110 | } else { |
| 111 | button = MinecraftFactory.getVars().createButton(98, x, y, 98, 20, MinecraftFactory.getClassProxyCallback().translate("menu.no_last_server")); |
| 112 | } |
| 113 | List<avs> list; |
| 114 | if (Transformer.FORGE) { |
| 115 | try { |
| 116 | list = ((List<avs>) buttonList.get(guiMainMenu)); |
| 117 | } catch (Exception e) { |
| 118 | throw new RuntimeException(e); |
| 119 | } |
| 120 | } else { |
| 121 | list = guiMainMenu.n; |
| 122 | } |
| 123 | list.add((avs) button); |
| 124 | |
| 125 | for (avs b : list) { |
| 126 | int id = b.k; |
| 127 | if (id == 2) { |
| 128 | b.f = 98; |
| 129 | } |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | public static void guiMainActionPerformed(Object b) { |
| 134 | avs button = (avs) b; |
nothing calls this directly
no test coverage detected