

execute at @s positioned ~ ~ ~ run fill ~3 ~ ~-14 ~-3 ~ ~14 grass_block replace #suhc:treerootreplace
execute at @s positioned ~5 ~ ~ run fill ~1 ~ ~-13 ~-1 ~ ~13 grass_block replace #suhc:treerootreplace
execute at @s positioned ~-5 ~ ~ run fill ~1 ~ ~-13 ~-1 ~ ~13 grass_block replace #suhc:treerootreplace
execute at @s positioned ~7 ~ ~ run fill ~1 ~ ~-12 ~ ~ ~12 grass_block replace #suhc:treerootreplace
execute at @s positioned ~-7 ~ ~ run fill ~-1 ~ ~-12 ~ ~ ~12 grass_block replace #suhc:treerootreplace
execute at @s positioned ~9 ~ ~ run fill ~ ~ ~-11 ~ ~ ~11 grass_block replace #suhc:treerootreplace
execute at @s positioned ~-9 ~ ~ run fill ~ ~ ~-11 ~ ~ ~11 grass_block replace #suhc:treerootreplace
execute at @s positioned ~10 ~ ~ run fill ~ ~ ~-10 ~ ~ ~10 grass_block replace #suhc:treerootreplace
execute at @s positioned ~-10 ~ ~ run fill ~ ~ ~-10 ~ ~ ~10 grass_block replace #suhc:treerootreplace
execute at @s positioned ~11 ~ ~ run fill ~ ~ ~-9 ~ ~ ~9 grass_block replace #suhc:treerootreplace
execute at @s positioned ~-11 ~ ~ run fill ~ ~ ~-9 ~ ~ ~9 grass_block replace #suhc:treerootreplace
execute at @s positioned ~12 ~ ~ run fill ~ ~ ~-8 ~ ~ ~8 grass_block replace #suhc:treerootreplace
execute at @s positioned ~-12 ~ ~ run fill ~ ~ ~-8 ~ ~ ~8 grass_block replace #suhc:treerootreplace
execute at @s positioned ~13 ~ ~ run fill ~ ~ ~-6 ~ ~ ~6 grass_block replace #suhc:treerootreplace
execute at @s positioned ~-13 ~ ~ run fill ~ ~ ~-6 ~ ~ ~6 grass_block replace #suhc:treerootreplace
execute at @s positioned ~14 ~ ~ run fill ~ ~ ~-3 ~ ~ ~3 grass_block replace #suhc:treerootreplace
execute at @s positioned ~-14 ~ ~ run fill ~ ~ ~-3 ~ ~ ~3 grass_block replace #suhc:treerootreplace


setblock ~ ~ ~ minecraft:structure_block[mode=load]{name:"suhc:treecove",posX:-13,posZ:-13,posY:1,rotation:NONE,mirror:NONE,mode:LOAD,ignoreEntities:0b} destroy
setblock ~ ~1 ~ redstone_block


setblock ~ ~-3 ~ minecraft:structure_block[mode=load]{name:"suhc:treeroots",posX:-8,posZ:-8,posY:-1,rotation:NONE,mirror:NONE,mode:LOAD,ignoreEntities:0b} destroy
setblock ~ ~-4 ~ redstone_block

execute at @s run tp @s ~ ~-3 ~

