跳到主要内容

treasure(宝箱实体)

在指定位置生成一个 Adyeshach 临时实体,玩家与实体交互后执行脚本,并销毁该宝箱。

依赖

  • Adyeshach(必需)

params

必填:

  • location:位置
  • npcType:Adyeshach 实体类型(例如 ARMOR_STAND,会被转为大写枚举)
  • npcName:显示名
  • kether:脚本列表

示例:

treasure-1:
type: treasure
params:
location: { x: 0, y: 65, z: 0 }
npcType: ARMOR_STAND
npcName: "宝箱"
kether:
- 'give diamond 5'

行为细节

  • 仅主手交互触发
  • 触发一次后会自动销毁宝箱实体