下面小编为大家带来我的世界雷属性钻石剑制作教程,想知道雷属性钻石剑怎么制作吗?一起来看看吧!
效果图
原理
1.探测物品使用次数
2.探测玩家手上的东西 也可以说是拿指定的东西打才行
3.探测经过以上探测后探测附近变红的实体
4.全部探测成功就让变红的实体生成雷劈
5.清除各探测分数
具体指令
计分板
1.scoreboard objectives add sq stat.useItem.minecraft.diamond_sword
2.scoreboard objectives add qs dummy
3.scoreboard objectives add qq dummy
高频
1.execute @a[score_sq_min=1] ~ ~ ~ /scoreboard players add @p qs 1 {SelectedItem:{id:"minecraft:diamond_sword"}}
连锁
2.execute @a[score_sq_min=1,score_qs_min=1] ~ ~ ~ /scoreboard players add @e[rm=1,r=5] qq 1 {HurtTime:10s}
3.execute @a[score_sq_min=1,score_qs_min=1] ~ ~ ~ execute @e[score_qq_min=1] ~ ~ ~ /summon minecraft:lightning_bolt
4.execute @e[score_qq_min=1] ~ ~ ~ execute @e[score_qq_min=1] ~ ~ ~ execute @e[score_qq_min=1] ~ ~ ~ scoreboard players set @e[score_qq_min=1] qq 0
5.execute @a[score_sq_min=1,score_qs_min=1] ~ ~ ~ /scoreboard players set @p qs 0 execute @a[score_sq_min=1] ~ ~ ~ /scoreboard players set @p sq 0
6.execute @a[score_sq_min=1] ~ ~ ~ /scoreboard players set @p sq 0
BUG:当然如果巧合在你的旁边也有生物同时被攻击也会被雷劈 几率很小