Random Dungeon Algorithm
This datapack is designed for further expansion and modification - it contains basic files for creating a randomly generated dungeon.
By default, dungeons generate on a 7x7 grid that fits perfectly on a standard Minecraft map. Each room occupies one chunk. The central room initially has only one exit (southern), while the adjacent room in that direction contains all four possible exits (north, south, east, and west).
If you create a map within the dungeon, it will only display rooms you have already visited. A superflat world is required for the map system to function properly.
Dungeon generation location: coordinates 0 0 0.
To generate a dungeon, use the command /function dun:generate. It is recommended not to execute this command again until the current dungeon has fully generated. Temporary game freezes may occur with low RAM levels or in singleplayer mode.
Distance System Features: Each room has a scoreboard value "dun.dist" indicating the number of rooms that must be traversed to reach it (counting starts from room 1 in the center). By default, a dungeon exit portal is created in the most distant room.
Important Information:
- A detailed guide for using this engine is currently in development
- This version was created as a test and released publicly upon request