########################################################################
#                                                                      #
#                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                                           #
#                                                                      #
########################################################################

effect give @s minecraft:resistance 1 5 true

playsound minecraft:entity.spider_queen.hiss hostile @a ~ ~ ~ 1 0
playsound minecraft:entity.spider_queen.hiss hostile @a ~ ~ ~ 1 1
playsound minecraft:entity.spider_queen.step hostile @a ~ ~ ~ 1 1
attribute @s minecraft:generic.knockback_resistance base set 0.8
attribute @s minecraft:generic.follow_range base set 30
attribute @s minecraft:generic.armor base set 5
attribute @s minecraft:generic.movement_speed base set 0.25
attribute @s minecraft:generic.max_health base set 1024
attribute @s minecraft:generic.attack_damage base set 3
scoreboard players set @s spiderShowHealth 1024
data modify entity @s Health set value 1024
data modify entity @s Health set value 1024
data modify entity @s Silent set value 1b
data modify entity @s PersistenceRequired set value 1b
effect give @s minecraft:regeneration 16 0
effect give @s minecraft:invisibility 999999 0 true
data modify entity @s DeathLootTable set value "spider_queen:spider_queen"
effect give @s minecraft:strength 999999 0 true
item replace entity @s armor.feet with leather_boots{display:{Name:'{"text":"Spider Queen","italic":false}'},killme:1b,Enchantments:[{id:"minecraft:feather_falling",lvl:3s},{id:"minecraft:projectile_protection",lvl:8s}]} 1
fill ~1 ~1 ~1 ~-1 ~-1 ~-1 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
data modify entity @s CustomName set from entity @s ArmorItems[0].tag.display.Name

tag @s add spiderqueen

time set 12500

function spider_queen:scream