execute at @s[tag=KyuDeadTree] run tag @e[type=minecraft:armor_stand,distance=..10,tag=KyuTreeRoot] add KyuDeadTree
execute at @s[tag=KyuDeadTree] positioned ~ ~5 ~ run fill ~-19 ~-3 ~-19 ~14 ~14 ~14 air replace shroomlight
execute at @s[tag=KyuDeadTree] positioned ~ ~5 ~ run fill ~-13 ~ ~-13 ~14 ~14 ~12 air replace dark_oak_leaves
execute at @s[tag=KyuDeadTree] positioned ~ ~7 ~ run summon tnt
execute at @s[tag=KyuDeadTree] positioned ~ ~5 ~ run summon tnt
execute at @s[tag=KyuDeadTree] positioned ~-4 ~3 ~-1 run summon tnt
execute at @s[tag=KyuDeadTree] positioned ~ ~ ~ run fill ~-5 ~-5 ~-5 ~5 ~5 ~5 air replace water
execute at @s[tag=KyuDeadTree] positioned ~ ~ ~ run fill ~-5 ~-5 ~-5 ~5 ~5 ~5 air replace dark_oak_slab
execute at @s[tag=KyuDeadTree] positioned ~ ~ ~ run fill ~-3 ~-3 ~-3 ~-1 ~1 ~3 air replace command_block
execute at @s[tag=KyuDeadTree] positioned ~ ~ ~ run fill ~-7 ~-1 ~-7 ~7 ~-1 ~7 dark_oak_wood
execute at @s[tag=KyuDeadTree] positioned ~ ~ ~4 run fill ~ ~ ~ ~ ~2 ~ air

execute at @s[tag=KyuDeadTree] positioned ~ ~1 ~ run summon vindicator ~ ~ ~4 {PersistenceRequired:1b,AbsorptionAmount:10f,HandItems:[{id:"minecraft:diamond_axe",Count:1b,tag:{Enchantments:[{id:"minecraft:sharpness",lvl:1s}]}},{}],HandDropChances:[-1.000F,0.085F],active_effects:[{id:"minecraft:speed",amplifier:0b,duration:90000},{id:"minecraft:regeneration",amplifier:5b,duration:50},{id:"minecraft:resistance",amplifier:0b,duration:90000},{id:"minecraft:fire_resistance",amplifier:0b,duration:90000}]}
execute at @s[tag=KyuDeadTree] positioned ~ ~1 ~ run summon vindicator ~ ~ ~4 {PersistenceRequired:1b,AbsorptionAmount:10f,HandItems:[{id:"minecraft:diamond_axe",Count:1b,tag:{Enchantments:[{id:"minecraft:sharpness",lvl:1s}]}},{}],HandDropChances:[-1.000F,0.085F],active_effects:[{id:"minecraft:speed",amplifier:0b,duration:90000},{id:"minecraft:regeneration",amplifier:5b,duration:50},{id:"minecraft:resistance",amplifier:0b,duration:90000},{id:"minecraft:fire_resistance",amplifier:0b,duration:90000}]}
execute at @s[tag=KyuDeadTree] positioned ~ ~1 ~ run summon vindicator ~ ~ ~4 {PersistenceRequired:1b,AbsorptionAmount:10f,HandItems:[{id:"minecraft:diamond_axe",Count:1b,tag:{Enchantments:[{id:"minecraft:sharpness",lvl:1s}]}},{}],HandDropChances:[-1.000F,0.085F],active_effects:[{id:"minecraft:speed",amplifier:0b,duration:90000},{id:"minecraft:regeneration",amplifier:5b,duration:50},{id:"minecraft:resistance",amplifier:0b,duration:90000},{id:"minecraft:fire_resistance",amplifier:0b,duration:90000}]}
execute at @s[tag=KyuDeadTree] positioned ~ ~1 ~ run summon vindicator ~ ~ ~4 {PersistenceRequired:1b,AbsorptionAmount:10f,HandItems:[{id:"minecraft:diamond_axe",Count:1b,tag:{Enchantments:[{id:"minecraft:sharpness",lvl:1s}]}},{}],HandDropChances:[-1.000F,0.085F],active_effects:[{id:"minecraft:speed",amplifier:0b,duration:90000},{id:"minecraft:regeneration",amplifier:5b,duration:50},{id:"minecraft:resistance",amplifier:0b,duration:90000},{id:"minecraft:fire_resistance",amplifier:0b,duration:90000}]}


