content-name: "简单的例子(宝箱2)"
basic-entity:
- entity-collision-size: 1
entity-type: "SLIME"
default-name: 宝箱
basic-block:
- default-skull-name: model:grass
type: CREEPER_HEAD
default-name: 宝箱
generate-action:
0:
- condition:
- check '${job:time *current}' >= '${job:player *data *宝箱开启冷却时间戳 *int}'
condition-is-met:
- job:visible self object true
condition-not-met:
- job:visible self object false
action-steps:
宝箱:
1:
- condition-is-met:
- send "&f你开启了一个 &6宝箱"
- job:visible self object false
- job:data player set 宝箱开启冷却时间戳 ${job:time *current *10}
- job:item drop o DIAMOND 1
- job:item drop o DIAMOND 3 ~@0.5
- job:item drop o DIAMOND_SWORD 1 ~@0.1
type:
- LEFT_CLICK
tasks:
"宝箱开启冷却任务-自动启动":
type: "CONTENT"
run-type: "CYCLE"
run-time: 1
run-auto: true
online-player-run: true
action-steps:
1:
- condition:
- check '${job:player *visible *object}' == false
- check '${job:time *current}' >= '${job:player *data *宝箱开启冷却时间戳 *int}'
condition-is-met:
- job:visible self object true
hologram:
high: 1.8
update: true
default:
"宝箱":
- "§f[ §a右键开启宝箱 §f]"
- "§f每个玩家每十秒有一次机会开启该宝箱"