diff --git a/core/postinit.js b/core/postinit.js index 089dc7d..e8049b1 100644 --- a/core/postinit.js +++ b/core/postinit.js @@ -1249,6 +1249,9 @@ const modapi_postinit = "(" + (() => { return qhash(entity, values, 127); } ModAPI.keygen.sound = function (soundId) { + if (!ModAPI.is_1_12) { + return -1; + } const SoundEvent = ModAPI.reflect.getClassByName("SoundEvent") const values = ModAPI.util.wrap(SoundEvent.staticVariables.REGISTRY).getCorrective().underlyingIntegerMap.identityMap.elementData.filter(x=>!!x).map(y=>y.value.value); return qhash(soundId, values, 4095);