########################################################################
#                                                                      #
#                This Datapack was created by DinoBrik                 #
#                                                                      #
#     Channel:https://www.youtube.com/channel/UCIp3cX9qknsCvGuEHu6Z7qw #
#     Discord: https://discord.gg/XTAJhU9                              #
#                                                                      #
# -------------------------------------------------------------------- #
#                            DATAPACK INFO                             #
# -------------------------------------------------------------------- #
#                                                                      #
#          Author: DinoBrik                                            #
#          URL: Listed Above                                           #
#                                                                      #
########################################################################

tag @s add scream
function spider_queen_ani:animations/animation.model.idle/stop
function spider_queen_ani:animations/animation.model.walk/stop


effect give @s minecraft:slowness 5 10 true
playsound minecraft:entity.spider_queen.scream hostile @a ~ ~ ~ 4
particle dust 0.902 0.000 0.000 1 ~ ~1 ~ 2 1 2 1 30 normal

effect give @s minecraft:regeneration 3 3

effect give @e[type=#spider_queen:arthropods,distance=..64] speed 18 1 
effect give @e[type=#spider_queen:arthropods,distance=..64] strength 18 1
execute at @e[type=#spider_queen:arthropods,distance=..64] run fill ~-0.2 ~ ~-0.2 ~0.1 ~ ~0.2 cobweb replace #spider_queen:raycast_pass
fill ~ ~-1 ~1 ~ ~-1 ~1 minecraft:rooted_dirt replace #minecraft:dirt
fill ~-1 ~-1 ~-2 ~-1 ~-1 ~-2 minecraft:rooted_dirt replace #minecraft:dirt
schedule function spider_queen:screamend 80
function spider_queen_ani:animations/animation.model.scream/play

tag @s remove webed