Рет қаралды 7,126
scoreboard objectives add dam minecraft.custom:minecraft.damage_dealt
tag @p add 1
execute as @e[scores={dam=1..},tag=1] run scoreboard players reset @s dam
execute as @e[tag=1] at @s as @e[sort=nearest,tag=!1,type=!item,limit=원하는 값] run data merge entity @s {Tags:["d"],NoAI:1b}
effect give @e[tag=d] minecraft:slowness 9999 255 true
scoreboard objectives add time dummy
execute as @e[tag=1] at @s run scoreboard players add @s time 1
execute as @e[tag=d] at @s run particle minecraft:dust 2 0 0 1 ~ ~1 ~ .3 .5 .3 0.1 10 force
execute as @e[tag=1,scores={time=20..}] at @s run scoreboard players reset @s time
execute as @e[tag=d] at @s run kill @s
scoreboard objectives remove time