net.minecraft.client.gui.screen.TitleScreen Java Examples
The following examples show how to use
net.minecraft.client.gui.screen.TitleScreen.
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: MixinMinecraftClient.java From Sandbox with GNU Lesser General Public License v3.0 | 6 votes |
@ModifyVariable(method = "openScreen", at = @At("HEAD"), ordinal = 0) public Screen openScreen(Screen screen) { if (screen instanceof TitleScreen || (screen == null && MinecraftClient.getInstance().world == null)) { screen = new SandboxTitleScreen(); } return screen; }
Example #2
Source File: MineLittlePony.java From MineLittlePony with MIT License | 6 votes |
private void onScreenInit(Screen screen, ScreenInitCallback.ButtonList buttons) { if (screen instanceof TitleScreen) { VisibilityMode mode = config.horseButton.get(); boolean show = mode == VisibilityMode.ON || (mode == VisibilityMode.AUTO && !(hasHdSkins || hasModMenu )); if (show) { int y = hasHdSkins ? 75 : 50; Button button = buttons.add(new Button(screen.width - 50, screen.height - y, 20, 20)) .onClick(sender -> MinecraftClient.getInstance().openScreen(new GuiPonySettings(screen))); button.getStyle() .setIcon(new TextureSprite() .setPosition(2, 2) .setTexture(new Identifier("minelittlepony", "textures/gui/pony.png")) .setTextureSize(16, 16) .setSize(16, 16)); button.y = screen.height - y; // ModMenu } } }
Example #3
Source File: DirectLoginScreen.java From Wurst7 with GNU General Public License v3.0 | 6 votes |
@Override protected void pressDoneButton() { if(getPassword().isEmpty()) { message = ""; LoginManager.changeCrackedName(getEmail()); }else message = LoginManager.login(getEmail(), getPassword()); if(message.isEmpty()) client.openScreen(new TitleScreen()); else doErrorEffect(); }
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: MineLittlePony.java From MineLittlePony with MIT License | 5 votes |
private void onTick(MinecraftClient client) { boolean inGame = client.world != null && client.player != null && client.currentScreen == null; boolean mainMenu = client.currentScreen instanceof TitleScreen; if (!inGame && mainMenu) { KeyBinding.updatePressedStates(); } if ((mainMenu || inGame) && keyBinding.isPressed()) { client.openScreen(new GuiPonySettings(client.currentScreen)); } }
Example #6
Source File: MixinTitleScreen.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) { if (BleachMainMenu.customTitleScreen) { MinecraftClient.getInstance().openScreen(new BleachMainMenu()); } else { addButton(new ButtonWidget(width / 2 - 124, height / 4 + 96, 20, 20, "BH", button -> { BleachMainMenu.customTitleScreen = !BleachMainMenu.customTitleScreen; minecraft.openScreen(new TitleScreen(false)); })); } }
Example #7
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 #8
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 #9
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 #10
Source File: MixinTitleScreen.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) { if (BleachMainMenu.customTitleScreen) { MinecraftClient.getInstance().openScreen(new BleachMainMenu()); } else { addButton(new ButtonWidget(width / 2 - 124, height / 4 + 96, 20, 20, new LiteralText("BH"), button -> { BleachMainMenu.customTitleScreen = !BleachMainMenu.customTitleScreen; client.openScreen(new TitleScreen(false)); })); } }
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: 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 #13
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 #14
Source File: MixinTitleScreen.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) { if (BleachMainMenu.customTitleScreen) { MinecraftClient.getInstance().openScreen(new BleachMainMenu()); } else { addButton(new ButtonWidget(width / 2 - 124, height / 4 + 96, 20, 20, "BH", button -> { BleachMainMenu.customTitleScreen = !BleachMainMenu.customTitleScreen; minecraft.openScreen(new TitleScreen(false)); })); } }
Example #15
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 #16
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 #17
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 #18
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 #19
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))); }