From 82b5e23e324f8d998b928b89cb15df727c135995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=90=E6=B2=90=E5=91=80?= <163636894+zimuya4153@users.noreply.github.com> Date: Fri, 24 May 2024 20:31:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BAi18nFix=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/GMLIB_API-JS.js | 7 ++++++- src/LegacyModApi.cpp | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/GMLIB_API-JS.js b/lib/GMLIB_API-JS.js index a0c49c0..b14c966 100644 --- a/lib/GMLIB_API-JS.js +++ b/lib/GMLIB_API-JS.js @@ -109,7 +109,8 @@ const GMLIB_API = { getBlockRuntimeId: ll.import("GMLIB_API", "getBlockRuntimeId"), addFakeList: ll.import("GMLIB_API", "addFakeList"), removeFakeList: ll.import("GMLIB_API", "removeFakeList"), - removeAllFakeLists: ll.import("GMLIB_API", "removeAllFakeList") + removeAllFakeLists: ll.import("GMLIB_API", "removeAllFakeList"), + setFixI18nEnabled: ll.import("GMLib_ModAPI", "setFixI18nEnabled") } const FloatingTextList = []; @@ -422,6 +423,10 @@ class Minecraft { static removeAllFakeLists() { return GMLIB_API.removeAllFakeLists(); } + + static setFixI18nEnabled() { + GMLIB_API.setFixI18nEnabled(); + } } class Recipes { diff --git a/src/LegacyModApi.cpp b/src/LegacyModApi.cpp index e1d07de..68e5443 100644 --- a/src/LegacyModApi.cpp +++ b/src/LegacyModApi.cpp @@ -192,4 +192,7 @@ void Export_Legacy_GMLib_ModAPI() { return false; } }); + RemoteCall::exportAs("GMLib_ModAPI", "setFixI18nEnabled", []() -> void { + GMLIB::Mod::VanillaFix::setFixI18nEnabled(); + }); } \ No newline at end of file