fix qhash closure

This commit is contained in:
ZXMushroom63 2025-05-30 17:25:38 +08:00
parent 5ee3e7d97f
commit ab2da74aac

View File

@ -1227,7 +1227,7 @@ const modapi_postinit = "(" + (() => {
easyStaticPropAlias("net.minecraft.item.Item", "REGISTRY", "itemRegistry"); easyStaticPropAlias("net.minecraft.item.Item", "REGISTRY", "itemRegistry");
} }
ModAPI.util.qhash = function qhash(txt, arr, interval) { function qhash(txt, arr, interval) {
arr ||= []; arr ||= [];
interval ||= 32767; interval ||= 32767;
// var interval = 4095; //used to be 4095 - arr.length, but that increases incompatibility based on load order and other circumstances // var interval = 4095; //used to be 4095 - arr.length, but that increases incompatibility based on load order and other circumstances
@ -1248,6 +1248,7 @@ const modapi_postinit = "(" + (() => {
} }
return hash; return hash;
} }
ModAPI.util.qhash = qhash;
ModAPI.keygen = {}; ModAPI.keygen = {};