schedule function kiwi3:relics/eye_of_night/eye_of_night_block 5t append
execute at @a[nbt={Inventory:[{id:"minecraft:ender_eye",Slot:103b,components:{"minecraft:custom_data":{eye_of_night:1b}}}]}] at @e[type=#impact_projectiles,distance=..8,nbt={inGround:0b},tag=!eye_of_night_blocked] run playsound minecraft:block.fire.extinguish master @a[distance=..12] ~ ~ ~ 1 2
execute at @a[nbt={Inventory:[{id:"minecraft:ender_eye",Slot:103b,components:{"minecraft:custom_data":{eye_of_night:1b}}}]}] at @e[type=#impact_projectiles,distance=..8,nbt={inGround:0b},tag=!eye_of_night_blocked] run particle dust{color:[0.525,0.263,0.639],scale:1} ~ ~ ~ 0.2 0.2 0.2 0.1 25 normal
execute at @a[nbt={Inventory:[{id:"minecraft:ender_eye",Slot:103b,components:{"minecraft:custom_data":{eye_of_night:1b}}}]}] as @e[type=#impact_projectiles,distance=..8,nbt={inGround:0b},tag=!eye_of_night_blocked] run data merge entity @s {NoGravity:1b,Motion:[0.0,0.0,0.0]}
execute at @a[nbt={Inventory:[{id:"minecraft:ender_eye",Slot:103b,components:{"minecraft:custom_data":{eye_of_night:1b}}}]}] as @e[type=#impact_projectiles,distance=..8,nbt={inGround:0b},tag=!eye_of_night_blocked] run title @p[nbt={Inventory:[{id:"minecraft:ender_eye",Slot:103b,components:{"minecraft:custom_data":{eye_of_night:1b}}}]}] actionbar [{"text":"✖ ", "color":"dark_red", "bold":true},{"selector":"@s", "color":"red", "bold":true},{"text":" ✖", "color":"dark_red", "bold":true}]
execute at @a[nbt={Inventory:[{id:"minecraft:ender_eye",Slot:103b,components:{"minecraft:custom_data":{eye_of_night:1b}}}]}] run summon area_effect_cloud ~ ~ ~ {Particle:{type:"portal"},Radius:4f,RadiusPerTick:0f,Duration:5,potion_contents:{custom_color:12212420}}
execute at @a[nbt={Inventory:[{id:"minecraft:ender_eye",Slot:103b,components:{"minecraft:custom_data":{eye_of_night:1b}}}]}] at @e[type=#impact_projectiles,distance=..8,nbt={OnGround:0b},tag=!eye_of_night_blocked] run playsound minecraft:block.fire.extinguish master @a[distance=..12] ~ ~ ~ 0.5 2
execute at @a[nbt={Inventory:[{id:"minecraft:ender_eye",Slot:103b,components:{"minecraft:custom_data":{eye_of_night:1b}}}]}] at @e[type=#impact_projectiles,distance=..8,nbt={OnGround:0b},tag=!eye_of_night_blocked] run particle dust{color:[0.525,0.263,0.639],scale:1} ~ ~ ~ 0.2 0.2 0.2 0.1 25 normal
execute at @a[nbt={Inventory:[{id:"minecraft:ender_eye",Slot:103b,components:{"minecraft:custom_data":{eye_of_night:1b}}}]}] as @e[type=#impact_projectiles,distance=..8,nbt={OnGround:0b},tag=!eye_of_night_blocked] run data merge entity @s {NoGravity:1b,Motion:[0.0,0.0,0.0]}
execute at @a[nbt={Inventory:[{id:"minecraft:ender_eye",Slot:103b,components:{"minecraft:custom_data":{eye_of_night:1b}}}]}] as @e[type=#impact_projectiles,distance=..8,nbt={OnGround:0b},tag=!eye_of_night_blocked] run title @p[nbt={Inventory:[{id:"minecraft:ender_eye",Slot:103b,components:{"minecraft:custom_data":{eye_of_night:1b}}}]}] actionbar [{"text":"✖ ", "color":"dark_red", "bold":true},{"selector":"@s", "color":"red", "bold":true},{"text":" ✖", "color":"dark_red", "bold":true}]
execute at @a[nbt={Inventory:[{id:"minecraft:ender_eye",Slot:103b,components:{"minecraft:custom_data":{eye_of_night:1b}}}]}] as @e[type=#impact_projectiles,distance=..8,nbt={OnGround:0b},tag=!eye_of_night_blocked] run playsound minecraft:entity.arrow.hit_player master @a[distance=..12] ~ ~ ~ 1 2
execute at @a[nbt={Inventory:[{id:"minecraft:ender_eye",Slot:103b,components:{"minecraft:custom_data":{eye_of_night:1b}}}]}] run tag @e[type=#impact_projectiles,distance=..8,nbt={inGround:0b},tag=!eye_of_night_blocked] add eye_of_night_blocked
execute at @a[nbt={Inventory:[{id:"minecraft:ender_eye",Slot:103b,components:{"minecraft:custom_data":{eye_of_night:1b}}}]}] run tag @e[type=#impact_projectiles,distance=..8,nbt={OnGround:0b},tag=!eye_of_night_blocked] add eye_of_night_blocked
schedule function kiwi3:relics/eye_of_night/eye_of_night_block_kill 20t append