From 2413e901a28b049302a3c50345952ec4ef876c3d Mon Sep 17 00:00:00 2001 From: ZXMushroom63 Date: Wed, 30 Oct 2024 17:10:59 +0800 Subject: [PATCH] Fix metamap generation --- postinit.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/postinit.js b/postinit.js index 5122f04..52da603 100644 --- a/postinit.js +++ b/postinit.js @@ -216,6 +216,10 @@ globalThis.modapi_postinit = "(" + (() => { block.forEach(item => { if (typeof item === "function") { if (!item.$meta || typeof item.$meta.name !== "string") { + if (item.name && item.name.split("_").length === 2) { + metaMap[item.name] = item; + compiledNames.add(item.name); + } return; } var compiledName = ModAPI.util.getCompiledNameFromPackage(item.$meta.name); @@ -224,6 +228,7 @@ globalThis.modapi_postinit = "(" + (() => { } }); }); + ModAPI.hooks._rippedConstructorKeys.forEach(constructor => { if (typeof constructor === "string" && constructor.length > 0) {