Imagine for a moment that you’re in a cave looking for diamonds you spot some cobblestone on the wall but when you mine through it it’s not a tiny box with a spawner oh no it’s a sprawling randomly generated dungeon often times with multiple floors and it’s not just Halls and rooms thrown together the rooms themselves are randomly generated and with no mods installed and i’m going to show you how i did it how to get these dungeons in your world and maybe even create one of these types of structures for yourself so let’s get Started see the classic box dungeon was actually the first structure ever added to minecraft and considering how far we’ve come with structures since then the thing has more and more stood out like a sore thumb to me so after recently completing a massive project adding a huge dimension with over 30 new Complex structures i knew i could finally fix one of my longest running gripes with the game so to start off i need to explain to you how most modern structures generate in minecraft there are a few major components structure files jigsaw blocks and template pools let’s go through them one by one Structure files are segmented pieces of structures that are generally randomly attached to one another to create the whole design these can be literally anything from a tree to a building or even a cave using structure blocks you can save an in-game build into a structure file stored in your world safe folder Then we have jigsaw blocks these blocks work together to quote-unquote grow structures by telling the game to generate new segments from the structure files we’ll revisit the specifics of what growing a structure means in a minute but let’s stay focused on the jigsaw blocks right now jigsaws come in Two forms generating jigsaws and connector jigsaws generating jigsaws tell the game to generate a new segment from a structure file and where to generate it connector jigsaws are reference points inside the new segment that inform the generating jigsaw exactly how to connect the new segment to the existing structure then we have The template pool component template pools are javascript files that work with the jigsaw blocks to tell the game which pieces the jigsaw blocks can use as well as the probability of using some pieces versus others so you confused yet don’t worry let me show you how all these pieces come together the way Structures generate is a lot like how a tree grows you have an origin point or your quote-unquote roots where the rest of the tree grows from from this origin point jigsaws will grow the structure outwards or create the trunk now here’s where things get interesting at this point the origin point has used The jigsaws to tell the game where to spawn new segments and the jigsaw blocks have used the template pool to decide which segments should be used but what happens if you have a generating jigsaw inside one of the new segments well the process repeats the newly spawned generating jigsaw will then proceed to Generate segments off the new segments creating the branches of the tree and then even those new branch segments can have generating jigsaw blocks creating offshoots of the branches and piece by piece structures can be built now let’s apply this to our dungeon the easiest route would be to make a bunch Of rooms and hallways and slot them all together at random but i did this method a few times in my dimension pack and what i came to realize is unless you make a lot of room templates it doesn’t take long before you start finding the Same rooms over and over so to get the best bang for my buck i need to make the rooms themselves generate in random designs so my initial plan was to break the rooms into four quadrants but i ran into an issue with this i made this dungeon in java edition 1.18.2 and prior To 1.19 jigsaws are limited to 7 levels meaning a jigsaw generation chain can only go about 7 segments deep before it stops generating new segments so if we generate each corner of a room at a time we would waste four of seven levels on a single room meaning we wouldn’t even Have a dungeon with two full rooms but there is a way to improve this if this limitation was based simply on the amount of jigsaws that had been triggered then no structure could ever have more than seven segments but jigsaw levels aren’t based on the jigsaws themselves let’s instead think of them As steps take for example what if a segment had more than one generating jigsaw in it it would generate a segment for each generating jigsaw and that counts as a single step or level to help us get a better grasp of this concept let’s scale it up a bit from your origin Point you could have four generating jigsaws on each side spawning four new segments this would count as one level or step now say these newly generated segments each have two generating jigsaws inside them one that spawns a segment outward from the origin and one that spawns one in the clockwise direction spawning new Segments from all of those new jigsaws also counts as a single step or level so in level one we spawned four segments off the origin point but now in level two since we spawned two off those new segments we’ve actually spawned a total of eight and if we planned our designs Correctly we could continue to exponentially increase the amount of segments per level if every segment had two generating jigsaws and we let that run through all seven levels the amount of new segments would be double for each level resulting in a total of 128 segments and with the right design it Could be much much more than that but let’s scale this back down to our dungeon instead of spawning each quadrant of the room individually let’s put a room origin point in the middle and have that generate two halves of the room on each side of it that means it Takes two levels to generate a room instead of four so with that i started building i wanted to keep the heart of the original structure which is kind of a pain when you’re talking about a box with a couple blocks in it but the idea was to create a simple plain boxy Dungeon with a very selective gameplay variety to keep the vanilla feel while also massively increasing the amount of gameplay variety in the structure first i designed some hallway segments a hall that goes straight a left turn hall a right turn hall and a t-split junction then i created two types of room origin Segments one that continues to spawn segments forward and can allow for a straight on path from the entrance and one that will create a dead end instead then i built a total of 13 room halves eight that are dead ends with varying layouts for gameplay three that will Generate paths off them in various directions and two staircases going up and down to allow the structure to generate multiple floors but there’s still a problem with variety here see you can still recognize certain halves like this balcony for instance and instantly know that there’s a chest Or a spawner at the top of it so to address this i made a variety of small feature segments that will be randomly selected from at set locations in most of the room halves these include spider zombie and skeleton spawners which are all types of spawners you could find in The original structure plus i added a more rare edition of creeper spawners which was actually at one point in the distant past a type of spawner you could find in these box dungeons i also made segments with dungeon chests small piles of low quality ore storage blocks an Empty segment to allow nothing to spawn and a rare zombie mini boss that has a small chance to drop some of his gear which would generally be the highest tier loop possible from these dungeons oh and i guess on that note i should mention yeah you can save entities into Structure files as well which is exactly how i added that mini boss as one of the possible feature segments anyways there’s one more thing that has to be done before saving all of these into structure files air in minecraft technically counts as a block in structure files and will ultimately Result in big pockets of air around your structure that delete parts of the terrain making kind of an ugly mess so to fix this minecraft has another special block called structure voids these blocks literally do nothing except one thing they are recognized as nothing in structure files meaning that they Don’t get loaded in when a structure file is generated into the world which will preserve the blocks that were already there now there’s one more rule with jigsaws you really should know about which is if a jigsaw tries to generate another segment that overlaps with another part of the structure it Just won’t generate however if there is another segment that it’s allowed to generate that does fit it will just default to that one so to minimize the amount of openings straight into stone walls where a doorway would be but it didn’t generate a segment off of it i Created a simple wall segment that will fit in most scenarios for generation to fall back on if it can’t create a half without hitting another part of the dungeon lastly i created an origin point structure for the dungeon this is the structure piece that the rest of the Dungeon will start from and i decided to pay homage to the original by making it a big box with a feature in the middle it has a door on each direction so that the first level of the jigsaw generation will start four different paths heavily increasing the maximum size of the Dungeon and with that building was done the next step was to load them all into a data pack and on that note making data packs is way too big of a can of worms for me to explain properly and i don’t really have all the knowledge myself but I can’t explain specifically how to make this kind of data pack for you to add a structure like this into your minecraft world so if you’re watching this just to see how the dungeon came out skip to the timestamp on screen it to see the final result but now for the tutorial part Firstly i had to configure all of the jigsaw blocks each segment has a connector and a generating jigsaw jigsaws will align on the faces that the arrows on them point to which will always be the opposite direction of the block you placed it on to avoid major headaches when you’re first starting out With these it’s almost always better to put jigsaws on the outermost edge of your segments so that segments never overlap when they try to spawn trust me it is a big pain 9 times out of 10 if you don’t in the generating jigsaws where it says target pool put the name Of your data pack a semicolon and then the name of your structure where it says target name you will put a name to mark what types of connector jigsaws can connect to this for instance if you only want hallways to generate off this jigsaw you can just write hull in your Connector jigsaws change nothing but the name field and name it whatever category of segment you want this to be recognized as again for instance if this is a hallway that you want to generate from the previous example you can just name it hall and all generating jigsaws Will recognize this as an option when looking for hall connectors that part’s really important for designing how jigsaw structures generate otherwise there’d be no way to guarantee a room origin would spawn a room half on each side instead of say hallway or whatever so make sure you plan your jigsaw name Categories in advance if you’re designing a particularly complex structure the next step is to save the segments in the structure files use the slash give command to get a structure block and place it a block below the northwest corner of the segment you’re saving right click on it and click the Lower caps load button twice until it says save change the structure name to whatever you want preferably something that makes it easily identifiable then where it says structure size change the field according to how big your structure is in the x y and z directions respectively you can see if the size is Fitting perfectly by exiting the block ui and visually confirming that the white outline is lined up with the edges of your segment if you had to use any structure voids you can toggle the show invisible blocks button to on and you will see structure voids and air represented as pink and blue Respectively this is very useful for confirming you have your air and structure voids exactly where you want them because again if you have a structure void in the wrong place you might get a block inside your structure or something like that it’s just very very useful to be able to visually Confirm where invisible blocks are go figure oh and if you have any entities you want to include in the structure file you can turn on include entities and that will do that for you so once you’ve done all that click the uppercase save button and you should see a notification in chat That it was saved and then i’m sorry to say repeat that process for every single one of your segments once you’ve done that it’s time to take all these files and turn them into an actual structure first download the basic data pack template in the description this tutorial is only Correct for 1.18.2 but the process isn’t crazy different for newer or older versions so you may just want to find another tutorial for adding structures to world gen if you are working on a different version then in the template inside the data folder create a folder Name to whatever you want to call this data pack it should match the name you put in the start of the target pool in the jigsaw blocks and then create another folder called minecraft it’s important to note that i believe these are caps sensitive so you should make Sure all file names that we make are lowercase then starting inside the folder that you named after your datapack create a structure folders and a world gen folder inside your structure folders make another folder named whatever you want to call your structure and put all of your structure files in That which can be found inside the world save of the world you built them on and the generated folder next you’ll go back to the world gen folder and inside you’ll create two folders one called configured underscore structure underscore feature and one called template underscore pool then take the Template pool file in the top folder of the template and move it into the template pool folder you just created rename it to the name of your structure as you named it in the target pool of the generating jigsaws and then open it in notepad now we’re gonna go on a Little tangent here but it is relevant this is one of the bigger hurdles to understand when you’re starting out with data packs so let me really explain how file pathing works for data packs there are namespace folders which would refer to the folder that you made under the Data folder that’s named after your data pack and then there are data organizational files within those namespaces for instance in the target pool field within the jigsaw blocks you’re actually referencing a namespace folder and then a template pool within that namespace for mypack it references the namespace dungeon revamp telling it To go to the folder called dungeonrevamp within the data folder and then it looks for a template pool called dungeon2 and that’s the part that specifically threw me off see the game already knows where these things should be organized inside the namespace folders because it’s a predetermined layout that the game Already knows how to follow so if the game’s looking for a template pool you don’t need to tell it how to find the template pool folder because it’s going to be exactly where it already knows it should be so that’s why in the jigsaws where it says target pool it’s looking For a template pool but you only put the name of the namespace folder which tells it which data library to look at and then you tell it which template pool to choose because it already knows it’s looking for a template pool so it’s just going to go straight to where the Template pools are so anyways on that note back to the template pool in that opened template pool file you just moved into your template pool folder change the location exactly how i just explained put your namespace a semicolon and then the name of the folder that you Put all of your structure files in put a slash and then select the following and paste it from this exact spot so that the segment repeats once for every structure file you have except for one which would represent your origin structure oh and make sure you remove This comma on the last one or it will break your entire pack yes seriously one comma will break the whole thing so then starting from the top go back to the location line and write the name of each structure file after the slash one file name per location line Under the name field put your namespace a semicolon and then just the name of the template pool file that you’re working on right now once you’ve added all of them save and exit for now we’ll be revisiting this at the end next make a copy of the template pool And add the word start at the end of the name the name doesn’t actually matter you can name it whatever you want but it’s kind of easier to understand that that is the start pool you’ll understand what i mean in a second go ahead and open it up and remove all the segments That you copy and pasted except for one the text in your file should match mine on screen perfectly except for the location line then all you’re going to do is change the file name after the slash to whatever the structure file name is for your origin structure And be sure to add start at the end of this name or just whatever you named this template pool and then you’re going to go ahead and save and close it then go out of the template pool folder and go to the configured structure feature folder take the file of the same name From the top folder of the template and put it here go ahead and rename it after your structure and then once you’ve done that open it change the start pool field to your namespace a semicolon and then the template pool that you put start at The end of the one that only has your origin structure file listed in it the size field refers to the amount of levels your jigsaw blocks will generate so 7 is the max and you can set it for whatever you want depending on how many levels you want your jigsaws to attempt To generate the type field is unfortunately a kind of convoluted and poorly documented criteria but basically it tells the game what structure to mimic spawn criteria for so for instance minecraft colon village would place it on the surface as a jigsaw structure minecraft colon mine shaft will generate Underground how a mine shaft would generate and so on and so forth and finally between the brackets of the biome field write the technical names of each biome you want your structure to generate and inside quotes and separated by commas you can easily get the technical names of biomes by looking it Up with the slash locate biome command once you’ve got all that configured as you want go ahead and save and close it and now as our final step we are going back to the data folder and we’re going into the minecraft namespace folder inside create another folder called World gen and inside that you’ll make another folder called structure underscore set take the structure set file from the top folder of the template and put it here rename it to the name of your structure and open it first change the structure field to your namespace a Semicolon and then the name of your configured structure feature file the wait field doesn’t matter unless you have multiple structures in your packs so don’t really worry about that right now the spacing and separation fields both refer to the amount of chunks between each time your structure generates Spacing is the average distance between them and separation is the minimum distance that they can spawn from each other and lastly the salt field is the seed to determine the exact locations where they spawn again this is not particularly important unless you have multiple structures in your pack so Don’t really worry about it at this point you can install the packing your structure will generate but we still have one thing we gotta do and that’s determine the probability of each segment generating in your structure so go back to your first template pool where you listed all of your different Structure files and go ahead and open it under each segment for each file the weight field will determine the probability of the jigsaws choosing that segment to generate the lower the number the less likely the higher the number the more likely i think it caps at something like 150 but the gauntlet is Over and we are done it is time to look at the final result oh what do we got here some uh suspicious looking cobblestone huh i wonder if it’s gonna be a little box dungeon or maybe you just watched a 20-minute video to make it very obvious That this is not a box dungeon but you can see so right off the bat we’ve out we’ve clearly got it working to some extent so there must be a segment or something just a couple layers a little bit of like but a couple layers through correct somewhere around Here somewhere around here there is a reason that this did not generate oh actually that that’s that’s the reason either way you can see it it generated one side didn’t generate the other if i go into this room yeah it definitely generated both sides and we’ve uh we’ve got our random Spawners in our random locations any of these could have been you know chess they could have been these piles of loot this could have been a spawner so we’ve got already quite a lot of variation occurring uh i’m gonna go ahead and knock out these spawners but i gotta say i’m i’m Really pleased with how this is oh god i’m really pleased with how this has come out um right off the bat it’s looking really good i’m excited to see what else we can find get rid of the other one cool oh oh we got a staircase okay so this is actually an important Limitation to note for these type of structures you’ll notice that all of these spots that could have had a uh feature in it don’t and that’s because we are at the end of the jigsaw train which like right here this would have continued but it didn’t uh we reached full seven segments by Spawning this room which means there was nothing left for there was no uh way for the jigsaws to actually go ahead and generate the features oh that’s lucky ouch holy oh they’re gonna kill me are so gonna kill me not great not great not great not great not great ow What’s in here oh handy golden apple oh another staircase down what do we got oh oh we got scary we got scary that’s oh god that creeper hey help hub brother out legit oh that didn’t help as much as i hurt more skeleton i’m and that’s uh that’s going to be ripperoni Golden apple golden apple okay go away go away why is there silverfish oh yeah because i did hide some infested blocks around here will you please stop ow so this is just one of many examples of what we could get out of these dungeons and this is one of many examples of what Types of dungeons you can make so uh yeah i’m very happy with this i i hope you are too make sure you tell me what you think down in the comments should mojang replace the box dungeon with something like this would you like to see me revamp more vanilla structures also the Pack is available for download in the description if you want to try it out for yourself You Video Information
This video, titled ‘I Fixed the Dungeons In Minecraft!’, was uploaded by ProGameBot on 2022-09-16 15:00:12. It has garnered 291468 views and 11048 likes. The duration of the video is 00:21:13 or 1273 seconds.
Hate the classic box dungeons? I re-imagined the classic Minecraft Dungeons using jigsaw blocks to add custom structures to Minecraft with no mods using datapacks! And this video is a complete guide from the basic concepts to the technical details of how to make custom structures to Minecraft for yourself!
Data Pack Template – https://drive.google.com/file/d/1Mu9z0FQSFTwlqC0K0xYREXhiki6h2cSz/view?usp=sharing
Get the Dungeon Datapack! – https://www.planetminecraft.com/data-pack/classic-box-dungeon-revamp-and-a-full-video-guide-on-how-i-did-it/
Join my Discord! – https://discord.gg/JPxr7KzPds
Make sure you subscribe to catch more videos like this! And if You liked the video, leave a like, too!