execute as @e[type=#zombies,tag=!plussed] run function survivalplus:mobs/antileaderzom
execute as @e[type=#survivalplus:trial_mobs,predicate=survivalplus:in_trial_chamber,tag=!plussed] at @s run function survivalplus:mobs/trial_chamber/mobs
effect give @e[type=spider,predicate=!survivalplus:25chance,tag=!plussed] weaving infinite 0 true
effect give @e[predicate=survivalplus:spider_biome,tag=!plussed,type=!player] weaving infinite

#non despawnable via less_spawn trinket
execute if entity @e[type=armor_stand,tag=!plussed] run function survivalplus:mobs/armor_stand
execute if entity @e[type=bee,tag=!plussed] run function survivalplus:mobs/bee
execute if entity @e[type=creaking,tag=!plussed] run function survivalplus:mobs/creaking
execute if entity @e[type=elder_guardian,tag=!plussed] run function survivalplus:mobs/elder_guardian
execute if entity @e[type=ender_dragon,tag=!plussed] run function survivalplus:mobs/ender_dragon
execute if entity @e[type=fireball,tag=!plussed] run function survivalplus:mobs/fireball
execute if entity @e[type=giant,tag=!plussed] run function survivalplus:mobs/giant
execute if entity @e[type=iron_golem,tag=!plussed] run function survivalplus:mobs/iron_golem
execute if entity @e[type=item,tag=!plussed] run function survivalplus:mobs/item
execute if entity @e[type=ravager,tag=!plussed] run function survivalplus:mobs/ravager
execute if entity @e[type=skeleton_horse,tag=!plussed] run function survivalplus:mobs/skeleton_horse
execute if entity @e[type=trident,tag=!plussed] run function survivalplus:mobs/trident
execute if entity @e[type=villager,tag=!plussed] run function survivalplus:mobs/villager
execute if entity @e[type=wandering_trader,tag=!plussed] run function survivalplus:mobs/wandering_trader
execute if entity @e[type=warden,tag=!plussed] run function survivalplus:mobs/warden
execute if entity @e[type=wither,tag=!plussed] run function survivalplus:mobs/wither
execute if entity @e[type=wolf,tag=!plussed] run function survivalplus:mobs/wolf
execute if entity @e[type=zombie_villager,tag=!plussed] run function survivalplus:mobs/zombie_villager

#despawnable via less_spawn trinket
execute if score dangerquest sanity matches 1 if entity @e[tag=findme] as @e[type=#survivalplus:changed,tag=!plussed] at @s unless entity @a[distance=..20] run function survivalplus:mobs/vanish
execute as @e[type=#survivalplus:changed,tag=!plussed,predicate=survivalplus:25chance] at @s if entity @a[distance=..100,predicate=survivalplus:less_spawn] run function survivalplus:mobs/vanish
execute if entity @e[type=blaze,tag=!plussed] run function survivalplus:mobs/blaze
execute if entity @e[type=bogged,tag=!plussed] run function survivalplus:mobs/bogged
execute if entity @e[type=cave_spider,tag=!plussed] run function survivalplus:mobs/cave_spider
execute if entity @e[type=creeper,tag=!plussed] run function survivalplus:mobs/creeper
execute if entity @e[type=drowned,tag=!plussed] run function survivalplus:mobs/drowned
execute if entity @e[type=enderman,tag=!plussed] run function survivalplus:mobs/enderman
execute if entity @e[type=evoker,tag=!plussed] run function survivalplus:mobs/evoker
execute if entity @e[type=guardian,tag=!plussed] run function survivalplus:mobs/guardian
execute if entity @e[type=husk,tag=!plussed] run function survivalplus:mobs/husk
execute if entity @e[type=lightning_bolt,tag=!plussed] run function survivalplus:mobs/lightning_bolt
execute if entity @e[type=magma_cube,tag=!plussed] run function survivalplus:mobs/magma_cube
execute if entity @e[type=phantom,tag=!plussed] run function survivalplus:mobs/phantom
execute if entity @e[type=piglin,tag=!plussed] run function survivalplus:mobs/piglin
execute if entity @e[type=piglin_brute,tag=!plussed] run function survivalplus:mobs/piglin_brute
execute if entity @e[type=pillager,tag=!plussed] run function survivalplus:mobs/pillager
execute if entity @e[type=skeleton,tag=!plussed] run function survivalplus:mobs/skeleton
execute if entity @e[type=slime,tag=!plussed] run function survivalplus:mobs/slime
execute if entity @e[type=spider,tag=!plussed] run function survivalplus:mobs/spider
execute if entity @e[type=stray,tag=!plussed] run function survivalplus:mobs/stray
execute if entity @e[type=vex,tag=!plussed] run function survivalplus:mobs/vex
execute if entity @e[type=vindicator,tag=!plussed] run function survivalplus:mobs/vindicator
execute if entity @e[type=witch,tag=!plussed] run function survivalplus:mobs/witch
execute if entity @e[type=wither_skeleton,tag=!plussed] run function survivalplus:mobs/wither_skeleton
execute if entity @e[type=zombie,tag=!plussed] run function survivalplus:mobs/zombie
execute if entity @e[type=zombified_piglin,tag=!plussed] run function survivalplus:mobs/zombified_piglin
#execute if entity @e[type=#survivalplus:can_wear_armor,tag=!RanEn,tag=!boss] run function survivalplus:tools/armor/random_enchant
effect give @e[tag=spawner] resistance infinite 2 true
effect give @e[tag=healwiz] fire_resistance infinite
effect give @e[tag=swap_mage] resistance infinite
effect give @e[tag=poly_mage] strength infinite
execute as @e[tag=invisme] run effect give @s invisibility infinite
tag @e remove invisme
execute as @e[predicate=survivalplus:armordropfix,tag=!dropfix] run function survivalplus:mobs/armordropfix
#execute as @e[type=#survivalplus:changed,type=#survivalplus:notalive,predicate=survivalplus:nonheadenchant] run data remove entity @s equipment.head.components."minecraft:enchantments"