diff --git a/manifest.json b/manifest.json index 552f668..7493be7 100644 --- a/manifest.json +++ b/manifest.json @@ -8,7 +8,7 @@ "description": "基岩之上服务器模组。提供服务器所有的命令功能。", "min_engine_version": [ 1, 21, 30 ], "uuid": "03bdd0ea-7bfe-4645-8622-e6b984d79f6e", - "version": [ 1, 2, 0 ] + "version": [ 1, 2, 1 ] }, "modules": [ { diff --git a/scripts/common.js b/scripts/common.js index 75526d3..bc6cea3 100644 --- a/scripts/common.js +++ b/scripts/common.js @@ -316,14 +316,14 @@ const containerIds = [ "crafter", "brewing_stand", "ender_chest" -]; +].map(value=>`minecraft:${value}`); /**判断是否为可以锁上的容器方块。 * @param {Block} block * @returns {boolean} */ export function isContainer(block){ - try {return containerIds.includes(block.typeId.replace("minecraft:", "")) || /minecraft:.+_shulker_box/.test(block.typeId);} + try {return containerIds.includes(block.typeId) || /minecraft:.+_shulker_box/.test(block.typeId);} catch(e) {return false;} } //#endregion