Advertisement
Dzombies45

Dungeon generator by:dzombies45

Mar 31st, 2021
1,831
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.41 KB | None | 0 0
  1. /scoreboard objectives add conector dummy
  2. /scoreboard objectives add dir dummy
  3. /scoreboard objectives add last_room dummy
  4. /scoreboard objectives add room dummy
  5.  
  6. /scoreboard players set last_room last_room 30
  7.  
  8. /scoreboard players random @e[type=armor_stand,name=gen] dir 1 4
  9. /tag @e[type=armor_stand,name=gen] remove gen
  10. /scoreboard players add @e[type=armor_stand,name=gen] room 1
  11. /execute @e[type=armor_stand,scores={dir=1,room=2..}] ~ ~ ~ tp @s ~10 ~ ~
  12. /execute @e[type=armor_stand,scores={dir=2,room=2..}] ~ ~ ~ tp @s ~-10 ~ ~
  13. /execute @e[type=armor_stand,scores={dir=3,room=2..}] ~ ~ ~ tp @s ~ ~ ~10
  14. /execute @e[type=armor_stand,scores={dir=4,room=2..}] ~ ~ ~ tp @s ~ ~ ~-10
  15. /execute @e[type=armor_stand,name=gen] ~ ~ ~ detect ~ ~3 ~ air -1 tag @e[type=armor_stand,name=gen] add gen
  16. /scoreboard players operation @e[tag=gen] last_room = @e[tag=gen] room
  17. /scoreboard players operation @e[tag=gen] last_room -= last_room last_room
  18. /scoreboard players random @e[type=armor_stand,name=gen,tag=!gen] conector 4 10
  19. /execute @e[scores={room=1,last_room=..-1},tag=gen] ~ ~3 ~ structure load mystructure:room_start ~-2 ~ ~-2
  20. /execute @e[scores={room=2..,last_room=0},tag=gen] ~ ~3 ~ structure load mystructure:room_end ~-2 ~ ~-2
  21. /execute @e[scores={room=2..,last_room=..-1},tag=gen] ~ ~3 ~ structure load mystructure:room_mid ~-2 ~ ~-2
  22. /execute @e[type=armor_stand,scores={dir=1,room=2..},tag=gen] ~-5 ~3 ~ structure load mystructure:path_x ~-3 ~ ~-2
  23. /execute @e[type=armor_stand,scores={dir=2,room=2..},tag=gen] ~5 ~3 ~ structure load mystructure:path_x ~-3 ~ ~-2
  24. /execute @e[type=armor_stand,scores={dir=3,room=2..},tag=gen] ~ ~3 ~-5 structure load mystructure:path_z ~-2 ~ ~-3
  25. /execute @e[type=armor_stand,scores={dir=4,room=2..},tag=gen] ~ ~3 ~5 structure load mystructure:path_z ~-2 ~ ~-3
  26. /execute @e[type=armor_stand,scores={dir=1,room=2..,conector=..8},tag=!gen] ~-5 ~3 ~ structure load mystructure:path_x ~-3 ~ ~-2
  27. /execute @e[type=armor_stand,scores={dir=2,room=2..,conector=..8},tag=!gen] ~5 ~3 ~ structure load mystructure:path_x ~-3 ~ ~-2
  28. /execute @e[type=armor_stand,scores={dir=3,room=2..,conector=..8},tag=!gen] ~ ~3 ~-5 structure load mystructure:path_z ~-2 ~ ~-3
  29. /execute @e[type=armor_stand,scores={dir=4,room=2..,conector=..8},tag=!gen] ~ ~3 ~5 structure load mystructure:path_z ~-2 ~ ~-3
  30. /scoreboard players remove @e[type=armor_stand,name=gen,tag=!gen] room 1
  31. /kill @e[type=armor_stand,name=gen,scores={last_room=0}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement