Inspection Skill

分析现有建筑代码和场景。检查结构问题、计算边界、为新建筑定位。

justcnds 2b32873 2 files · 7.4 KB Updated

File contents

🔍 Inspection Skill

分析和检查现有建筑代码,保障结构完整性与空间定位。

使用时机

  • 修改现有代码前(了解当前结构的边界与坐标)
  • 添加新建筑到现有场景时(计算留白,避免建筑重叠)
  • 用户报告建筑缺陷或穿模时

可用分析脚本 (Scripts)

analyzeScene.js

分析当前场景所有建筑方块的三维包围盒(Bounding Box),给出下一座建筑的安全放置坐标:

{ "name": "run_script", "arguments": { "script": "analyzeScene", "passCurrentCode": true } }

返回值示例:

{
  "bounds": { "minX": 0, "maxX": 20, "minZ": 0, "maxZ": 20 },
  "size": { "width": 21, "height": 30 },
  "recommendation": "Place new structure at X=30"
}

analyzeStructure.js

检查代码中是否存在常见瑕疵(缺少内饰、无门窗开口、优先级倒挂等)。

常见结构缺陷与标准修复方案

  • 山墙缝隙 (Gable Gap): 严禁手动写 for 循环逐层画线填充!请在 drawRoofBounds 的 options 参数中指定 { gable: '墙体材质' },屋顶算法会自动严丝合缝地封闭三角山墙。
  • 空荡内部 (Empty Interior): 调用 read_skill("decoration-skill") 查阅家具配置,在优先级 20 的组中补充桌椅、床铺与灯光。
  • 平墙无细节 (Flat Wall): 窗外添加具体活板门作为百叶窗(如 'spruce_trapdoor?facing=east,open=true'),窗下加倒放楼梯或台阶做窗台。

justcnds/mc-ai-builder/tree/main/src/skills/user/inspection-skill commit 2b32873c03

Frequently asked questions

npx skillmds@latest add justcnds/inspection-skill