So hi guys from christian welcome to another minecraft mod tutorial today i’m going to teach you how to add world generation to the game so i’m just going to be doing all generation today so i want to get started by adding a new package and i’m just going to call it world gen I’m just shorten it and then i want to make a new class and i’m going to call it origin okay so then this is going to x implement the i world generator so i’ve just pressed control space and obviously it takes ages to update so i Will generator so this is going to make us want to make a method so there we go this is a generator method so this is going to be called when we’re going to be generating the world so we actually want to do something called a switch And if i spell it right it will work so we’re going to be doing a switch so what do we do for switch so we’re gonna get the world dot provider dot dimension get dimension id yep that’s gonna get the dimension id so if the dimension id is zero It’s gonna run this code and if we just put break that’ll just break out of that once it’s done it and i’m gonna put a little comment so i know this is the overworld dimension so that zero is the overwhelm so if you just go here then case one is the end So if you break out of this again and i’m gonna put comments saying end dimension just so i know and then case minus one and if you put the break on again case minus one is in fact never so that that’s just determining which one we’re going to generate it So now we’re going to add our actual generator so if we just do a public world generator and i’m going to call it copper generator if you just make a world generator you’ll have to import that and then you press ctrl space let’s make a constructor and let’s initialize our Copper generator the copper generator is equal to a new world gen minor ball control space and go for this one so we’re going to be mod blocks dot copper underscore all and eight in a vein but it’s got to be the default state so get default state because it is a block State so we’re going to get the default block state so if we had block states and this will change the block state but we don’t so we’re just going to leave it like that now i do in fact have a generator method which you can find a download link to this In a description so if we just paste this method here and just ctrl shift o to import that will in fact generate uh world so here in the generate method this dot generate no run generator you’re gonna run it so the generator is copper generator the world is world random is random Um that’s going to be chunk x that’s going to be chunks said chances to spawn so this is how many per chunk i’m going to have 20 percent the minimum height zero maximum height is 64. and that’s all the world gen but we actually got to register this in the common proxy So i’m going to add a public void register world generators and if we just run this and it’s game registry dot register world generator so the world generator is the actual uh that’s actually going to be a new origin and then mod generation wait just stick That to zero then we have to go into the init method and we’re gonna do proxy dot and register world generators so we can try this out if we run our game and wait for the game to load up okay so the game is loaded up and we can test this out Now we could do it in our test world but you have to go about a thousand blocks away so i’m going to make a new world and i’m going to call it world gen and let’s just put it in creative it’s going to be a normal world and we should See the all generate there we go beautiful world there’s black spike and if you just dig down and we’ve actually found our copper all ready so yep that’s that’s all generation yeah so i want to thank you guys for watching don’t forget to like comment and even subscribe Don’t forget to watch any of my previous videos or last tutorial so yeah go check them out Video Information
This video, titled ‘Minecraft Modding Tutorial | World Generation (1.8.9)’, was uploaded by CJMinecraft on 2016-02-25 17:30:00. It has garnered 1703 views and 24 likes. The duration of the video is 00:06:15 or 375 seconds.
Watch todays modding tutorial to discover how to make an ore generate in the world.
Run Generator Method – https://goo.gl/jS0uHS
Don’t forget to like, comment and subscribe!
Links: ►GitHub – https://goo.gl/YkQYpu ►My Website – http://cjminecraft.theclever.me/ ►Modding Tutorial List – http://cjminecraft.theclever.me/modding-tutorials.html ►Modding Tutorial Playlist – https://goo.gl/ZnZWTd ►Facebook – https://www.facebook.com/CJMinecraft01/ ►Google Plus – https://goo.gl/3n1umj
For modding help or if you want to contact me, email me at [email protected]
My Schedule: Monday or Thursday: ►Modding Tutorial Wednesday: ►Minecraft Adventures Season 2