Hey guys this is Jay doctor and welcome to another minecraft video in this one I’m gonna be showing you this data pack that I’ve created which will allow you to make custom structures that can naturally spawn throughout your Minecraft world you can take any build That you want and use this data pack to tell it what dimension you want it to spawn in it can be biomes specific there’s all kinds of things you can do with this and I’m gonna show you in this video how it works so I’m here in a Brand new Minecraft world that I literally just created and I’ve installed this data pack and if we look around already we see a structure right here that I created that spawned here we’ve got a floating rock here and if we fly around we should start to see a couple more structures there’s another One of those here’s a little well that I’ve created that has showed up on the side of this hill here there’s some ground in there there’s there’s some underground structures if I go into spectator right here we should start to see some where there might be here we go Here’s a little a Volker like dungeon here with like an enchanting table I’m not entirely sure but there might be some other things around here let’s go this way and see what we can find there’s another ruins over here they are a lot more common in planes because I can say with This data pack how often I want them to spawn and I can make them spawn more often in other biomes so like there was a ruins over there and they still show up in planes a lot more but then there’s other ones that will just spawn in any Biome but the thing that’s really good about this data pack is it’s fully customizable here’s another wins here’s a little like wither monument that I made that has spawned into a cave here up but it’s like a little wither monument with these skulls around here it spawned like in the cave There and here’s another ruins and here’s another one over here so yeah this is just a fun little data pack that I’ve been working on for quite a while so I’m super proud of it but in this video I’m gonna show you shut up so in This video I’m gonna show you how how to create your own structures how to get them to spawn in your world how to customize it to what you want this is a bit of an advanced tutorial so if you don’t know how data packs work then you’re probably going to be pretty Confused but it shouldn’t be too bad I’ll try to explain everything as well as I can but it would help to have at least a basic knowledge of data packs you’ll also probably need to know how to use structure blocks cuz otherwise this will not make sense at all if you don’t Know how to use structure blocks I will probably have a tutorial out for that soon or you can go find another video or something but they shouldn’t be too difficult though I’ll cover them briefly but let’s get to it all right so the first thing you’re gonna want to do is Go into the description of this video and it’ll take you to this mediafire link and you’re going to download this zip file which has the data pack in it so I’m gonna let that download and then don’t click it here alright so this is the file and so what we’re gonna want to Do is we’re going to want to unzip this dot zip file so it’s like extract all let’s put this on the desktop for now all right so once you unzip that you should get these four files in the dot zip file so we’ve got a structure pack Base so how this data pack works is we have the structure generator dot zip which is this is what causes the structures to show up in your world but it doesn’t have any actual builds inside of this file the structure packs is a separate file where you put your builds And the conditions for them and everything and they work together to spawn the structures so this is what you’ll use as like the brains of the operation but then this is all the structures so it’s the structure pack is what I’m cutting them for now so I have My ruins pack that I’ve made it’s got like six like fun little structures in it that you probably saw at the beginning just as just to get an idea and you can look at it and see like examples of what to do and then we have instructions on how to do that this Video is going to cover everything that this says but you could try to figure it out by just reading that if you wanted to all right so the first thing we’re going to do is we’re gonna happen to minecraft here and I’m in my test world Right here and we have this house that I built and we’re gonna turn this into a structure that will generate throughout a world you might obviously want to go for something a little bit more complicated like a dungeon or like some castle or something with mobs and Spawners and treasure and stuff but I’m just going to use this as an example so first thing you’ll notice is we have it’s kind of tall you want to have a pretty like solid foundation that’s kind of that kind of goes down a little bit So that if like this spawns like on the side of like a sloped hill or something it won’t just be flat you want a little bit of ground so that it’ll look like it’s like still in the floor if we imagine that this is the surface right Here and we want the blocks to be right here but then it’s like on a hill or something like that we’d want to have some foundation for this to sit on the ground so I’m gonna assume you know how to use structure blocks if you don’t if you don’t then I’ll Probably have tutorial out soon so so we can use the corner blocks and then like name or structure let’s call this um tutorial house done and then we can do the other corner I prefer to actually just go straight to the save right here and then just put in the structure sighs I just find it easier but if you want to do the corners that’s fine too so let’s call this tutorial tutorial house let’s make the structure sighs I believe it was 11 by 14 by 11 somebody hit detect and we also want to change the relative Position so yeah it was 11 by 11 but it was 13 okay so you just need to figure out the size of your house and then put the whole thing but put it in the box you should figure out the size and we’ve selected the whole house all right so The next step for setting this up as a structure before we actually save it as a structure file in our Minecraft world we’re going to want to fill all the air blocks inside this selection with structure void blocks so let me give myself one of those now the reason You’ll want to do this is because when you save a structure with a structure block it’s going to also copy the air blocks which if we like where to put this in a Minecraft world wherever there’s like air right here so like let’s say like there was already like a Hill right here and there’s blocks going inside the box since we have saved all so the air blocks these blocks would get deleted which we don’t want for our structures because like we have like a tower or something we don’t want it to have like a big Square out of the ground so what you want to do is take structure voids and fill it fill all the air blocks with these there you can see the hitbox right here these are the structure voids and that will basically just tell the structure block to ignore the air blocks And just keep whatever hill or whatever was there previously but then the blocks that were actually copying will stay put so we basically just want to do that to our house here so I’m gonna go slash fill and then we can just tab three times to get back to those coordinates And then we’re gonna go fill with structure void replace air and so now if we go to the structure block you can also show invisible blocks so we can turn this on and this will show us what’s going on here so we have blue is just air blocks and then red is Structure would we want it to all be red however at the inside here we don’t want this to spawn like in a forest and then have parts of a tree inside this house so I’m going to fill the poop here and until I here we’re gonna fill air Replace structure void so now it’s all blue on the inside cuz it’s air blocks so the inside will stay air so if it’s blue it just means it’s going to copy the air blocks if it’s red it means it’s going to keep whatever was there before the structure was placed the other Option we will want to turn on is include entities we’re gonna turn that to on it’s like let’s say you had like mobs that you want in your dungeon or just a random pet or something that is in your house you want sorry you want the you want the entities that are in There like let’s say you placed a bunch of skeletons and stuff you want them to also be saved into the structure but if you don’t actually care you don’t need to touch that but if there’s mobs that are in the structure that you want to keep that will spawn with it just make Sure to turn on entities so now the last thing we’re gonna do is just hit save and we have now saved this house as a structure now before we do anything else we’re going to grab another structure block and we are going to prepare the structure block As if we were about to place this house down so what you’re gonna want to do is so if we just start this I’m gonna do a load structure block we’re gonna put in the name of our house and we’re gonna hit load so now we have the bounding box And it’s being it’s almost ready to spawn so of course we don’t want it to just spawn right on top of this block what you’re gonna want to do is place it where the structure block will be basically in the center because we want the structure to actually delete the Structure block in its place so if we actually just place this down right now this obviously we don’t want it right in the air like this and we still have the structure block here which we don’t want so I’m just going to copy this back over to here so what We’re gonna want to do is place this as much in the center as we can or like basically just somewhere where a block will delete it now I’m imagining the like the the ground is going to be basically right here so there’s a bit of A jump up we could have it up here if we want so what we’re gonna want to do is place the ground level at the same level that this structure block is right now this is one block above it so then what we’re gonna want to do is go like one so This is zero right here this is one so then it’ll be negative one right here so one block down two blocks down and then three blocks down and that’ll work so when we place it down that’s where it’ll be so if we did that here I’m just gonna Copy that so if we went negative three and done you can see now it’s in the ground and we hit load now it’s actually in the ground which is what we want but the structure block is still here so let’s place this back down again over here So we’re gonna go negative three and then we want to place the structure block in basically the center now this was negative oh this was 11 by 11 so I’m gonna go negative 5 by negative 5 and this should be roughly in the center of The box all right now I’m just gonna I’m just going to load it to show you that that’s how it works and as you can see it looks good and then is no structure block there anymore and it has worked now our Pig is not here but we don’t need to Worry about if they’re if your animals aren’t showing up it’s because you didn’t check include entities but we don’t actually need to worry about that because the structure because the data pack will do it for you so we have this prepared and if we clicked load it be Ready to it be ready to place down so now we’re gonna do is we’re gonna go slash data get block and we’re gonna make sure we’re looking at the structure block we’re going to tab all these so we can see the select we can see the NBT Data right here we don’t need to pay attention to anything except position X so we’re going to go position X or colon negative 5 because that’s what it shows in here then position Y and position Z so position Y position z5 make sure you put in whoops make sure You put in commas as well I’m gonna copy this so you could either copy it like this or just remember what these numbers were so it’s the relative position so we need to make sure it’s in the center and then save the numbers that we had and Now it’s time to actually get this into our data pack so let’s start up on that so back to the stuff that we got in the data pack we have the structure generator zip and we have a structure pack base so to start a structure pack I’m gonna copy this and create a new one so that you can always keep this as a backup if you want to make more so this is our structure base copy I’m gonna rename this to my house pack for now so if we go in here we have data and pected MC meta this is just a typical data pack if you know how those work so then we have structures is the namespace for this so this is just the name of the data pack what the what minecraft can look at this is so we have functions loot tables and structures we’re going To go into functions here and in generate so if we come in here we have three files here we have structure types structure types and and structure types another this is so that you can make your structure spawn in separate dimensions so if you had like an end Tower or something that you wanted to spawn or like another Hut or something I don’t know so we have separate files for each of these so I’m just going to go in the overworld but these files are what tell the data pack what the structure is So let’s go into a structure type style MC function you’ll need some way to edit text so now that we’re in here we have these three commands right here each structure uses all three of these commands so we’re gonna it says right here we can copy and paste these three things so We’re gonna copy and then if we want to add a new structure we just paste another line of these so then we have to move remove the hash tags because the hash tags just if there’s a hash tag and at the beginning of it it will turn the it will turn the command Into a comment so that it doesn’t actually do anything it’s just there for you to read in the file all right so we have structure ID right here so you don’t need to touch anything else here except structure ID and then intimate one more thing we gotta look at in a Second so we have structure ID so this is important each structure that you create will have a unique number that you can assign to it now it can be any number from like 1 to whatever but the big thing is it needs to have a number That you refer to this structure as so I’m going to set this structure as two so if there’s it so the data pack is going to look at our house and it’s going to read it as two so we’re giving each of our structures a unique ID so Like if we’re going to add another structure so if we wanted to add another structure we could copy these again and then whoops then we can come back down here and then paste another one and then make this one three because it’s a different structure so we could do that If you wanted I’m just gonna stick to two though all right so 2 is our structure ID we’re gonna need to remember that too so basically when you’re creating your structure you want to have the name of your structure which I have tutorial house and then the ID of your structure So now we have the ID in here so I’m gonna quickly talk about what these commands do so that we know how to edit it so when we’re summoning a structure basically what we’re doing is we’re summoning an armor stand that’s going to basically just be put in the world and Then it’s going to like move around a little bit until it finds the spot that it wants which is on a Minecraft surface which is like dirt or grass or stone and stuff like that but like it’s so that it won’t spawn in like trees because it can’t Stand on a leaf it’s like if it’s not on so if it’s not on the surface it’ll just move around a little more so then what’s gonna do is it’s going to say am I on the surface like am i in grass or something then we’re going to add this Tag which will trigger the rest of this stuff so then the next command so then you can actually change these to whatever you want you can say if the block underneath is sands you can have it only spawn on sands so if we change this to hashtag minecraft surface we can Go just minecraft sand make sure you get rid of the hash tag the hash tag makes it so that’s like more than one block in the data pack you don’t need to worry about how that works but like if we wanted to spawn on sand and not just any Surface block we could do that but if you wanted to spawn like just let the data pack take care of it just make sure its surface then the second one then the second command here is what we’ll actually place the structure block so this is where the position saving that We got earlier comes into play so in between these brackets here these arrows we’re going to delete all of this or you could just whoops or you could just delete the position here things and the question marks and put in the numbers that you saved earlier but I find it Easier to do the slash data thing and then just copy everything we just did so we could put in negative 5 and negative 3 negative 5 or we could just copy and paste what we did earlier so I can go control V whoops oh I copied that lips But yeah we copied that earlier in minecraft so we can just paste that and if we wanted to do that too so at the end you want to have this right here exactly as it is typed out but then the numbers to whatever you adjusted it to Be but you just want to be like position X colon and then whatever you did earlier um my would load we want to keep that so this is why we don’t need to worry about the entities cuz it’s just automatically by default keep the entities in it so we Next we’re going to put in this structure name which was tutorial house and now we have put the structure in the system to be recognized as a number so we’re gonna go save and now we are out of here so that’s the structure types and then this end and nether are exactly The same it just works in a different dimension alright so now we’re gonna come out of generate and functions and now we have loot tables and structures so let’s go to loot tables next and then structure type and this is again structure type and then nether and end So if we come into a structure type JSON here these are loot tables which if you don’t know what this is it’s basically the code that tells Minecraft how loot works for like dungeons and stuff like what items it picks and how random they are and the rarity of them and the Conditions for my system uses this to generate the structures randomly by using loot tables so when you open this by default there’s just one thing right here so we have these square brackets right here and then inside it we have these which is one structure right here this will spawn one structure however This is count one we’ll get to that in a minute all right so there’s this other file here which is structure settings template and if we come in here this has some stuff you can copy to start your structure so if you want to add a new Structure let’s copy all of this cut you’ll see and then structure type so inside the square brackets right here so it’s here and here we have one of these right here so we’re gonna put a comma to separate it and then add another object here alright so then we have weight and Count so count we have structure ID number here that ID that we picked earlier which was two that’s where we want to put this this is what we’ll take the number so what it will do is using this loot table it’s going to pick one of these random numbers and when it Picks two right here it’s going to go to that other file that we said oh two means the tutorial house so this is what tells it to pick two sometimes then the weight is how often is going to pick two so as it stands when you first get this Data pack we have one right here that’s the count one so the idea is one it’s not actually linked to any structure this one every time it picks the number one it’s not going to spawn anything so you can actually control how many times is going to pick nothing so you can Actually have structures spawn not as frequent so with the weight number it’s going to be it’s going to pick which one over the other so let’s say we said a weight of 2 over here and then like a weight of 3 over here so it’ll pick so What’s going to do is going to take the weight numbers so this one is two this one’s three and this one’s two and it’s going to add them up so three and two is five so it’s five over all but three out of the five times it’s going To pick one and two out of the five times it’s going to pick two so then you can control it even more so like you could say like you can make this number seven so one out so and then we could make this one so one out of eight times Is going to pick two and then you can just control the you can control how often the structure will spawn very easily that way so I’m gonna go like three so like three nothing and then like let’s make it like every time it’s going to try to pick a structure to Spawn six it’s like five times it’s going to be like don’t spawn anything and then one time it will yes do that so that’s gonna be how often it will spawn so that will just make it spawn throughout for Minecraft world but let’s say you wanted it to only spawn in A specific biome like like let’s say we only wanted this house to spawn in the swamp for some reason you can copy this for biome specific so we’re gonna copy all of this stuff right here we’re gonna go ctrl C then come back into here we’re going to go right after The weight the weight and we’re gonna push enter to make a new line and then control V right here now we have our conditions and then it’s gonna check the location and then here we’re going to put what biome we want it to spawn in right here let’s make this spawn in a Plains biome you do want to check if we come back into minecraft if you want to check what biome it is and exactly what the name of it is you can push f3 and then the line right here where it says biome you want exactly what that says so Right here right here in this world that says minecraft plains and you want it spelled out exactly like that so like if there was like sunflower Plains it would be sunflower underscore plains you don’t want Sun underscore flower underscore plain you actually want to check what The name of the biome is so we’ll put that in this biome thing right here and we have minecraft plains and then what you should be able to do is if you wanted to like say hey I wanted to also spawn in this other biome so you have Like more than one biome responds and we can copy this which is another line it’s basically the exact same thing but then we place it right before this bracket right here put comma and then paste it in right there and then put it in a second biome I’m just going to have that Spawn in Plains so yeah that’ll work now we can go save alright let’s go back in here alright we’ve done all the hard stuff so I’m just gonna quick recap so we so to add our structure and go into the functions and then generate and whatever dimension We want we go in we go in we go in copy these lines paste it down here and set our ID number and the name of the structure and then we use the loot table to put in the ID and the chances of its spawning then the last thing we do is we Have this file which is structures this is where we actually put the build that we saved so if we go to our dot minecraft folder and to save this is where all of our minecraft worlds are and we have my test test world right here although we’re going to go into Generate and then or generated sorry generated you’re gonna go into your Minecraft world which is testing stuff free for me and then you’re going to go into the generated folder and then you’ll have minecraft structures and inside here you should see the structure we save which is tutorial house right Here so if we copy this with ctrl C and then we come back to our and then we come back to our structure fold then we put it so then we’re back here we go structures and paste it in that’s it so now we have so we have the file in Here that will tell it what structure to use then we have this to tell the number of the structure and then this is where the actual build goes so now our house structure pack is done so now we can copy this and our structure generator Dot zip and we are going to copy these Orkut doesn’t matter you can take this and we’re going to put it into a Minecraft world to have our structure spawned so I’m going to create a brand new world right here all right so we’re in our new world now We’re gonna come into our saves file again and find the world edges created and we’re going to go into this data packs folder and this is where you’re gonna put your pack so you have the structure generator does zip which actually make something work which you don’t need to actually mess with you Just need this in your world and then your house my structure pack that we just created with whatever structures you want in there so you can add as many structures as you want in this thing now the world that we have there’s Anna plains really nearby so I’m just going To change the biome then it spawns in to a tagged forest now we can go slash reload and we should see a message pop-up structure generator by doctor loaded and this means it’s working so I’m just going to check using data pack list enabled and we have the structure Generator and the house pack that we just created so they are both in the world all right now let me go reload again so we have this message that popped up and we can click here for the commands there’s a lot of stuff here but I’m gonna get through that in a minute I’m just gonna show you the couple things you need to know so we have function and then we have generator and then that’s all the commands we don’t need to worry about any of this so these are all the commands you can do so it’s gonna be function generator colon and Then whatever the commands are so let’s go generator settings and this will pop up and this is what we can control so we have an option of density or how rare we want the structures so we can have like rare where like structure will appear Like every so often if we I clicked I just click that and now it’s set to rare so it’ll just kind of show up like mainly once in a while then we have common like you’ll probably if you’re walking around you’ll see one and then abundant like they’re like probably Pretty pretty close to you like you’ll find them pretty much everybody then we have clock speed this is so that like if it’s lagging too much on you and you need to like slow down you can slow it down a little bit it really won’t do too much difference It’ll just take a little longer to load the structures but it will save on lag I keep it at normal and it’s normal by default so you can do that if you want and then dimensional generation you don’t really need to worry about this but this will just let it you can pick Either auto or manual if it’s auto and you run a command that will start the generation it’ll just automatically do the like the nether and the end structure generation without you needing to type the command again but if you hit manual you’ll have to type it in the Second time so that’s the settings so I’m just going to set it to abundant just so we can find it for this tutorial and I’m just going to keep the clock speed at normal now when you’re ready to actually spawn your structures we will go function generator generate and You’ll hear a little sound and structures have started generating now if we look around we should see one pop up soon but if you just travel around you should start to see structures just generating around your world but let’s see if we can find a house to show And here we go there is the house we created and you can see it’s spawned on its own without me actually building it in this world so obviously like it it’s kind of in a weird spot and that’s weird it’s kind of in a weird spot in the forest but you Can see because we didn’t put structure voids on the inside there isn’t like a tree growing in the middle of the inside but you can see because we put the structure voids we have like trees on the outside here like there wouldn’t just be air here so that’s how you get That to work and we have our house right here and if we looked around a little bit more we could probably find more I took a little bit to find one because I made the chances a little too low so I just adjusted it a little bit so if like It’s not showing up as often as you want it to just change the numbers a little bit and adjust it to what you will need and then you can also create as many structures in one pack as you want the only thing is you can only have one Structure pack loaded at a single time so like let’s say you wanted to I’m going to put in my my ruins pack that I’ve made here that is included with the download it’s one that I’ve created that if you just want to have this just as a Fun little thing you can just throw this in your world so if we come back into and we come to our hello world that I made and then data packs and then we put in the ruins pack we have the house pack in the ruins pack what we want to do is Let’s go route slash reload because we change data pack stuff we’re gonna want to go data pack disable my house pack if you want the owner works you can only have one structure pack loaded at a single time so if you want the ruins pack on you’ll have to turn off the House pack and if you want the house pack on you’ll have to turn off thing else you can only have one on at a time so now that I’ve turned on the ruins pack if we move around we’ll start to see those generate so like they’ll actually start generating automatically Once you just load it up you don’t need to like change anything really in the actual pack so if we actually come into the plains here here we go this is a little well that I created that’s like kind of old and rusted it kind of Spawned on the side of the hill here which is why you want it to kind of have a bit of a foundation which is why it goes down quite a bit so that it stays in the ground we’ve got some ground in there just as a cool little thing but Yeah you can do whatever you want with this you can use it in your own data packs if you just make sure to include the structure generator pack in it and then like in your data pack just just look at the file format that is in the Structure pack and it should work so that is that and now let’s get on to all the commands on the structure generator so if we go slash function generator Help it will list all of the commands here that you can do or if you went to slash reload to load up the data pack and then hit click here for help it’ll also bring it up alright so we have we’ve already been over generate which will just start the generation so we’ve Done help the settings we’ve already been over at now there’s slash function generator status and by the way you can just click these green things if you want to not just type it out status that will literally just list out the options you’ve set so right now it’s set to Abundant and it’s set to normal and it’s set Auto just so you know what you’ve done and then we can also do uninstall and if you do that it’ll just remove like all the scoreboards and stuff that makes this thing work so you can safely take the data pack of your world without Leaving stuff behind I’m not going to do that right now but you can just click that and it’ll do it then we have generator protect now let’s say you already had like build or something in a Minecraft world like let’s say you like built your cool epic base and you want destructor Generator to work but you don’t want it to have like just like a dungeon just spawned in the middle of your house you can go slash protect and then at your location it will set a marker which if we actually go slash function generator generator highlight you can see it’s Placed a marker right there and anything that’s within like a 200 block radius of this whole area it will not spawn any structures near this area so it’s a way to keep your area safe and you can put as many of these as you want in your World so I can like put one up here if I wanted or like say you had like a like so you’re on a big server or something and you want to keep like the big like shopping area or whatever you want to keep it safe from structures you can Place these just kind of all around it and it will stop it from spawning structures there and then if you wanted if you wanted to remove the markers you can go unprotect if you just do unprotect it’ll still like to the nearest one to you and it’ll be like hey Do you want to delete this and then you can hit yes and then it’ll clear it but if you just wanted to get rid of all of them you can go unprotect all and it will just delete them all and that should be it yeah that should be it and It’s getting dark so that is the structure generator data pack again the download is in the description and you can create your structures if you have like structure packs that you want to create that’s fine too and like you can send them to me you can use this in Whatever you want I just really wanted to make this cuz I I wanted to spawn my own structures but I could not find a good one that did that for you so I created this if anything was confusing you can ask me questions in the comments And I will try to answer them structure blocks have a size limit of a 32 cubed area so only 32 blocks by 32 blocks by 32 blocks so you can’t go bigger than that but I have found a workaround that actually this youtuber Tyrus wu has a video on how you can make Big structures I’ll link that in the description too and then there’s other advanced stuff that you can do too like like one structure has like multiple different versions and stuff if you want to see that I could do that but this is just a tutorial on how do you set up a basic Structure so yeah so I hope this was helpful if you’re confused about anything ask me questions in the comments I will try to answer them and give feedback and thanks for watching and I’ll see you next time goodbye Video Information
This video, titled ‘How to make Naturally Spawning Structures in Minecraft (1.15.2)’, was uploaded by JDawgtor’s Lab on 2020-03-08 21:05:40. It has garnered 47846 views and 1729 likes. The duration of the video is 00:40:40 or 2440 seconds.
In this video I show how to use a Minecraft Datapack that will allow you to spawn custom structures into your Minecraft world.
Download on Planet Minecraft: https://www.planetminecraft.com/data-pack/jdawgtor-s-custom-structures-generator/
Datapack Mediafire Download Link: https://www.mediafire.com/file/wmhr3jnlrr81q80/%28UNZIP%29Structure_Generator_v1.1.0.zip/file
! UPDATE New video: https://www.youtube.com/watch?v=rdkX380_w5E
-Timestamps-
0:00 Intro 03:34 Downloading the Datapack 05:13 Creating a Structure 07:40 Structure Voids 10:43 Preparing for Loading 14:48 Adding Structures to the Datapack 21:34 Loot Table Settings 27:37 Final Step 28:50 Installing into a World 30:25 Settings 32:20 Result 34:13 Structure Packs 36:22 In-Game Commands
Tyruswoo’s Massive Structures Video: https://www.youtube.com/watch?v=Dlp8XjB5huA
Awesome Structure Blocks Tutorial by xisumavoid: https://www.youtube.com/watch?v=8tC8KmJAiDg