net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen Java Examples
The following examples show how to use
net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MultiplayerScreenMixin.java From Wurst7 with GNU General Public License v3.0 | 6 votes |
@Inject(at = {@At("TAIL")}, method = {"init()V"}) private void onInit(CallbackInfo ci) { if(!WurstClient.INSTANCE.isEnabled()) return; lastServerButton = addButton(new ButtonWidget(width / 2 - 154, 10, 100, 20, new LiteralText("Last Server"), b -> LastServerRememberer .joinLastServer((MultiplayerScreen)(Object)this))); addButton(new ButtonWidget(width / 2 + 154 + 4, height - 52, 100, 20, new LiteralText("Server Finder"), b -> client.openScreen( new ServerFinderScreen((MultiplayerScreen)(Object)this)))); addButton(new ButtonWidget(width / 2 + 154 + 4, height - 28, 100, 20, new LiteralText("Clean Up"), b -> client.openScreen( new CleanUpScreen((MultiplayerScreen)(Object)this)))); }
Example #2
Source File: ServerScraperScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
public void render(int p_render_1_, int p_render_2_, float p_render_3_) { renderBackground(); drawCenteredString(font, "§7IP:", this.width / 2 - 91, this.height / 4 + 18, -1); drawCenteredString(font, "§7" + checked + " / 1792 [§a" + working + "§7]", this.width / 2, this.height / 4 + 58, -1); drawCenteredString(font, result, this.width / 2, this.height / 4 + 70, -1); ipField.render(p_render_1_, p_render_2_, p_render_3_); if (abort) { result = "§7Aborting.. [" + pingers.size() + "] Left"; if (pingers.size() == 0) minecraft.openScreen(new MultiplayerScreen(new TitleScreen())); } super.render(p_render_1_, p_render_2_, p_render_3_); }
Example #3
Source File: MixinServerScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Inject(at = @At("HEAD"), method = "init()V") private void init(CallbackInfo info) { addButton(new ButtonWidget(5, 7, 50, 18, new LiteralText("Scraper"), button -> { client.openScreen(new ServerScraperScreen((MultiplayerScreen) client.currentScreen)); })); addButton(new ButtonWidget(58, 7, 50, 18, new LiteralText("Cleanup"), button -> { client.openScreen(new CleanUpScreen((MultiplayerScreen) client.currentScreen)); })); addButton(new ButtonWidget(111, 7, 50, 18, new LiteralText("Protocol"), button -> { client.openScreen(new ProtocolScreen((MultiplayerScreen) client.currentScreen)); })); }
Example #4
Source File: ServerScraperScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
public void render(MatrixStack matrix, int mouseX, int mouseY, float delta) { renderBackground(matrix); drawCenteredString(matrix, textRenderer, "\u00a77IP:", this.width / 2 - 91, this.height / 4 + 18, -1); drawCenteredString(matrix, textRenderer, "\u00a77" + checked + " / 1792 [\u00a7a" + working + "\u00a77]", this.width / 2, this.height / 4 + 58, -1); drawCenteredString(matrix, textRenderer, result, this.width / 2, this.height / 4 + 70, -1); ipField.render(matrix, mouseX, mouseY, delta); if (abort) { result = "\u00a77Aborting.. [" + pingers.size() + "] Left"; if (pingers.size() == 0) client.openScreen(new MultiplayerScreen(new TitleScreen())); } super.render(matrix, mouseX, mouseY, delta); }
Example #5
Source File: AutoReconnect.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
public void init() { super.init(); reconnectTime = System.currentTimeMillis(); addButton(new ButtonWidget(width / 2 - 100, height / 2 + reasonH / 2 + 35, 200, 20, "Reconnect", (button) -> { if (server != null) minecraft.openScreen(new ConnectScreen(new MultiplayerScreen(new TitleScreen()), minecraft, server)); })); addButton(new ButtonWidget(width / 2 - 100, height / 2 + reasonH / 2 + 57, 200, 20, (getSettings().get(0).toToggle().state ? "§a" : "§c") + "AutoReconnect [" + ((reconnectTime + getSettings().get(1).toSlider().getValue() * 1000) - System.currentTimeMillis()) + "]", (button) -> { getSettings().get(0).toToggle().state = !getSettings().get(0).toToggle().state; reconnectTime = System.currentTimeMillis(); })); }
Example #6
Source File: AutoReconnect.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
public void render(int int_1, int int_2, float float_1) { super.render(int_1, int_2, float_1); buttons.get(2).setMessage((getSettings().get(0).toToggle().state ? "§aAutoReconnect [" + ((reconnectTime + getSettings().get(1).toSlider().getValue() * 1000) - System.currentTimeMillis()) + "]" : "§cAutoReconnect [" + getSettings().get(1).toSlider().getValue() * 1000 + "]")); if (reconnectTime + getSettings().get(1).toSlider().getValue() * 1000 < System.currentTimeMillis() && getSettings().get(0).toToggle().state) { if (server != null) minecraft.openScreen(new ConnectScreen(new MultiplayerScreen(new TitleScreen()), minecraft, server)); reconnectTime = System.currentTimeMillis(); } }
Example #7
Source File: AutoReconnect.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
public void render(MatrixStack matrix, int mouseX, int mouseY, float delta) { super.render(matrix, mouseX, mouseY, delta); buttons.get(2).setMessage(new LiteralText((getSettings().get(0).toToggle().state ? "\u00a7aAutoReconnect [" + ((reconnectTime + getSettings().get(1).toSlider().getValue() * 1000) - System.currentTimeMillis()) + "]" : "\u00a7cAutoReconnect [" + getSettings().get(1).toSlider().getValue() * 1000 + "]"))); if (reconnectTime + getSettings().get(1).toSlider().getValue() * 1000 < System.currentTimeMillis() && getSettings().get(0).toToggle().state) { if (server != null) client.openScreen(new ConnectScreen(new MultiplayerScreen(new TitleScreen()), client, server)); reconnectTime = System.currentTimeMillis(); } }
Example #8
Source File: AutoReconnect.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
public void init() { super.init(); reconnectTime = System.currentTimeMillis(); addButton(new ButtonWidget(width / 2 - 100, height / 2 + reasonH / 2 + 35, 200, 20, new LiteralText("Reconnect"), (button) -> { if (server != null) client.openScreen(new ConnectScreen(new MultiplayerScreen(new TitleScreen()), client, server)); })); addButton(new ButtonWidget(width / 2 - 100, height / 2 + reasonH / 2 + 57, 200, 20, new LiteralText((getSettings().get(0).toToggle().state ? "\u00a7a" : "\u00a7c") + "AutoReconnect [" + ((reconnectTime + getSettings().get(1).toSlider().getValue() * 1000) - System.currentTimeMillis()) + "]"), (button) -> { getSettings().get(0).toToggle().state = !getSettings().get(0).toToggle().state; reconnectTime = System.currentTimeMillis(); })); }
Example #9
Source File: MixinServerScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Inject(at = @At("HEAD"), method = "init()V") private void init(CallbackInfo info) { addButton(new ButtonWidget(5, 7, 50, 18, "Scraper", button -> { minecraft.openScreen(new ServerScraperScreen((MultiplayerScreen) minecraft.currentScreen)); })); addButton(new ButtonWidget(58, 7, 50, 18, "Cleanup", button -> { minecraft.openScreen(new CleanUpScreen((MultiplayerScreen) minecraft.currentScreen)); })); }
Example #10
Source File: AutoReconnect.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
public void render(int int_1, int int_2, float float_1) { super.render(int_1, int_2, float_1); buttons.get(2).setMessage((getSettings().get(0).toToggle().state ? "§aAutoReconnect [" + ((reconnectTime + getSettings().get(1).toSlider().getValue() * 1000) - System.currentTimeMillis()) + "]" : "§cAutoReconnect [" + getSettings().get(1).toSlider().getValue() * 1000 + "]")); if (reconnectTime + getSettings().get(1).toSlider().getValue() * 1000 < System.currentTimeMillis() && getSettings().get(0).toToggle().state) { if (server != null) minecraft.openScreen(new ConnectScreen(new MultiplayerScreen(new TitleScreen()), minecraft, server)); reconnectTime = System.currentTimeMillis(); } }
Example #11
Source File: AutoReconnect.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
public void init() { super.init(); reconnectTime = System.currentTimeMillis(); addButton(new ButtonWidget(width / 2 - 100, height / 2 + reasonH / 2 + 35, 200, 20, "Reconnect", (button) -> { if (server != null) minecraft.openScreen(new ConnectScreen(new MultiplayerScreen(new TitleScreen()), minecraft, server)); })); addButton(new ButtonWidget(width / 2 - 100, height / 2 + reasonH / 2 + 57, 200, 20, (getSettings().get(0).toToggle().state ? "§a" : "§c") + "AutoReconnect [" + ((reconnectTime + getSettings().get(1).toSlider().getValue() * 1000) - System.currentTimeMillis()) + "]", (button) -> { getSettings().get(0).toToggle().state = !getSettings().get(0).toToggle().state; reconnectTime = System.currentTimeMillis(); })); }
Example #12
Source File: SandboxTitleScreen.java From Sandbox with GNU Lesser General Public License v3.0 | 5 votes |
private void initWidgetsNormal(int int_1, int int_2) { this.addButton(new ButtonWidget(this.width / 2 - 100, int_1, 200, 20, I18n.translate("menu.singleplayer"), (buttonWidget_1) -> { this.minecraft.openScreen(new SelectWorldScreen(this)); })); this.addButton(new ButtonWidget(this.width / 2 - 100, int_1 + int_2, 200, 20, I18n.translate("menu.multiplayer"), (buttonWidget_1) -> { this.minecraft.openScreen(new MultiplayerScreen(this)); })); }
Example #13
Source File: ServerScraperScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
public void render(int p_render_1_, int p_render_2_, float p_render_3_) { renderBackground(); drawCenteredString(font, "§7IP:", this.width / 2 - 91, this.height / 4 + 18, -1); drawCenteredString(font, "§7" + checked + " / 1792 [§a" + working + "§7]", this.width / 2, this.height / 4 + 58, -1); drawCenteredString(font, result, this.width / 2, this.height / 4 + 70, -1); ipField.render(p_render_1_, p_render_2_, p_render_3_); if (abort) { result = "§7Aborting.. [" + pingers.size() + "] Left"; if (pingers.size() == 0) minecraft.openScreen(new MultiplayerScreen(new TitleScreen())); } super.render(p_render_1_, p_render_2_, p_render_3_); }
Example #14
Source File: MixinServerScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Inject(at = @At("HEAD"), method = "init()V") private void init(CallbackInfo info) { addButton(new ButtonWidget(5, 7, 50, 18, "Scraper", button -> { minecraft.openScreen(new ServerScraperScreen((MultiplayerScreen) minecraft.currentScreen)); })); addButton(new ButtonWidget(58, 7, 50, 18, "Cleanup", button -> { minecraft.openScreen(new CleanUpScreen((MultiplayerScreen) minecraft.currentScreen)); })); addButton(new ButtonWidget(111, 7, 50, 18, "Protocol", button -> { minecraft.openScreen(new ProtocolScreen((MultiplayerScreen) minecraft.currentScreen)); })); }
Example #15
Source File: ProtocolScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 4 votes |
public ProtocolScreen(MultiplayerScreen serverScreen) { super(new LiteralText("Protocol Screen")); this.serverScreen = serverScreen; }
Example #16
Source File: CleanUpScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 4 votes |
public CleanUpScreen(MultiplayerScreen serverScreen) { super(new LiteralText("Server Cleanup")); this.serverScreen = serverScreen; }
Example #17
Source File: CleanUpScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 4 votes |
public void onClose() { minecraft.openScreen(new MultiplayerScreen(new TitleScreen(false))); }
Example #18
Source File: ServerScraperScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 4 votes |
public ServerScraperScreen(MultiplayerScreen serverScreen) { super(new LiteralText("Server Scraper")); this.serverScreen = serverScreen; }
Example #19
Source File: ProtocolScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 4 votes |
public ProtocolScreen(MultiplayerScreen serverScreen) { super(new LiteralText("Protocol Screen")); this.serverScreen = serverScreen; }
Example #20
Source File: ServerScraperScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 4 votes |
public ServerScraperScreen(MultiplayerScreen serverScreen) { super(new LiteralText("Server Scraper")); this.serverScreen = serverScreen; }
Example #21
Source File: CleanUpScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 4 votes |
public void onClose() { client.openScreen(new MultiplayerScreen(new TitleScreen(false))); }
Example #22
Source File: CleanUpScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 4 votes |
public CleanUpScreen(MultiplayerScreen serverScreen) { super(new LiteralText("Server Cleanup")); this.serverScreen = serverScreen; }
Example #23
Source File: ServerScraperScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 4 votes |
public ServerScraperScreen(MultiplayerScreen serverScreen) { super(new LiteralText("Server Scraper")); this.serverScreen = serverScreen; }
Example #24
Source File: CleanUpScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 4 votes |
public void onClose() { minecraft.openScreen(new MultiplayerScreen(new TitleScreen(false))); }
Example #25
Source File: CleanUpScreen.java From bleachhack-1.14 with GNU General Public License v3.0 | 4 votes |
public CleanUpScreen(MultiplayerScreen serverScreen) { super(new LiteralText("Server Cleanup")); this.serverScreen = serverScreen; }
Example #26
Source File: ServerFinderScreen.java From Wurst7 with GNU General Public License v3.0 | 4 votes |
public ServerFinderScreen(MultiplayerScreen prevMultiplayerMenu) { super(new LiteralText("")); prevScreen = prevMultiplayerMenu; }
Example #27
Source File: CleanUpScreen.java From Wurst7 with GNU General Public License v3.0 | 4 votes |
public CleanUpScreen(MultiplayerScreen prevScreen) { super(new LiteralText("")); this.prevScreen = prevScreen; }