Skip to content

Commit

Permalink
1.2.1
Browse files Browse the repository at this point in the history
修复容器锁将模组方块视为容器的bug
  • Loading branch information
ljm12914 committed Oct 6, 2024
1 parent 87a1c73 commit c0cd9a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
4 changes: 2 additions & 2 deletions scripts/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c0cd9a1

Please sign in to comment.