What is up all my geeks and gamers techique 1019 year coming at you with the long-awaited dimension tutorial today will be the first part of a most likely multi-part tutorial on how to create a dimension now before I get into this I just want you guys to know that This that dimensions take a lot of work there’s a lot of components that you need to do in order to create your custom dimension so if you’re not up for that then I guess you are not fit to create a dimension so then let’s get right into it the first thing we are Going to do as always is create our new package and this package shall be called comm dots F your sapphire dot dimension okay cool and then inside of that we are going to have our dimension registry okay so here we are in our dimension registry as always with our registries We have a public static void stream please and in here we want to have register dimension and that’s that good and of course it is not done yet we need a public static void register dimension error so above this we need to give an out an ID to our dimension and this is Going to be a public static final integer dimension I D and it’s going to equal let’s just put eight because that’s not being used inside of this we are going to first register the provider type which provides how it’s going to load and what biomes are going to load in this Dimension so we are going to have the dimension manager dot register provider type and this is going to be the dimension ID and the provider is going to be something that are gonna create called world provider sapphire dot class and keep loaded we’re gonna put false This means if you’re not in it we don’t want it to be loaded otherwise that’s going to take up some memory and we really don’t want that the other thing we need to do is do a dimension manager dot dot register dimension and we’re gonna have the ID as well as the ID Again and that’s because that is the provider because it’s right here so we’re obviously going to need a new class and that’s going to be the world provider inside of our provider is going to extend world row writer okay and we’re gonna import that and then we’re going to use the unimplemented balance But that is not all of the unimplemented methods so we’re going to first before we get into that we’re gonna have a public void register world chunk manager and what this method is going to do is it is going to give you the type of the chunk manager so the certain Chunk managers are like well we could look into it in a second so hold on so if we do this dot world chunk manager and we’re gonna do a new world chunk manager now this can be either overworld or hell and basically house I think another dimension I believe so that is What we want and inside of this we’re going to let’s just why not put our biome as the biome that is going to spawn and I don’t exactly what is the parameter what’s the float oh the rainfall right so that’s doesn’t really matter and that’s like the color of the Grass I think we had that in our biome as well right there it’s we’re gonna import that and then we’re going to have this dot dimension ID equals dimension registry dimension ID and that is going to manage our chunks for us such as what loads in each Chunk next we’re going to need it to get in a chunk provider which tells it what to generate in our dimensions such as caves and villages and those kinds of things chunk generation and we’re going to leave that blank for today because that is very involved and we’re going to Go through the simple stuff today so I will get into that if we have time otherwise that is going to stay like that and we’re just gonna return them you know for now just so that it doesn’t give us an error the dimension name well this is just the name Mentioned it’s a string and we’re just gonna call it sapphire why not okay so that is was a problem I think I spelled it wrong or something what’s what do we mean oh I didn’t save it there we go okay so that is our world provider tells us what biomes and that Is what we’re going to do for now so the next thing we’re going to do is we actually need to create a new block this block is going to be the the portal block itself you know like for another portal of the purple thing that is Inside of the obsidian that is the type of thing I’m talking about yes that is an actual block and so we’re going to do public static block we’ll call it sapphire portal I guess yeah I’ll do that sapphire portal and that is going to be sapphire portal equals new sapphire Portal that’s a class and that is so it’s gonna have for now and so then we’re going to have to create a new class let’s just go back here and save as well as register into the game register and we’ll just call okay fetch now if we go into our portal block We’re going to have it not extend block but extend block portal because it is after all a portal first thing we were going to need to do is obviously set up a public sapphire portal with no parameters and we’re super and the first thing we will need to do here is we’re Going to need to do a method that is called update X and that import everything and the random is that I think so basically what this is going to do is it’s going to take all the blocks so that you can you know spawn animals And stuff in here I’m not sure if this is exactly necessary so we’ll leave that to the end we’ll leave that to a little later so right now we’ll just comment that out and we will come back to it the first thing otherwise that we’re Going to need to do is do a public axis one out get collision down a bounding box from cool world as well as world X why I mean Y and H Z how does that and and to import excess Allonby obviously we need to return statement This is going to return you know because we do not want it to have a bounding box because it is a portal block obviously okay okay okay next thing is public lien render as and this is going to return false because it’s not a normal block it is in fact a Portal not just a regular block okay next thing is we’re going to create a method called public void on neighbor change so basically what this method is going to let’s just add and what this method is going to do there what this method is going to do is Is going to check so you know how you have another portal right and if you destroy one obsidian anywhere on the portal other than the corners it will destroy the portal the portal will be gone that’s basically what this method is going to do if the block that we are Going to use for the border of the portal is destroyed beside it then it is going to break the portal and that’s what the neighbor block changed because it’s the buck next to it you’ll see once we actually get into it so we’re gonna Have a bite and it’s going to be B zero and it’s going to equal zero and the white B 1 is going to equal one and then we’re going to have a quick statement and it’s going to say if the world if in this world get block so it’s the block At the X minus 1 which is 1 to the left I believe yes the block to the left of this portal block which is why we’ll have Y Z and then equals equals sapphire block sapphire or if it equals that for an diamond or so if the block next to the Portal to the left of the portal is a sapphire or or the block per block to the X plus which is to the right of the portal block is the same thing then the fight zero will equal zero and the bite 1 will equal 1 which means it will be true Obviously so then the neighbor block change you know it’ll it’ll there will be a portal there there’s going to be a portal if there is a block to either the left or right of the portal block next thing we’re going to do is create a new integer this integer is going to be Called i won so we’re going to create a for loop here for I 1 equaling Y so I want is now equal to Y if the world got get block is the X then I 1 and Z and the I 1 is going to be subtracted by one And it’s equals this alright nope sorry minus minus a 1 so for the block being this if if it is whoa it the port one portal block is also this so for this being that it’s not going to do anything because it will work then we’re gonna write another if Statement and if the world does get block and it’s going to actually be the same parentheses as this one right here if the block below this portal block if the block below this port Ibaka is not equal to our or which is going to be our Portal or is not equal to that then we want it to set block to err in all of the above XY and Z so if the block below the portal block is not this sapphire or or the portal because we have that for up there so it can be that but if it’s Not the book if it’s not that one then it goes on to this one and says if it is not the or either then we set the whole portal to air in all X Y and Z’s of this portal the next thing is going to be an Else so if this is not true then we’re going to have an integer of j1 and we’re going to have another for loop and it is going to be for J 1 equals 1 J is greater than 4 and the block is is why Z and this is not going to be why This is going to be I 1 plus J 1 equals equals this plus J 1 so this is saying that J 1 J 1 is going to equal 1 which is whatever and if J 1 is less than 4 and the block is this one I 1 is y so Y plus 1 Basically the y plus 1 block which is the one above it is this block so basically like that it’s going to be the same thing there and then below that we have another if statement and it’s going to be if J 1 equals 3 and the block and The block on the X I 1 plus J 1 or Y plus 1 equal and Z is equal to our or is equal to our or which means that the for loop is true because J 1 is going to equal 3 so J 1 is less than 4 so Basically all of the blocks above it earned at what plus 3 above it 1 2 3 which would be the top Obsidian if that is our or then we are going to have a flag we’re actually going to have a boolean flag and it’s going to the world dot get Block and this is going to be the X we’re just gonna put y&z for now but we are going to change that right now the first flag is X minus 1 which means to the left of our block equals this which is our portal so if the top block is That and we have the the block to the left is the portal block or the block to the to the right is a portal and then we’re also going to have another boolean flag I’m just gonna copy this and paste it and this is going to be the same Thing except with the Z which is the backwards one and then also in front of it so basically we’re going to have to lean flags here this is supposed to be flat one outside of this now inside of this if statement we’re going to have another if statement it’s going to say a Flag and flag one then we’re going to world that set box to air in the XY and Z so basically what this is saying is if there is a block if there is a sapphire block – or no if there’s a portal or if there’s any block I think it is if There’s a block to the left or right and the back or front which would be like on all sides of it basically then we need to set it to air because that is not correct so that’s just how it is now we’re gonna have an else and it’s going To be if two things here world that get block X plus B 0 + y + Z plus B 1 does not equal that one if it does not equal that or so if so if we go right here B 0 equals 0 and B 1 equals 1 so if the X if The portal if we have a our same Y and we have a Z in the a block in the back if the blah in the back does not equal public or I mean sapphire or for the block to the this is oh no sorry up here b0 I reverse this oops that would’ve worked so basically if we have the if we have a block to the if it’s not that or we have this and this is Z minus B 1 does not equal this and then we’re going to have outside of this and world dot get block X minus B to 0 Y Z plus 1 all right no sorry Z minus B 1 does not equal or and then or and this is going to be basically the same thing as basically the same thing as this right here I forgot a minus sign it seems and this Should be a plus and plus and this over here should be minus and this one is because not equal this then it’s basically if the war if the block to the right does not equal sapphire or or the block to the left does not equal a Portal and the block to the left does not equal or and or the block to the right does not equal the portal then explain this when we get into the game I’ll show you what this means then we’re going to set the block to air as always In every direction that and then if we go one two three outside of here and we have another else loop and we’re going to swirl dot set again and this was from which one was this from that was from this one that was from here so unless It’s this then it’s gonna sets here so let me let me actually boot up the Minecraft game itself to show you guys how this works we’re actually almost on thirty minutes here so right after this I will probably end it and we will go into the next part sometime later so Let’s wait for this baby to load up obviously the portal block is not going to take us anywhere and that is because obviously it we do not set up to everything so I just went into this world I have all of our armor on because you’re testing the last time so Obviously our block is not here but I will show you how this is going to work so let me get up the glass pane to model a portable lock turn off music sounds okay so basically we’re going to have our portal right like that and like that This is going to be our portal right so you have all of your portable ox in here right so these are some yeah these symbolize our portal blocks right so if we look over here to our code right we are saying right here if the block to The under it under the portal right there does not equal this or so like if we go like that if it doesn’t equal that then we’re going to set the whole thing to air it’s just going to get rid of everything I still your music and it’s Off so basically it’s going to set it all to air and then over here we have the else and the flags which this is all like the block up there basically has to equal it and the blocks and then the other line says the block To the left which if it was this one has to be the Porta blackboard the Box to the right which should be that one in this case and then we also have if there’s like a portal block back here or something that’s why you can’t have both The second one needs to be false so like that’s why it says if flag and one and two then set the whole thing to air so you can’t have another that’s so if like to support will spawn on top of each other you can’t have like both portals otherwise it’ll like conflict or Whatever so that’s just what that’s saying all this is like let’s see what we got we’ve got the X plus one so to the right doesn’t equal that so I if it’s this one if it doesn’t equal that and then it’s like if this one or if This does not equal that one or this doesn’t equal that one then it’ll just break the entire portal so basically it’s a bunch of instances saying that if we delete something like that it’ll destroy the portal if we destroy something like that it’ll delete the Portal like if a gas blows it up it blows up one of the blocks so it’s like boom it’s gone and they’ll get rid of the entire thing and that’s basically what that is saying so that is going to do it for this part of the tutorial Thank you guys so much for watching hope this helps you if it did be sure to hit that like and subscribe button the next few parts will be coming in the coming days this is going to take quite a few parts because there is a lot of classes That we actually need to create but no worries we’ll get to it and we’ll have our portal working in no time so once again thank you guys for watching and I’ll see you next time peace you Video Information
This video, titled ‘[1.7.2/1.7.10]Minecraft Forge Modding Tutorial #17 – Custom Dimension : part 1’, was uploaded by techgeek1019 on 2015-02-14 03:54:31. It has garnered 11815 views and 120 likes. The duration of the video is 00:34:04 or 2044 seconds.
Check out the other tutorials here: http://bit.ly/TechgeekTuts
Don’t forget to Subscribe: ►►►http://bit.ly/SubToTechgeek1019◄◄
src code: http://bit.ly/ModdingFiles
Social Media ● Twitter: https://twitter.com/techgeek1019 ● Facebook: https://www.facebook.com/techgeek1019youtube ● Instagram: http://instagram.com/techgeek1019
Thanks for watching all my geeks and gamers! Remember to rate, like and subscribe if you haven’t already!