Guest User

Untitled

a guest
Jan 3rd, 2025
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.39 KB | None | 0 0
  1. #debug
  2.  
  3. #init
  4. execute if entity @e[type=minecraft:ender_dragon] unless entity @e[type=marker,tag=master] run schedule function custom_ender_dragon:init 1s append
  5.  
  6.  
  7. #dragon_phase 0
  8. execute if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=0}] run data merge entity @e[type=minecraft:ender_dragon,limit=1] {CustomName:' "Ender Dragon" '}
  9. execute store result score @e[tag=master] dragon_health run data get entity @e[type=minecraft:ender_dragon,limit=1] Health
  10. execute store result bossbar minecraft:0 value run data get entity @e[type=minecraft:ender_dragon,limit=1] Health
  11. execute if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=0,dragon_health=..100}] run function custom_ender_dragon:p1t/main
  12. execute if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=0,dragon_health=..100}] run scoreboard players set @e[type=marker,tag=master] dragon_phase 1
  13.  
  14.  
  15. #dragon_phase 1/2
  16. execute if score @e[type=marker,tag=master,limit=1] dragon_phase matches 1..2 run data merge entity @e[type=minecraft:ender_dragon,limit=1] {DragonPhase:5}
  17. execute if score @e[type=marker,tag=master,limit=1] dragon_phase matches 1..2 run kill @e[type=dragon_fireball]
  18. execute if score @e[type=marker,tag=master,limit=1] dragon_phase matches 1..2 in the_end positioned 0 100 0 run kill @e[type=area_effect_cloud,distance=..300]
  19. execute if score @e[tag=master,limit=1] dragon_phase matches 2 run scoreboard players add @e[tag=master,limit=1] dragon_p1t_health 5
  20. execute if score @e[tag=master,limit=1] dragon_phase matches 2 run execute store result bossbar minecraft:custom_dragon value run scoreboard players get @e[tag=master,limit=1] dragon_p1t_health
  21. execute if score @e[tag=master,limit=1] dragon_phase matches 2 run execute at @e[tag=end_crystal_marker] run particle minecraft:dust 0.73 0 1 5 ~ ~ ~ 2 30 2 1 1 force
  22.  
  23. #dragon_phase 3
  24. execute if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=3,dragon_health=..350}] run function custom_ender_dragon:p2t/main
  25. execute if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=3,dragon_health=..350}] run scoreboard players set @e[type=marker,tag=master] dragon_phase 4
  26.  
  27.  
  28. #dragon_phase 4
  29. execute if score @e[type=marker,tag=master,limit=1] dragon_phase matches 4 run data merge entity @e[type=minecraft:ender_dragon,limit=1] {DragonPhase:5}
  30.  
  31.  
  32. #dragon_phase 5
  33. execute if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=5,dragon_health=..200}] run function custom_ender_dragon:p3t/main
  34. execute if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=5,dragon_health=..200}] run scoreboard players set @e[type=marker,tag=master] dragon_phase 6
  35.  
  36. #dragon_phase 6/7/8/9/10/11
  37. execute if score @e[type=marker,tag=master,limit=1] dragon_phase matches 6..11 in the_end positioned 0 100 0 run kill @e[type=area_effect_cloud,distance=..300]
  38. execute if score @e[type=marker,tag=master,limit=1] dragon_phase matches 6..11 run data merge entity @e[type=minecraft:ender_dragon,limit=1] {DragonPhase:5}
  39. execute as @e[tag=nether_star_clear] at @s unless entity @e[type=wither,tag=phase_4_mob] run function custom_ender_dragon:p4/clear_nether_star
  40. execute unless entity @e[tag=phase_4_mob] if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=7}] at @e[tag=summon_portal] run function custom_ender_dragon:p4/wave_2
  41. execute unless entity @e[tag=phase_4_mob] if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=8}] at @e[tag=summon_portal] run function custom_ender_dragon:p4/wave_3
  42. execute unless entity @e[tag=phase_4_mob] if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=9}] at @e[tag=summon_portal] run function custom_ender_dragon:p4/wave_4
  43. execute unless entity @e[tag=phase_4_mob] if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=10}] at @e[tag=summon_portal] run function custom_ender_dragon:p4/wave_5
  44. execute unless entity @e[tag=phase_4_mob] if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=11}] at @e[tag=summon_portal] run function custom_ender_dragon:p4t/main_1
  45.  
  46. #dragon_phase 12
  47. execute if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=12,dragon_health=..125}] run function custom_ender_dragon:p5/subphase_2
  48.  
  49. #dragon_phase 13
  50. execute if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=13,dragon_health=..50}] run function custom_ender_dragon:p5/subphase_3
  51.  
  52. #dragon_phase 14
  53. execute if entity @e[type=minecraft:marker,tag=master,scores={dragon_phase=14}] if score @e[tag=master,limit=1] dragon_health matches ..0 run function custom_ender_dragon:p5/end
  54.  
  55.  
  56. #glass pillars
  57. execute as @e[tag=glass_pillar] at @s run kill @e[type=end_crystal,distance=..5]
  58. execute as @e[tag=glass_pillar] at @s run tp ~ ~-0.125 ~
  59. execute as @e[tag=glass_destroyer] at @s run tp ~ ~-0.125 ~
  60. execute as @e[tag=glass_pillar] at @s run fill ~7 ~ ~7 ~-7 ~ ~-7 minecraft:black_stained_glass replace minecraft:obsidian
  61. execute as @e[tag=glass_pillar] at @s run fill ~7 ~ ~7 ~-7 ~ ~-7 minecraft:purple_stained_glass replace minecraft:crying_obsidian
  62. execute as @e[tag=glass_pillar] at @s run fill ~7 ~ ~7 ~-7 ~ ~-7 minecraft:gray_stained_glass replace minecraft:bedrock
  63. execute as @e[tag=glass_pillar] at @s run fill ~7 ~ ~7 ~-7 ~ ~-7 minecraft:light_gray_stained_glass_pane replace minecraft:iron_bars
  64. execute as @e[tag=glass_destroyer] at @s run fill ~-7 ~ ~-7 ~7 ~ ~7 air
  65. execute as @e[tag=glass_pillar] at @s if block ~8 ~-1 ~ end_stone run kill @s
  66. execute as @e[tag=glass_pillar] at @s if block ~-8 ~-1 ~ end_stone run kill @s
  67. execute as @e[tag=glass_pillar] at @s if block ~ ~-1 ~8 end_stone run kill @s
  68. execute as @e[tag=glass_pillar] at @s if block ~ ~-1 ~-8 end_stone run kill @s
  69. execute as @e[tag=glass_destroyer] at @s if block ~8 ~-1 ~ end_stone run kill @s
  70. execute as @e[tag=glass_destroyer] at @s if block ~-8 ~-1 ~ end_stone run kill @s
  71. execute as @e[tag=glass_destroyer] at @s if block ~ ~-1 ~8 end_stone run kill @s
  72. execute as @e[tag=glass_destroyer] at @s if block ~ ~-1 ~-8 end_stone run kill @s
  73. execute at @e[tag=glass_pillar] run particle minecraft:dragon_breath ~ ~ ~ 2 0 2 0.05 2 normal
  74.  
  75. #phase 4
  76. execute at @e[tag=summon_portal] run particle minecraft:dragon_breath ~ ~ ~ 1.5 1.5 1.5 0 15 force
  77. execute at @e[tag=summon_portal] run particle minecraft:dust 1 0.5 1 2 ~ ~ ~ 1.5 1.5 1.5 0 15 force
  78. execute as @e[tag=phase_4_mob] run data merge entity @s {Glowing:1b}
  79. execute store result bossbar phase_4_mobs value run execute if entity @e[tag=phase_4_mob]
  80.  
  81.  
  82. #attacks p2#
  83.  
  84. #meteor
  85. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=Meteor] run summon creeper ~ ~ ~ {Fuse:0,Invulnerable:true,CustomName:' "Ender Dragon" '}
  86. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=Meteor] run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:cave_air replace end_stone
  87. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=Meteor] run fill ~ ~-2 ~ ~ ~-2 ~ minecraft:amethyst_block replace end_stone
  88. execute as @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=Meteor] run kill
  89. execute at @e[type=minecraft:armor_stand,tag=Meteor] positioned over motion_blocking run particle minecraft:portal ~ ~ ~ 0 0 0 0.1 5 force
  90. execute at @e[type=minecraft:armor_stand,tag=Meteor] run particle minecraft:dust 0.73 0 1 3 ~ ~ ~ 0.5 0.5 0.5 0.01 5 force
  91.  
  92. #tnt lines
  93. execute as @e[type=area_effect_cloud,tag=tnt,tag=z] run execute at @s run tp ~ ~ ~-2
  94. execute as @e[type=area_effect_cloud,tag=tnt,tag=x] run execute at @s run tp ~-2 ~ ~
  95. execute as @e[type=area_effect_cloud,tag=tnt,tag=xzp] run execute at @s run tp ~-2 ~ ~-2
  96. execute as @e[type=area_effect_cloud,tag=tnt,tag=xzm] run execute at @s run tp ~-2 ~ ~2
  97. execute at @e[type=area_effect_cloud,tag=tnt] run summon minecraft:area_effect_cloud ~ ~ ~ {Duration:120,Tags:["tntsoon"]}
  98. execute at @e[type=minecraft:area_effect_cloud,tag=tntsoon] run particle minecraft:dust 0.73 0 1 1 ~ ~ ~ 0 0 0 1 1 force
  99. execute at @e[type=area_effect_cloud,tag=tnt] run playsound minecraft:ui.toast.in master @a ~ ~ ~ 1 2
  100.  
  101. #lightning ring
  102. execute as @e[type=minecraft:area_effect_cloud,tag=lightning_ring] run execute at @s run tp @s ^ ^ ^0.17 ~0.5 ~
  103. execute at @e[type=minecraft:area_effect_cloud,tag=lightning_ring] positioned over motion_blocking run particle minecraft:dust 0.73 0 1 1.5 ~ ~ ~ 0 0 0 1 1
  104.  
  105. #lightning endermen
  106. execute if entity @e[type=marker,tag=dragon_endermen] in the_end as @e[type=minecraft:enderman,distance=..1000] at @s run particle minecraft:soul_fire_flame ~ ~1.5 ~ 0 0 0 0.1 2
  107.  
  108. #balls
  109. execute as @e[type=dragon_fireball,tag=balls] at @s positioned ~ 0 ~ if entity @s[distance=200..] run function custom_ender_dragon:p2/balls/main_2
  110.  
  111.  
  112. #attacks p3#
  113.  
  114. #missile
  115. execute as @e[tag=auto_aim] run data merge entity @s {acceleration_power:0.0}
  116. execute as @e[tag=auto_aim] run data merge entity @s {Motion:[0.0,0.0,0.0]}
  117. execute as @e[tag=auto_aim] at @s facing entity @a[sort=nearest,limit=1] feet run tp ^ ^ ^0.2
  118. execute at @e[tag=auto_aim] run particle minecraft:portal ~ ~ ~ 0.5 0.5 0.5 0 10 normal
  119. execute at @e[tag=auto_aim] run particle minecraft:portal ~ ~ ~ 0.5 0.5 0.5 0 5 force
  120. execute at @e[tag=auto_aim] run particle minecraft:dust 0.73 0 1 3 ~ ~ ~ 0.5 0.5 0.5 0.01 7 force
  121. execute at @e[tag=auto_aim,nbt={Age:399}] run summon minecraft:creeper ~ ~ ~ {Fuse:0,ExplosionRadius:6,CustomName:' "Ender Dragon" '}
  122. execute at @e[type=area_effect_cloud,tag=auto_aim] run playsound minecraft:block.conduit.attack.target master @a ~ ~ ~ 0.6 0
  123. execute at @e[type=area_effect_cloud,tag=auto_aim] run execute as @a[distance=..3] run damage @s 2 minecraft:magic by @e[type=minecraft:ender_dragon,limit=1]
  124. execute at @e[tag=auto_aim] run particle minecraft:dust 0.73 0 1 2 ~ ~ ~ 5 5 5 0.02 3 normal
  125.  
  126. #split
  127. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_1] run summon creeper ~ ~ ~ {Fuse:0,Invulnerable:true,CustomName:' "Ender Dragon" '}
  128. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_1] run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:cave_air replace end_stone
  129. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_1] run fill ~ ~-2 ~ ~ ~-2 ~ minecraft:amethyst_block replace end_stone
  130. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_2] run summon creeper ~ ~ ~ {Fuse:0,Invulnerable:true,CustomName:' "Ender Dragon" '}
  131. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_2] run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:cave_air replace end_stone
  132. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_2] run fill ~ ~-2 ~ ~ ~-2 ~ minecraft:amethyst_block replace end_stone
  133. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_3] run summon creeper ~ ~ ~ {Fuse:0,Invulnerable:true,CustomName:' "Ender Dragon" '}
  134. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_3] run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:cave_air replace end_stone
  135. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_3] run fill ~ ~-2 ~ ~ ~-2 ~ minecraft:amethyst_block replace end_stone
  136. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_1] run summon minecraft:armor_stand ~ ~0.5 ~ {Motion:[0.0,1.5,-1.0],Tags:["split_2"],Invulnerable:true,Invisible:1,ArmorItems:[{},{},{},{id:amethyst_block,Count:1b}],Small:1b}
  137. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_1] run summon minecraft:armor_stand ~ ~0.5 ~ {Motion:[0.0,1.5,1.0],Tags:["split_2"],Invulnerable:true,Invisible:1,ArmorItems:[{},{},{},{id:amethyst_block,Count:1b}],Small:1b}
  138. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_1] run summon minecraft:armor_stand ~ ~0.5 ~ {Motion:[-1.0,1.5,0.0],Tags:["split_2"],Invulnerable:true,Invisible:1,ArmorItems:[{},{},{},{id:amethyst_block,Count:1b}],Small:1b}
  139. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_1] run summon minecraft:armor_stand ~ ~0.5 ~ {Motion:[1.0,1.5,0.0],Tags:["split_2"],Invulnerable:true,Invisible:1,ArmorItems:[{},{},{},{id:amethyst_block,Count:1b}],Small:1b}
  140. execute as @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_1] run kill
  141. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_2] run summon minecraft:armor_stand ~ ~0.5 ~ {Motion:[0.5,1.5,0.5],Tags:["split_3"],Invulnerable:true,Invisible:1,ArmorItems:[{},{},{},{id:amethyst_block,Count:1b}],Small:1b}
  142. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_2] run summon minecraft:armor_stand ~ ~0.5 ~ {Motion:[0.5,1.5,-0.5],Tags:["split_3"],Invulnerable:true,Invisible:1,ArmorItems:[{},{},{},{id:amethyst_block,Count:1b}],Small:1b}
  143. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_2] run summon minecraft:armor_stand ~ ~0.5 ~ {Motion:[-0.5,1.5,0.5],Tags:["split_3"],Invulnerable:true,Invisible:1,ArmorItems:[{},{},{},{id:amethyst_block,Count:1b}],Small:1b}
  144. execute at @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_2] run summon minecraft:armor_stand ~ ~0.5 ~ {Motion:[-0.5,1.5,-0.5],Tags:["split_3"],Invulnerable:true,Invisible:1,ArmorItems:[{},{},{},{id:amethyst_block,Count:1b}],Small:1b}
  145. execute as @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_2] run kill
  146. execute as @e[type=minecraft:armor_stand,nbt={OnGround:1b},tag=split_3] run kill
  147. execute at @e[type=minecraft:armor_stand,tag=split_1] run particle minecraft:dust 0.73 0 1 3 ~ ~ ~ 0.5 0.5 0.5 0.01 5 force
  148. execute at @e[type=minecraft:armor_stand,tag=split_2] run particle minecraft:dust 0.73 0 1 3 ~ ~ ~ 0.5 0.5 0.5 0.01 3 force
  149. execute at @e[type=minecraft:armor_stand,tag=split_3] run particle minecraft:dust 0.73 0 1 3 ~ ~ ~ 0.5 0.5 0.5 0.01 1 force
Advertisement
Add Comment
Please, Sign In to add comment