我的世界纯指令斯巴达之盾
前置:记分板:
/screboard objectives add cd dummy
/screboard objectives add 盾牌 dummy
盔甲架副手持盾:
/replaceitem entity @e[name=盾牌] slot.weapon.offhand 0 shield
指令:
1循环保持开启,无条件和延迟
execute as @e[name=转] at @s run tp ~~~~15
2连锁保持开启,无条件和延迟
execute as @e[tag=晕] at @s rotated as @e[name=转] positioned ^^3^0.7 run particle minecraft:endrod ^^^
3连锁保持开启,无条件和延迟
execute as @e[tag=晕] at @s rotated as @e[name=转] positioned ^^3^0.7 run particle minecraft:falling_dust_scaffolding_particle
4连锁保持开启,无条件和延迟
effect @e[tag=晕] blindness 2 10 true
5连锁保持开启,无条件和延迟
effect @e[tag=晕] slowness 2 100 true
6连锁保持开启,无条件和延迟
effect @e[tag=晕] weakness 2 10 true
7循环保持开启,无条件和延迟
testfor @e[tag=晕]
8脉冲红石控制,无条件,延迟40
tag @e[tag=晕] remove 晕
9循环保持开启,无条件和延迟
execute as @a[hasitem={item=shield,location=slot.weapon.offhand},scores={cd=0}] at @s positioned ~~1.52~ if entity @s[dy=-0.5] unless entity @s[dy=0.5] at @s run tag @s add 撞
10连锁保持开启,无条件和延迟
execute as @a[hasitem={item=shield,location=slot.weapon.offhand},scores={cd=0},tag=撞] at @s positioned ~~1.52~ if entity @s[dy=-0.5] unless entity @s[dy=0.5] at @s run tp @s ^^^2 true
11连锁保持开启,无条件和延迟
execute as @a[hasitem={item=shield,location=slot.weapon.offhand}] at @s positioned ~~1.52~ if entity @s[dy=-0.5] unless entity @s[dy=0.5] at @s run scoreboard players set @s[scores={cd=0}] cd 3
12连锁保持开启,无条件和延迟
execute as @a[hasitem={item=shield,location=slot.weapon.offhand},tag=撞] at @s positioned ~~1.52~ if entity @s[dy=-0.5] unless entity @s[dy=0.5] at @s run damage @e[r=1.5,tag=!撞,name=!转,name=!盾牌] 5 contact entity @s
13连锁保持开启,无条件和延迟
execute as @a[hasitem={item=shield,location=slot.weapon.offhand},tag=撞] at @s positioned ~~1.52~ if entity @s[dy=-0.5] unless entity @s[dy=0.5] at @s if entity @e[r=1.5,tag=!撞] run particle minecraft:sonic_explosion
14连锁保持开启,无条件和延迟
execute as @a[hasitem={item=shield,location=slot.weapon.offhand},tag=撞] at @s positioned ~~1.52~ if entity @s[dy=-0.5] unless entity @s[dy=0.5] at @s run tag @e[r=1.5,tag=!撞,name=!转,name=!盾牌] add 晕
15连锁保持开启,无条件和延迟
execute as @e[tag=晕] at @s rotated as @a[tag=撞,r=2,c=1] positioned ^^^1 run tp @s ^^^0.9 facing ^^^2
16连锁保持开启,无条件和延迟
execute at @e[tag=撞] run particle minecraft:cauldron_explosion_emitter ^^^-1
17连锁保持开启,有条件无延迟
tag @a[tag=撞] remove 撞
18循环保持开启,无条件,延迟20
scoreboard players remove @e[scores={cd=1..}] cd 1
(已有此指令的可以不写)
19循环保持开启,无条件和延迟
execute as @a[hasitem={item=shield,location=slot.weapon.mainhand}] at @s positioned ~~1.52~ if entity @s[dy=-0.5] unless entity @s[dy=0.5] at @s run tag @s add 扔
20连锁保持开启,无条件和延迟
execute as @a[hasitem={item=shield,location=slot.weapon.mainhand}] at @s positioned ~~1.52~ if entity @s[dy=-0.5] unless entity @s[dy=0.5] at @s run structure load 盾牌 ^^-1^
21连锁保持开启,无条件和延迟
execute as @a[hasitem={item=shield,location=slot.weapon.mainhand}] at @s positioned ~~1.52~ if entity @s[dy=-0.5] unless entity @s[dy=0.5] at @s run replaceitem entity @s slot.weapon.mainhand 0 air
22连锁保持开启,无条件和延迟
execute as @e[name=盾牌,tag=!盾牌,type=armor_stand] at @s rotated as @a[tag=扔,c=1] positioned ^^^1 run tp @s ^^^2 facing ^^^1
23连锁保持开启,有条件无延迟
tag @e[name=盾牌,type=armor_stand] add 盾牌
24连锁保持开启,有条件无延迟
execute as @e[name=盾牌,tag=盾牌,type=armor_stand] at @s unless score @s "盾牌" matches ! 0 run scoreboard players set @s 盾牌 100
25连锁保持开启,无条件和延迟
execute as @e[name=盾牌,tag=盾牌,scores={盾牌=2..},type=armor_stand] at @s run tp ^^^1.5 facing ^^^10
26连锁保持开启,无条件和延迟
execute as @e[name=盾牌,tag=盾牌,scores={盾牌=2..},type=armor_stand] at @s run tp ~~~~10
27连锁保持开启,无条件和延迟
execute as @e[name=盾牌,scores={盾牌=1},type=armor_stand] at @s run tp ^^^0.8 facing @a[tag=扔,c=1]
28连锁保持开启,无条件和延迟
execute as @a[tag=扔] at @s if entity @e[name=盾牌,scores={盾牌=1},r=1,type=armor_stand] run give @s shield 1
29连锁保持开启,有条件无延迟
execute as @a[tag=扔] at @s if entity @e[name=盾牌,scores={盾牌=1},r=1,type=armor_stand] run kill @e[r=1,scores={盾牌=1},name=盾牌]
30循环保持开启,无条件,延迟1
scoreboard players remove @e[name=盾牌,scores={盾牌=2..}] 盾牌 1
31循环保持开启,无条件和延迟
execute as @e[tag=!扔,name=!盾牌,type=!boat] at @s if entity @e[name=盾牌,r=2] run damage @s 10 contact entity @e[name=盾牌,r=2,c=1]
32循环保持开启,无条件和延迟
kill @e[type=item]
(此指令只是清除盾牌的,不然会刷出两个盾牌,当然,可以换成别的清除方式)
33循环保持开启,无条件和延迟
effect @e[name=盾牌] invisibility 100 100 true
34循环保持开启,无条件和延迟
execute as @e[name=盾牌] at @s run particle minecraft:evocation_fang_particle ^^1.5^-1