创建箭矢和物品丢出判定的计分板- /scoreboard objectives add arrow dummy
复制代码- /scoreboard objectives add Item dummy
复制代码
判定指定物品丢出,并设置归位物品栏- /scoreboard players set @e[type=item] Item 1 {Item:{id:"minecraft:blaze_rod"}}
复制代码- /entitydata @e[type=Item,score_Item_min=1,score_Item=1] {PickupDelay:0s}
复制代码
同时条件制约输出,生成无动量的火球
- /execute @a ~ ~ ~ /summon Fireball ~ ~7 ~ {direction:[0.0,0.0,0.0],ExplosionPower:1}
复制代码 生成以玩家为投掷者的雪球,使火球继承玩家向量和雪球动量
- /execute @a ~ ~ ~ /summon Snowball ~ ~15 ~ {Motion:[0.0,-5.0,0.0],ownerName:MsYqgzt}
复制代码
之后条件输出,将火球不断加分
- /scoreboard players add @e[type=Fireball] arrow 1
复制代码
当火球分数超过3时,条件输出以运动一段时间的火球位置生成箭矢
- /scoreboard players test @e[type=Fireball] arrow 4 1000
复制代码- /execute @e[type=Fireball] ~ ~ ~ summon Arrow ~ ~ ~
复制代码
之后清除火球
- /kill @e[type=Fireball,score_arrow_min=3]
复制代码
最后一步,在玩家原位置的头顶同一高度位置生成一个爆炸半径为1,秒炸的Creeper
- /execute @a ~ ~ ~ summon Creeper ~ ~7.3 ~ {ignited:1b,Fuse:1s,NoAI:1b,Silent:1b,ExplosionRadius:1s}
复制代码
|