fix: NeoForge 1.21.5 compat

Why tf does NeoForge change the MinecraftClient instance...
This commit is contained in:
Martin Prokoph
2025-03-29 15:02:39 +01:00
parent eac8b24617
commit 16f5c08011
4 changed files with 9 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ public class PuzzleSplashScreen {
public static File CONFIG_PATH = new File(String.valueOf(PlatformFunctions.getConfigDirectory().resolve(".puzzle_cache")));
public static Path LOGO_TEXTURE = Paths.get(CONFIG_PATH + "/mojangstudios.png");
public static Path BACKGROUND_TEXTURE = Paths.get(CONFIG_PATH + "/splash_background.png");
private static final MinecraftClient client = MinecraftClient.getInstance();
private static MinecraftClient client = MinecraftClient.getInstance();
private static boolean keepBackground = false;
public static void init() {
@@ -55,6 +55,7 @@ public class PuzzleSplashScreen {
@Override
public void reload(ResourceManager manager) {
client = MinecraftClient.getInstance();
if (PuzzleConfig.resourcepackSplashScreen) {
PuzzleSplashScreen.resetColors();
client.getTextureManager().registerTexture(LOGO, new LogoTexture(LOGO));