From 4accf85031fc6150f5927bdaee3d5f59dcf620af Mon Sep 17 00:00:00 2001 From: ZXMushroom63 Date: Wed, 18 Sep 2024 17:06:41 +0800 Subject: [PATCH] quick fix --- postinit.injector.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/postinit.injector.js b/postinit.injector.js index 3f96bb1..b4e8278 100644 --- a/postinit.injector.js +++ b/postinit.injector.js @@ -753,7 +753,8 @@ globalThis.modapi_postinit = `(() => { const originalMainMethod = ModAPI.hooks.methods[ModAPI.util.getMethodFromPackage("net.lax1dude.eaglercraft.v1_8.internal.teavm.ClientMain", "_main")]; ModAPI.hooks.methods[ModAPI.util.getMethodFromPackage("net.lax1dude.eaglercraft.v1_8.internal.teavm.ClientMain", "_main")] = function (...args) { if (!inited) { - return modapi_displayModGui(originalMainMethod); + inited = true; + return modapi_displayModGui(globalThis.main); } else { return originalMainMethod.apply(this, args); }