###Builds the wither platform###
tp @s ~ ~2 ~
execute at @s run execute at @s run place template nitk:generated/hell_siege ~-7 ~ ~-7

###Summons the Tyrant###
execute at @s run summon minecraft:wither ~ ~1 ~ {Attributes:[{Name:"generic.movement_speed",Base:0.1f}],CustomName:'{"text":"The Tyrant"}',CustomNameVisible:0b,PersistenceRequired:1b,Tags:[nitEntity,smithed.entity,smithed.strict,nitTyrant],DeathLootTable:"nitk:entities/tyrant_end"}
execute at @s run setblock ~ ~ ~ minecraft:repeating_command_block{Command:"function nitref:invasion/wither_hold",auto:1b} replace

###Progress the invasion score and performs cosmetics###
scoreboard players set @a[predicate=nitref:end_dimension] nitInvadeProg 0
execute at @s run summon minecraft:lightning_bolt ~-2 ~ ~-2

tellraw @a[predicate=nitref:end_dimension] [{"text":"[۩]","color":"green","bold":true},{"text":": ","color":"white","bold":false},{"text":"The Tyrant has emerged! Destoy him one final time!","color":"dark_red"}]