execute at @s[tag=KyuDeadTree] positioned ~ ~1 ~ run summon pillager ~ ~ ~4 {PersistenceRequired:1b,AbsorptionAmount:10f,HandItems:[{id:"minecraft:crossbow",Count:1b,tag:{Enchantments:[{id:"minecraft:quick_charge",lvl:1s}]}},{}],active_effects:[{id:"minecraft:speed",amplifier:0b,duration:90000},{id:"minecraft:regeneration",amplifier:5b,duration:50},{id:"minecraft:resistance",amplifier:0b,duration:90000},{id:"minecraft:fire_resistance",amplifier:0b,duration:90000}]}
execute at @s[tag=KyuDeadTree] positioned ~ ~1 ~ run summon pillager ~ ~ ~4 {PersistenceRequired:1b,AbsorptionAmount:10f,HandItems:[{id:"minecraft:crossbow",Count:1b,tag:{Enchantments:[{id:"minecraft:quick_charge",lvl:1s}]}},{}],active_effects:[{id:"minecraft:speed",amplifier:0b,duration:90000},{id:"minecraft:regeneration",amplifier:5b,duration:50},{id:"minecraft:resistance",amplifier:0b,duration:90000},{id:"minecraft:fire_resistance",amplifier:0b,duration:90000}]}
execute at @s[tag=KyuDeadTree] positioned ~ ~1 ~ run summon pillager ~ ~ ~4 {PersistenceRequired:1b,AbsorptionAmount:10f,HandItems:[{id:"minecraft:crossbow",Count:1b,tag:{Enchantments:[{id:"minecraft:quick_charge",lvl:1s}]}},{}],active_effects:[{id:"minecraft:speed",amplifier:0b,duration:90000},{id:"minecraft:regeneration",amplifier:5b,duration:50},{id:"minecraft:resistance",amplifier:0b,duration:90000},{id:"minecraft:fire_resistance",amplifier:0b,duration:90000}]}
execute at @s[tag=KyuDeadTree] positioned ~ ~1 ~ run summon pillager ~ ~ ~4 {PersistenceRequired:1b,AbsorptionAmount:10f,HandItems:[{id:"minecraft:crossbow",Count:1b,tag:{Enchantments:[{id:"minecraft:quick_charge",lvl:1s}]}},{}],active_effects:[{id:"minecraft:speed",amplifier:0b,duration:90000},{id:"minecraft:regeneration",amplifier:5b,duration:50},{id:"minecraft:resistance",amplifier:0b,duration:90000},{id:"minecraft:fire_resistance",amplifier:0b,duration:90000}]}


execute at @s[tag=KyuDeadTree] positioned ~ ~1 ~ run summon evoker ~ ~ ~4 {PersistenceRequired:1b,AbsorptionAmount:20f,active_effects:[{id:"minecraft:speed",amplifier:0b,duration:90000},{id:"minecraft:regeneration",amplifier:5b,duration:50},{id:"minecraft:resistance",amplifier:1b,duration:90000},{id:"minecraft:fire_resistance",amplifier:0b,duration:90000}]}

execute at @s run fill ~-11 ~ ~-11 ~11 ~3 ~11 redstone_ore replace warped_hyphae
execute at @s run execute as @e[type=minecraft:armor_stand,distance=..10,tag=KyuTreeRoot] run function zzzzdonotuse:structures/tree/treerootmain
execute at @s run fill ~-11 ~ ~-11 ~11 ~4 ~11 dark_oak_wood replace redstone_ore
execute at @s run fill ~-6 ~3 ~-6 ~6 ~3 ~6 dark_oak_wood replace dirt
execute at @s run fill ~-6 ~3 ~-6 ~6 ~3 ~6 dark_oak_wood replace grass_block
kill @e[type=item,distance=..20]
fill ~-6 ~-4 ~-6 ~6 ~6 ~6 air replace structure_block
execute at @s positioned ~-5 ~ ~2 run fill ~ ~ ~ ~ ~2 ~ air



kill @s