Are you sick and tired of people posting really complicated concepts and they’re not explaining just 90% of it they just gloss over the concepts completely well not anymore people let’s try and create a random dungeon generator just a very simple one one that everyone can understand so first of all we’re going To need to give ourselves a command block just like that now what we’re going to do we’re going to create a very very simple dungeon generator there’s going to be four different kinds of rooms I use that term lightly that you can generate and those four directions That you can go into so this is going to be pretty simple we’re going to summon and understand in each one so let’s go summon understand let’s put in our children ins just kidding and we’re going to go custom name Rand room because we’re going to be Randomizing the room let’s make it small one be is that the right one I think it is and invulnerable just like that let’s click the always active button there we go and we’re going to place one of these over here and now we are going to modify The command like so we are going to say summon understand yet again we’re going to give it a custom name Rand direction because this is going to randomize the direction in barnable one and we’re going to go small 1b so that aqua is active and now there are four directions Which this farm student can move in now all we need now is a pointer this is going to be where the dungeon gets generated so we’re going to need to grab a command block for that actually let’s make it a give command we’ll make it a creeped up we go actually no because Give up here understand one zero and we are going to go entity tag and then we’re going to put in a entity tag so custom name pointer will just say and we have to make it invulnerable as well oh it’s active there we go so this is going To be our pointer and all we need to make the custom name visible just so you can see that it is the pointer so we’re going to go custom name visible one and we’re going to say that always active again okay so here is our pointer right here now this is going to Be a very very simple dungeon but you’ll see how the concept works all right so first of all we are just going to move that aside so the first thing we’re going to need to do is program what we want out of this so we’re going to have A few different kinds of colored rooms there’s going to be less grabs in wool we’ll have some white wool some black wool so blue wool and green walls so it’s going to generate these kinds of different rooms so we’re going to go execute at a name equals point up just Like so and this is going to generate the floor so we’re just going to do a simple fill command which is going to fill the area with wool zero and we’re going to set keep so it doesn’t interfere with anything and that’s pretty simple all we have to do is just Repeat that changing the color of the wool as we go that was the wrong color wool there we go and what color is blue eleven just like so okay and then five so if we activate these command blocks let’s activate this one right here you will see that from the perspective of Our pointer there will be a white room generated now all you have to do to improve on the room is add in a ton of chain command blocks which is pretty simple to do you just go always active and then chain make sure they’re pointing into each other and you can add Whatever you want so let’s just go execute at a name equals pointer and we’re just going to set block a piece of stone above for example so let’s just do that set block stone and we’re going to do that for all of these guys okay so Now we want the room to be randomized for every time that we press the button so in order to do that it’s pretty simple we are just going to have a command block here that we can activate whenever we want let’s just put something here grab a button so we can Activate it and now we’re going to go execute app our type equals understand name equals R and just like so and what we’re going to do we are going to go set block a redstone block so what that’s going to do now after we type it in is that it’s going To place a redstone block randomly anywhere so that time it shows that particular kind of wool and because the pointer is mysteriously disappeared I don’t know what the heck just happened there okay to stop that from happening again we’re just going to get no gravity one just so that doesn’t happen again Oh What the heck right make sure it’s not set to always active let’s grab our pointer Chuck that there so every time we press the button now well BAM it’s picked blue that time let’s press the button again and it hasn’t overridden for some reason I wonder why that is Ah because we had this set to keep – alright let’s just remove the word keep so you can you can see the effects occur so let’s press the button again that time it’s blue that time it’s white that time it’s black and as you can see we have this problem the redstone blocks Aren’t going away so let’s attach a chain command block let’s go execute at a Thai pickles armorstand name equals R and rune and we’re just going to set block air so it is briefly going to set a piece of redstone there but it’s immediately going to remove it As you can see just like that and as you can see it should be set blocking something different yep it’s just random that’s why hesitated there we go so we’re getting a different room every time we press the button completely randomized now we have this problem Where the pointer isn’t moving at all so we are going to add in some things right here we’re going to go execute at a name equals pointer now if there’s room towards positive X which is this way and the way we’re going to detect it this Room we’re going to go seeing if there’s air there and if there is air there then it’s going to TP at a name equals pointer for blocks in that direction so let’s say there’s a room right here it’s a nice little sand stone room the Pointer is not going to go that way if this command block is activated just like so because there isn’t air there if we remove the room however then it is going to go in that direction now we’re going to repeat the process for the other command blocks so we need to do One for negative X we need to do one for positive Z just like so and we’re going to do one for negative Z as well just like that so if there’s already a room generated in that direction then it’s just not going to go there at all so how Are these actually going to be activated well we’re just going to attach another chain command block here we’re going to go execute our type equals armorstand name equals R and room I mean brans direction and it’s just going to set to block a redstone block at that position And then we have to of course clear that afterwards so we’re going to go execute at E name equals R and direction and we are going to set block a redstone no we’re going to step block air right at all of their positions so now I’m holding down control and pick blocking To do this just like so it’s so it’s going to happen every time and then our randomized room generator is done all you have to do is add in some extra fill commands maybe you want to go up and down for example so let’s just move our pointer somewhere Let’s move it right here okay and let’s just press the button there we go so it’s moved that way moving that way again and as you can see there we go now we do have this problem now where it’s just teleporting a little bit too far All we have to do to change that is change all these fours to threes okay let’s remove this pointer and see what kind of random room that we generate so I’m sick of pressing this button all the time so we are actually just going To hook it up to a hopper clock now we are going to make it kill itself in a moment but first let’s just try and test this machine see if it all works quite well so we’re just going to place a redstone block right here put this in But we can’t obviously all right let’s get rid of that redstone block and watch the pointer generate a dungeon there we go it’s generating something the rooms are different and if we keep doing this it would just make sense now if it cannot go a particular direction then It’s just going to be overwritten by the next room and as you can see the generator is just getting randomized there we go it looks pretty swell now there’s one more thing that we need to do we need to make it kill itself after it generates a certain number of rooms So we’re just going to go scoreboard objectives add we’re going to go dungeon life and we’re going to make that dumb dummy objective now every time this gets added we’re going to go scoreboard players add at 8 name equals pointer Dungy on life 1 and then after that We’re going to go kill at a score dungeon life minimum equals however many rooms you want to generate let’s just say 10 for this example now if we just get rid of the redstone block here then it will actually kill itself up to 10 or so rooms are Generated so let’s take a look at this so it’s generating a dungeon and then very very soon it’s just going to kill itself as we should predict there we go so it’s 6 rooms because they overlap it’s actually a little bit less than you expect so let’s just generate 1 more Room and then we’ll have our final verdict let’s just increase this number to 20 because that is a very very small dungeon and as I said you can just expand on this very very easily the rooms have to be the same size for this kind of technique you can change the Room sizes if you are very crafty about what kind of skills you use but that is only when you get really really familiar with using this tactic and there we go the dungeon is generated right there again not a very exciting generator but hey that’s all I’ve got For this tutorial thank you very very much for watching this episode if you liked this kind of style episode please let me know in the description below and as always thanks everyone for watching I’ll see you in the next one take care Video Information
This video, titled ‘How To Create Random Dungeons – Minecraft Command Block Tutorial’, was uploaded by Jragon // Learn How To Make Minecraft Commands on 2016-01-17 03:57:48. It has garnered 64246 views and 1589 likes. The duration of the video is 00:11:15 or 675 seconds.
This is an in depth tutorial on how to create a simple random dungeon generator. Enjoy!
► If you’re interested in helping me but don’t have any money, check this out: https://plus.google.com/+Jragon014/posts/NHFTZcxa6oD
===Credits=== ►Profile picture: Cookie Animations IL: ( https://youtu.be/Lp_8PUKjhk4 ) ►Banner art/logo: Rushfriend ►Outro: redacted187 ►Music: http://www.bensound.com/
====Contacts==== ►Patreon https://www.patreon.com/Jragon14 ►Website http://jragoncommands.weebly.com ►Twitter https://twitter.com/Jragon014 ►Email [email protected] ►Twitch http://www.twitch.tv/jragon014 ►Reddit https://www.reddit.com/user/Jragon014/ ►Creepr http://forum.creepr.org/user/jragon014 ►G+ https://plus.google.com/u/1/+Jragon014