From 6cb12f60493c31af3cdc356d283d4844239958bd Mon Sep 17 00:00:00 2001 From: PeytonPlayz595 <106421860+PeytonPlayz595@users.noreply.github.com> Date: Fri, 14 Jul 2023 11:04:14 -0400 Subject: [PATCH] Made pause screen appear on spawn Made pause screen appear on spawn so the mouse pointer can get captured --- src/teavm/java/com/mojang/minecraft/gui/HUDScreen.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/teavm/java/com/mojang/minecraft/gui/HUDScreen.java b/src/teavm/java/com/mojang/minecraft/gui/HUDScreen.java index ffc2926..a838af5 100644 --- a/src/teavm/java/com/mojang/minecraft/gui/HUDScreen.java +++ b/src/teavm/java/com/mojang/minecraft/gui/HUDScreen.java @@ -23,12 +23,18 @@ public final class HUDScreen extends Screen { private int height; public String hoveredPlayer = null; public int ticks = 0; - + + private boolean firstTimeLaunch = true; public HUDScreen(Minecraft var1, int var2, int var3) { this.mc = var1; this.width = var2 * 240 / var3; this.height = var3 * 240 / var3; + + if(firstTimeLaunch) { + mc.setCurrentScreen(new PauseScreen()); + firstTimeLaunch = false; + } } public final void render(float var1, boolean var2, int var3, int var4) {