我的世界手雷,燃烧瓶,烟雾弹,闪光弹投掷物指令

可扩展式投掷物🤣👉🤡
注意⚠️:
[给想要扩展的一点提示]💗
投掷物1是燃烧瓶
投掷物2是闪光弹
投掷物3是手榴弹
投掷物4是烟雾弹
做新的投掷物就改盔甲架的名改改效果就行了(你得有指令基础吧)
[创建记分板]👍
/scoreboard objectives add 投掷物 dummy
<手持检测>
【标注⚠️:特殊值为0的是燃烧瓶,1是闪光弹,2是手榴弹,4是烟雾弹
获取方法:give @s snowball 16 特殊值】
scoreboard players set @a 投掷物 0
scoreboard players set @a [hasitem={item=snowball,location=slot.weapon.mainhand,slot=0,data=0}] 投掷物 1
scoreboard players set @a [hasitem={item=snowball,location=slot.weapon.mainhand,slot=0,data=1}] 投掷物 2
scoreboard players set @a [hasitem={item=snowball,location=slot.weapon.mainhand,slot=0,data=2}] 投掷物 3
scoreboard players set @a [hasitem={item=snowball,location=slot.weapon.mainhand,slot=0,data=3}] 投掷物 4
<第一部分>
[让雪球知道扔自己的是个什么货色]🤮
execute @e [type=snowball,tag=!已检测类别] ~~~ tag @p add 投掷
<第二部分>
[让货色自己扔的鸡蛋也知道自己是个什么货色]🎩
execute @e [tag=投掷,scores={投掷物=1}] ~~~ tag @e [c=1,type=snowball,tag=!已检测类别] add 燃烧瓶
execute @e [tag=投掷,scores={投掷物=2}] ~~~ tag @e [c=1,type=snowball,tag=!已检测类别] add 闪光弹
execute @e [tag=投掷,scores={投掷物=3}] ~~~ tag @e [c=1,type=snowball,tag=!已检测类别] add 手榴弹
execute @e [tag=投掷,scores={投掷物=4}] ~~~ tag @e [c=1,type=snowball,tag=!已检测类别] add 烟雾弹
tag @e add 已检测类别
tag @e remove 投掷
<第三部分>
[创建记分板]👍
/scoreboard objectives add 燃烧瓶投掷 dummy
[燃烧瓶的投掷]
scoreboard players add @e 燃烧瓶投掷 0
execute @e [type=snowball,tag=燃烧瓶,tag=已检测类别,scores={燃烧瓶投掷=0}] ~~~ summon armor_stand 燃烧瓶 ~~50~
execute @e [type=snowball,tag=燃烧瓶,tag=已检测类别,scores={燃烧瓶投掷=0}] ~~~ scoreboard players set @s 燃烧瓶投掷 1
scoreboard players add @e [type=armor_stand,name=燃烧瓶] 燃烧瓶投掷 1
execute @e [type=armor_stand,name=燃烧瓶,scores={燃烧瓶投掷=1}] ~~-50~ execute @e [type=snowball,tag=燃烧瓶,r=2,c=1] ~~50~ scoreboard players set @e [type=armor_stand,name=燃烧瓶,r=2,c=1,scores={燃烧瓶投掷=1}] 燃烧瓶投掷 0
execute @e [type=armor_stand,name=燃烧瓶,scores={燃烧瓶投掷=0}] ~~-50~ execute @e [type=snowball,tag=燃烧瓶,r=2,c=1] ~~50~ tp @e [type=armor_stand,name=燃烧瓶,scores={燃烧瓶投掷=0},r=2,c=1] ~~~
[燃烧瓶的效果]
execute @e [type=armor_stand,name=燃烧瓶,scores={燃烧瓶投掷=1..}] ~~~ tp @s ~~~~25
execute @e [type=armor_stand,name=燃烧瓶,scores={燃烧瓶投掷=1..}] ~~-50~ particle minecraft:mobflame_single ^^^1.6
execute @e [type=armor_stand,name=燃烧瓶,scores={燃烧瓶投掷=10..}] ~~-50~ particle minecraft:mobflame_single ^^^2.6
execute @e [type=armor_stand,name=燃烧瓶,scores={燃烧瓶投掷=20..}] ~~-50~ particle minecraft:mobflame_single ^^^3.6
execute @e [type=armor_stand,name=燃烧瓶,scores={燃烧瓶投掷=0..}] ~~~ effect @s invisibility 1 0 true
execute @e[type=armor_stand,name=燃烧瓶,scores={燃烧瓶投掷=1}] ~~-50~ playsound random.glass @a[r=50] ~ ~ ~ 100 2 100
{注意这里的100..是燃烧瓶保留的时间}
kill @e [type=armor_stand,name=燃烧瓶,scores={燃烧瓶投掷=100..}]
{注意这里的1是伤害}
execute @e[type=armor_stand,name=燃烧瓶,scores={燃烧瓶投掷=1..}] ~~-50~ damage @e[r=3.3]1 fire_tick entity @s
<第四部分>
[创建记分板]👍
/scoreboard objectives add 闪光弹投掷 dummy
[闪光弹的投掷]
scoreboard players add @e 闪光弹投掷 0
execute @e [type=snowball,tag=闪光弹,tag=已检测类别,scores={闪光弹投掷=0}] ~~~ summon armor_stand 闪光弹 ~~50~
execute @e [type=snowball,tag=闪光弹,tag=已检测类别,scores={闪光弹投掷=0}] ~~~ scoreboard players set @s 闪光弹投掷 1
scoreboard players add @e [type=armor_stand,name=闪光弹] 闪光弹投掷 1
execute @e [type=armor_stand,name=闪光弹,scores={闪光弹投掷=1}] ~~-50~ execute @e [type=snowball,tag=闪光弹,r=2,c=1] ~~50~ scoreboard players set @e [type=armor_stand,name=闪光弹,r=2,c=1,scores={闪光弹投掷=1}] 闪光弹投掷 0
execute @e [type=armor_stand,name=闪光弹,scores={闪光弹投掷=0}] ~~-50~ execute @e [type=snowball,tag=闪光弹,r=2,c=1] ~~50~ tp @e [type=armor_stand,name=闪光弹,scores={闪光弹投掷=0},r=2,c=1] ~~~
[闪光弹的效果]
execute @e [type=armor_stand,name=闪光弹,scores={闪光弹投掷=1..}] ~~~ tp @s ~~~~25
execute @e [type=armor_stand,name=闪光弹,scores={闪光弹投掷=2..}] ~~-50~ particle minecraft:totem_particle ^^^1
execute @e [type=armor_stand,name=闪光弹,scores={闪光弹投掷=1..3}] ~~-50~ particle minecraft:huge_explosion_lab_misc_emitter ~~~
execute @e [type=armor_stand,name=闪光弹,scores={闪光弹投掷=0..}] ~~~ effect @s invisibility 1 0 true
execute @e[type=armor_stand,name=闪光弹,scores={闪光弹投掷=1..3}] ~~-50~ playsound mob.enderdragon.growl @a[r=35] ~~~ 1 15 1
execute @e[type=armor_stand,name=闪光弹,scores={闪光弹投掷=1..3}] ~~-50~ effect @e [r=2.5]blindness 5 1 true
execute @e[type=armor_stand,name=闪光弹,scores={闪光弹投掷=1..3}] ~~-50~ effect @e [r=2.5]nausea 5 1 true
execute @e[type=armor_stand,name=闪光弹,scores={闪光弹投掷=1..3}] ~~-50~ effect @e [r=2.5]slowness 5 1 true
{注意这里的100..是保留的时间}
kill @e [type=armor_stand,name=闪光弹,scores={闪光弹投掷=50..}]
<第五部分>
[创建记分板]👍
/scoreboard objectives add 手榴弹投掷 dummy
/scoreboard objectives add 手榴倒计时 dummy
[手榴弹的投掷]
scoreboard players add @e 手榴弹投掷 0
execute @e [type=snowball,tag=手榴弹,tag=已检测类别,scores={手榴弹投掷=0}] ~~~ summon armor_stand 手榴弹 ~~50~
execute @e [type=snowball,tag=手榴弹,tag=已检测类别,scores={手榴弹投掷=0}] ~~~ scoreboard players set @s 手榴弹投掷 1
scoreboard players add @e [type=armor_stand,name=手榴弹] 手榴弹投掷 1
scoreboard players add @e [type=armor_stand,name=手榴弹] 手榴倒计时 1
execute @e [type=armor_stand,name=手榴弹,scores={手榴弹投掷=1}] ~~-50~ execute @e [type=snowball,tag=手榴弹,r=2,c=1] ~~50~ scoreboard players set @e [type=armor_stand,name=手榴弹,r=2,c=1,scores={手榴弹投掷=1}] 手榴弹投掷 0
execute @e [type=armor_stand,name=手榴弹,scores={手榴弹投掷=0}] ~~-50~ execute @e [type=snowball,tag=手榴弹,r=2,c=1] ~~50~ tp @e [type=armor_stand,name=手榴弹,scores={手榴弹投掷=0},r=2,c=1] ~~~
[手榴弹的效果]
execute @e [type=armor_stand,name=手榴弹,scores={手榴弹投掷=1..}] ~~~ detect ~~-50~ air 0 tp @s ~~-0.3~
execute @e [type=armor_stand,name=手榴弹,scores={手榴弹投掷=1..}] ~~~ tp @s @s
execute @e [type=armor_stand,name=手榴弹,scores={手榴弹投掷=2..}] ~~-49.7~ particle minecraft:balloon_gas_particle ~~~
execute @e [type=armor_stand,name=手榴弹,scores={手榴倒计时=50..}] ~~-50~ particle minecraft:huge_explosion_lab_misc_emitter ~~~
execute @e [type=armor_stand,name=手榴弹,scores={手榴弹投掷=0..}] ~~~ effect @s invisibility 1 0 true
execute @e[type=armor_stand,name=手榴弹,scores={手榴倒计时=50..}] ~~-50~ playsound random.explode @a [r=60] ~~~ 100 1 100
execute @e[type=armor_stand,name=手榴弹,scores={手榴倒计时=50..}] ~~-50~ damage @e [r=3]25 fire_tick entity @s
execute @e[type=armor_stand,name=手榴弹,scores={手榴倒计时=50..}] ~~-50~ damage @e[r=5]15 fire_tick entity @s
execute @e[type=armor_stand,name=手榴弹,scores={手榴倒计时=50..}] ~~-50~ effect @e [r=6]slowness 3 3 true
execute @e[type=armor_stand,name=手榴弹,scores={手榴倒计时=50..}] ~~-50~ effect @e [r=3]wither 3 1 true
execute @e[type=armor_stand,name=手榴弹,scores={手榴倒计时=50..}] ~~-50~ camerashake add @a [r=3] 2 1
execute @e[type=armor_stand,name=手榴弹,scores={手榴倒计时=50..}] ~~-50~ camerashake add @a [r=7] 1 0.5
kill @e [type=armor_stand,name=手榴弹,scores={手榴倒计时=50..}]
<第六部分>
[创建记分板]👍
/scoreboard objectives add 烟雾弹投掷 dummy
[烟雾弹的投掷]
scoreboard players add @e 烟雾弹投掷 0
execute @e [type=snowball,tag=烟雾弹,tag=已检测类别,scores={烟雾弹投掷=0}] ~~~ summon armor_stand 烟雾弹 ~~50~
execute @e [type=snowball,tag=烟雾弹,tag=已检测类别,scores={烟雾弹投掷=0}] ~~~ scoreboard players set @s 烟雾弹投掷 1
scoreboard players add @e [type=armor_stand,name=烟雾弹] 烟雾弹投掷 1
execute @e [type=armor_stand,name=烟雾弹,scores={烟雾弹投掷=1}] ~~-50~ execute @e [type=snowball,tag=烟雾弹,r=2,c=1] ~~50~ scoreboard players set @e [type=armor_stand,name=烟雾弹,r=2,c=1,scores={烟雾弹投掷=1}] 烟雾弹投掷 0
execute @e [type=armor_stand,name=烟雾弹,scores={烟雾弹投掷=0}] ~~-50~ execute @e [type=snowball,tag=烟雾弹,r=2,c=1] ~~50~ tp @e [type=armor_stand,name=烟雾弹,scores={烟雾弹投掷=0},r=2,c=1] ~~~
[烟雾弹的效果]
execute @e [type=armor_stand,name=烟雾弹,scores={烟雾弹投掷=1..}] ~~~ tp @s ~~~~25
execute @e [type=armor_stand,name=烟雾弹,scores={烟雾弹投掷=20..}] ~~-50~ particle minecraft:knockback_roar_particle ^^^1.6
execute @e [type=armor_stand,name=烟雾弹,scores={烟雾弹投掷=20..}] ~~-50~ particle minecraft:knockback_roar_particle ^^^-1.6
execute @e [type=armor_stand,name=烟雾弹,scores={烟雾弹投掷=20..}] ~~-50~ particle minecraft:knockback_roar_particle ^^^
execute @e [type=armor_stand,name=烟雾弹,scores={烟雾弹投掷=1..20}] ~~-50~ particle minecraft:misc_fire_vapor_particle ~~~
execute @e [type=armor_stand,name=烟雾弹,scores={烟雾弹投掷=0..}] ~~~ effect @s invisibility 1 0 true
execute @e[type=armor_stand,name=烟雾弹,scores={烟雾弹投掷=20..}] ~~-50~ playsound ambient.weather.thunder @a[r=40] ~~ 100 5 100
{注意这里的100..是保留的时间}
kill @e [type=armor_stand,name=烟雾弹,scores={烟雾弹投掷=160..}]