fix 1.12 check to work on dedicated server

This commit is contained in:
ZXMushroom63 2025-05-02 19:37:12 +08:00
parent 98459e12da
commit 14831572ef
2 changed files with 1 additions and 1 deletions

View File

@ -383,7 +383,6 @@ var main;(function(){`
patchedFile = patchedFile.replace(
` id="game_frame">`,
` id="game_frame">
\<script id="1_12_corelib_flag"\>ModAPI.is_1_12 = ${patchedFile.includes("nleit_MainClass_main")}\<\/script\>
\<script id="modapi_patchesreg_events"\>${assets.PatchesRegistry.getEventInjectorCode()};\<\/script\>
\<script id="modapi_postinit"\>${assets.modapi_postinit.replace("__modapi_version_code__", EFIConfig.ModAPIVersion)}\<\/script\>
\<script id="modapi_modloader"\>${assets.modapi_modloader}\<\/script\>

View File

@ -16,6 +16,7 @@ const modapi_postinit = "(" + (() => {
}
ModAPI.hooks._classMap = {};
ModAPI.is_1_12 = !!ModAPI.hooks.methods.nleit_MainClass_main;
globalThis.PluginAPI ||= ModAPI;
ModAPI.mcinstance ||= {};
ModAPI.javaClient ||= {};