Today i’m going to teach you how to use a little-known block called the jigsaw block to generate your own random structures so to start off with there’s two concepts you need to understand to use jigsaw blocks for yourself rooms and connectors so we’re going to start with Rooms now this command that i’m using right here is in the description so you can just copy and paste it it gives you a structure block now structure blocks are how you actually save rooms to physical files that the jigsaw blocks can use so click inside of the structure block And hit this left button once to go to save mode and you’re going to put your structure name in here this can be actually anything you want just make sure to stick to numbers letters and underscores so don’t use spaces it’s just for the the technical stuff Once you have an actual name we’ll say like upstairs one then go ahead and hit this done button here and then we need to specify the other corner of this structure once you’ve figured out where to put the other corner and don’t worry if you’re not exactly sure you can change it later Place a structure block and click this left button until you get to corner enter the exact name that you put in the first structure block so upstairs one and then hit done now back at the first structure block just go ahead and hit detect and boom there’s a bounding box that you Can build inside of and so you just make whatever structure you want to make and the jigsaw block will be able to access this because this will be saved as an actual file so i finished building this simple second story walkway it’s just all purple so that it’s really obvious Where the different rooms end when we use the jigsaw block but when you’re done building you go back to the structure block the first structure block and you hit save make sure to hit the save on the right if you hit the left one it just Clicks through so go ahead and hit save and your building is now a physical file it’s also important to note that you can save entities as well so this is where the jigsaw block will go we’ll we’ll do that part later but if we just put a cat in here And we name him billy we can go into this save thing and go to include entities on and then when you save it’ll make sure to save billy so that’s the room half of jigsaw blocks now we’re going to move on to the connector half first thing you’re going to want to do Is get a jigsaw block again the command is in the description and pay attention to the fact that this is jigsaw and not jigsaw block it’s uh easy to get it mixed up so first thing is you’re going to want to place a block to to orient the jigsaw properly you Have to make sure it’s placed against the block if you place it down like this the arrow goes upward and you want the arrow to be facing away from your structure here so normally you want the jigsaw block to be placed either in the very middle of an odd numbered structure or else Always in one corner so like always putting it in the left corner here putting it in the left corner there um mine is in an even numbered structure to help illustrate some things the fact that this can rotate either way but yeah normally you want it in the Middle so we’re going to open it up and we’re going to focus on two things because there’s a lot of stuff in there we’re going to focus on name and target name these are the connectors now there’s some interesting logic you can do with these but we’re going to start off simple So we’re just going to name this walk side now this is the same rules as before you want to stick to letters underscores and numbers so we’ll just do walk side because this it literally goes to the side right if we wanted to put a bunch more rooms Like say another room right here it’s literally a walkway to the side so just name it something that you can remember and that makes sense so we’re going to place another jigsaw block directly opposite that one and again you would normally want it centered or else always in a certain corner But this time it’s going to be a little bit offset so we’re going to put in the same name here because we want it to find a walk side jigsaw block and i’ll explain what the individual things do next so this is where things start to get interesting let me explain What each of those things do let’s place a jigsaw block here make sure it’s facing down so when we go into the jigsaw block we have name and target name name is the connector for this jigsaw block target name is what it looks for it’s target it’s it’s pretty obvious Once you know what it means it’s it’s pretty easy to remember afterwards so we’re going to do something interesting with this jigsaw block now in the case of this one we want something to find it but we don’t want it to find something else that might sound confusing but it’s Actually not so if we go to target name we don’t want this walkway to find anything we want something else to get it so we’re going to remove the target name and then we are going to set this name to be walk up so now this jigsaw block will never Generate anything else it can only be found by the orange centerpiece that we made so an easier way to think about that concept is as an end point it has a name so it can be found but it has no target name so it can’t find anything else So once the jigsaw blocks get to this specific block right here this jigsaw block then everything ends at least as far as this is concerned these other jigsaw blocks can keep going as long as they have a target name which they do but this one ends it won’t regenerate Anything down it won’t try and do anything else it just stops here so this is an endpoint now if we wanted to swap this we totally could so we could put something only in the target name and you could think of this as a beginning point Because it has no name nothing can find it but it has a target name so it can find something else so beginning point end point you see pretty straightforward as of now we’ve talked about three of the basic connector types we have the beginning point the end point we have The same version and you can also make it be something else so if we did like walk up two maybe in this case that doesn’t actually have anything connected to it but um you can make either of these this could be a two and this could be Not you can have them be different and so they can only find a certain thing and they can only be found as a certain thing so yeah and the final option is if you leave both of these blank you can make it so that it’s manual so After you generate it you would come over to this structure block and then maybe specify something whatever whatever you wanted so yeah that’s a pretty abstract concept but hopefully that makes sense beginning and endpoints and the same ones like these are pretty much the main things you’re going to be using so you Can not worry too much about the other ones but before we save this room for the final time there is one more thing we need to learn about the jigsaw blocks and that is this option right here target pool all right this is the most advanced part Of the tutorial if you can get the hang of this you will be just fine so come to this link planet minecraft and download the data pack here make sure and save it once it’s downloaded go ahead and extract it at its location and once it’s extracted copy the Your title goes here folder it’s important that you copy that one copy that and then go to whatever world you want to use it on so we’re using it on tutorial hit edit open world folder and double click data packs and hit paste now if everything went as planned it should be Data packs your title goes here which you can put whatever you want and then data so if you have all that right you can head back to minecraft and when you’re done just hit save so this is where things get tricky go ahead and click the data Folder and you’ll notice that this is all caps and it says namespace you’re going to rename this folder to a name that you pick make sure to use lowercase letters and underscores instead of spaces so we’ll just say talon it’s a pretty simple one short and sweet is really The key here click into your newly named folder and then double click world gen and template pool and again you’ll notice it has another name here now this is the template pool name this is going to be different than your namespace and just pick a lowercase name that’s pretty simple So um i’ll just put pool it’s a really undescriptive name but that’s okay and finally you’re going to open pool in any text editor so you can just hit this edit button i have a special text editor though so we’ll open it in notepad plus plus you can see pokemobs so you’ll notice That two of the same things are here so namespace is here and template pool is here so just make sure and name those to the same thing so namespace was first we named that talon and then template pool was second which we named pool and the very very very last step here Is to set the location of those files those physical files that you saved so you’ll remember that our first one was called upstairs1 and we don’t actually have a second one but yeah this is why you wanted to use lowercases and numbers and underscores is because When you name it in here if you use other things it kind of gets weird and this isn’t really a super big deal but this number right here this weight that is how often you want the thing to get picked so you can change it if you want or you can Just leave them all the same weight it’s really up to you just make sure that they’re only integers oh my goodness i almost forgot billy and actually this is a great opportunity to just show you how to add a second one so if you copy from this bracket right above Weight all the way to two brackets below element type just hit copy and then click right after it comma enter and paste and now we have the second one so now we just put in billy and then hit save and you know obviously billy is a lot more important So we can make this number much much bigger whoops 100 there we go and then save all right this is a little bit of a optional step but it is kind of a good thing to check so on your minecraft launcher if you go to settings and Check output log open output log when game starts and then play it will show you an output log here let me drag it right over and it has a bunch of random stuff which don’t worry about reading all of that all you’re looking for there is red text so when you Open your game and it loads the data pack you can actually go right here and see if there is any red text if there isn’t then you’re good to go that means you did everything correctly but if you like missed a comma or something it would show up red here Now we can finally fill in this top part of the jigsaw block so just type in your namespace which we made to talon that was the first folder you remember and then the pool the target pool which we called just pool pretty basic name and you do that for each of these so Just talon or whatever your name is or a namespace and then pool and by the way i’m pressing ctrl and backspace to like get rid of all of it instantly cool little shortcut that works in these jigsaw blocks and while it’s okay for these two to Have nothing in them make sure that the turns into at the very least has minecraft air if you are an advanced technical user you can actually put various other blocks in there it for example in billy i have light blue concrete and you can even You can even do block states if you know what block states are but we’re not going to get into that in this video so there are two final pieces of information you need to know before you have all the knowledge to use jigsaw blocks so let’s just take a look at the jigsaw Block here and we’re going to generate a random structure with this knowledge so we already know what to put in the pool that’s easy we know what to make the target name that’s going to be walk side but what about these two buttons here well levels basically just tells the jigsaw block How many rooms to put in so we want one room so we’ll just set it to one pretty easy keep jigsaws also kind of obvious like um if you keep jigsaws on you can kind of debug a little bit but we don’t really need to debug So we’re just going to turn jigsaws off and then hit generate boom a random room wait let’s do it again you’ll notice that none of these settings save so these bottom three settings are all manual which means you have to enter them every time because it’s so powerful look it just overwrote it We got the purple room that we worked on and you’ll see the jigsaw blocks are all gone but the ladder’s there the glass is there and let’s do it one more time before we go for the the final the final touch oh look at that we got One of each type it’s random but we actually managed to get one of each type that’s kind of amazing the moment of truth is here it’s time to take the knowledge you have gained and wield it and we’re gonna wield it very far away from anything precious because We’re gonna go for the full generation maximum levels here maximum we’re gonna turn keep jigsaws off and we’re gonna generate this is the moment you know what all these things do you know what the target pool does the name the target name you know what turns into does you know what Levels does you know what keep jigsaws does you know all this stuff now and we can finally generate the entire dungeon boom look at that knowledge in action oh my goodness there’s so many layers to it too uh yeah this is what i meant how it kind of turns around You sort of want even entrances and stuff otherwise it’ll rotate 90 degrees like this but yeah like we got multiple levels oh we got a third level even okay that’s very cool even the cats are randomly generated that’s perfect oh my word this is like a proper maze But you can see how you could use this to generate like a rogue-like dungeon or you could generate a variety of houses like depending on how creative you get with the connectors and the rooms those are your two keys to creativity and you can just generate all kinds of stuff Well that’s about it for this tutorial you now have the power to to create something like this this monstrosity but hopefully much more beautiful than this but yeah it’s a it’s a very cool block i don’t think a lot of people know about it so if you uh find somebody that you think Would be interested in this feel free to share it with them and maybe they could uh get some good building use out of it anyway that’s going to be it from me i have minecraft episodes out every friday and some other variety content every other saturday actually both saturdays it flops rocket League and subnautica and yeah so if you’re interested in that check it out but that’s that’s all for me so catch you next time later You Video Information
This video, titled ‘How to Use Jigsaw Blocks to make Custom Randomly Generated Structures’, was uploaded by Talon on 2020-11-13 17:00:06. It has garnered 137594 views and 4137 likes. The duration of the video is 00:17:32 or 1052 seconds.
Roguelike dungeons, randomly generated houses, villages, jigsaw blocks are a powerful, underutilized building tool. This tutorial will teach you how to use this little-known block as well as how to generate random structures through the use of a custom template pool (kinda like a table of contents, but with randomness).
0:00 “Intro”
0:12 “Step 1: Rooms” – /give @p structure_block
2:38 “Step 2: Connectors” – /give @p jigsaw
7:48 “Step 3: Custom Template Pools (Table of Contents)” – Template Datapack: https://www.planetminecraft.com/data-pack/template-for-custom-jigsaw-template-pools/ – Rename NAMESPACE folder to a short name (only using lowercase and underscores)* – Rename TEMPLATEPOOL JSON file to a short name (only using lowercase, numbers, and underscores) – Inside the TEMPLATEPOOL file rename NAMESPACE, TEMPLATEPOOL to their respective names – Also inside the TEMPLATEPOOL file rename STRUCTURENAME to the name you saved in the structure block
13:36 “Step 4: Jigsaw Settings”
14:52 “Step 5: Generate!” – Updated for 1.19 (Check reason below) – Finished example datapack (Does Not Contain Structures!): https://www.planetminecraft.com/data-pack/finished-jigsaw-datapack/
Advanced Info! – Sideways jigsaws only connect to other sideways jigsaws and vertical jigsaws only connect to other vertical jigsaws – Your structure files are saved at Your_World/generated/minecraft – You can copy these into the datapack from PlanetMinecraft inside the your-title-goes-here/data/NAMESPACE/structures/ – If you copy your structure files you must update their location inside the TEMPLATEPOOL JSON file and replace the minecraft:STRUCTURENAME with NAMESPACE:STRUCTURENAME – You can also prefix connectors with your namespace (i.e. talon:walkside) just make sure to change it everywhere and save it in the TEMPLATEPOOL JSON file – Jigsaws have super cool logic when using block states. If you define a directional block state such as oak_log[axis=x] the jigsaw block will apply this before rotating the structure meaning the oak log will always be facing the correct direction – Block states are found by pressing F3 and looking on the right side of the screen – Block names (for the Turns Into setting) can be found by pressing F3 + H and hovering over the correct block – You can actually set one of the structures in the template pool to be empty so the structure will occasionally not generate anything – The Billys (cats) generated with structure did generate randomly but they all kept the Silent:1b tag I gave them, so entities do keep some tags they’re saved with (the normal tags affected by spawn will be randomized) – A more complete definition of levels is that it defines the length of a path. A single path can branch off into many other paths as well as double back on itself creating far more than seven total structures. This means the more jigsaw blocks a single structure has the more branches that structure will create and the larger the final product will become.
World Download: https://www.planetminecraft.com/project/jigsaw-world-from-tutorial/#tab_image_gallery 1.19 Error Solution: https://youtu.be/Cf0d7IRGyTY Edit for 1.19: World and finished datapack have been updated for 1.19. Due to some changes the template pool file had to be split for more consistent generation. Basically, you need one template pool file per exclusive connector name. So in the world the green, orange, and purple room all had the walkside connector, but the cat structure did not. So I put the cat structure in its own template pool file and updated the structures saved in the world. It makes no difference how many template files you have so if you get the no starting jigsaw found error consider adding another template pool file for any exclusive connector names.
I put as much info as I could in the advanced section, but if you still have more questions ask them, and I’ll do my best to answer each one.
Ending Music: “Pamgaea” Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 3.0 http://creativecommons.org/licenses/by/3.0/
Not an official Minecraft product. Not approved by or associated with Mojang.
#JigsawBlock #RandomlyGeneratedStructuresInMinecraft #Talon2863