All right my bad guys it’s Christmastime and families coming over and whatnot so yeah it’s going to be kind of busy around here I might have some more interruptions I don’t know but back to where you’re saying um you want to you’re going to want to keep this the Same and go ahead and replace this I left a comment here with I block with a leaf I mean you’re going to scroll down and then right here you’re going to you probably saw block grass stop block ID this is what it’s this is the block that The tree can spawn on so i made my sand just because i wanted to be different so mine trees spot in the desert but they only spawn on sand so if there was some dirt in the desert they would not spawn on dirt so this is the block that the Tree can spawn on so i’m going to emphasize this can um so list yeah this is what thing is but right here when the tree actually spawns like let’s say the tree spawns on sand this also used to be dirt I’m pretty sure this was dirt for You guys this was grass and this was dirt now what it does is when the tree is created on sand and this if you kept this as dirt it would create a dirt block and right underneath the tree so if you cut the tree down you would just Have a random dirt block right there now this like I said saying equals block created underneath the tree so what this did I guess was when you had a tree it can spawn on grass but once you plant the tree down you just have soil left Over until you know what the grass would spread and whatnot so yeah you’re going to want to if I mean if you want to put I don’t know if you want your treatise one on snow I don’t think Eiling and spawn so but like if you just want a Regular tree just make this grass and make this dirt and you’re going to get it normally um actually you know what I’m gonna I want to I really want to show you guys this because I might seem confusing so if we put that as dirt let’s go ahead and create a new World in the desert and i’m going to show you what it actually means that it puts a dirt block underneath come on generate a little faster okay so we see that our trees I should probably make the trees a little I don’t know less bright because it’s just this color is Kind of annoying now that’s just way overused okay so let’s cut a tree down and you’ll see it’s on sand its spawn on sand but it created a dirt block underneath it so that’s what that that’s I mean that’s it that’s what the thing is look all we’re here we can go ahead And test this out 15 chance of getting a cookie and looks a lot 15 alright so we’re good what is it over there alright so we’re good with that so now you know what it is so if you’re spawning on grass makes this dirt if you’re spying On sand if you if you’re making some kind of a sand tree make this you now spawn on sand and there’s already people outside my door so you might hear some voices alright so now do we have those two again I have comments in there so you should help you out there’s another Thing right here blocking leaf um you’re going to want to replace that with your own leaf and two more is a leaf and they log just go ahead and replace those and play around with this like this is what creates the tree this is what creates The shape of the tree so you play around with these numbers like all of these numbers right here play around with them because this is what creates the shape of the tree and I did not try making any new types of trees but just like play around these numbers like you can make Like really really tall trees really like there’s like all the leaves along like there’s like five leaf radius around trees there’s a ball on top whatever you want like play around these numbers and see how it works out for you if you want different textures for trees and While people are allowed outside my door alright so now that we have this let’s go ahead and I mean we’re done with all three hour classes let’s go back in there mod block IAM we are almost done alright so we’re going to go to our generate surface class and this is this Is what we’re going to add right here so first of all we need to create a biome gem base to figure out what biome we are in right now so go ahead and create biome gem base I just name my biome world get world trunk manager dot get Biome jet at and then bass accent bass C is what we pass into our method right here up top there’s two two parameters so that’s what that’s what they are now next we are going to make a world gen blocking tree so our own class and then Mine tree and a new world blocking gen blocking tree empty constructor because we’re inside a constructor so there’s that now we’re going to make an if statement now you might I don’t know you might not get this so try to copy this from the source code I provide on the Honest on the topic why are people yelling outside my door oh my god honey I need some like thicker doors or something alright so you’re going to do an if and then to prevents to opening parenthesis and then this is where you’re going to do look this is what it Means trying to copy it if you want but try to copy it off my source code because I don’t really want to go through all the things so pretty much but if biome which is our by only that we are currently in is an instance of I Don’t think we’ve seen this yet of Minecraft but pretty much like if of the class and then if the like if the biome is an instance of biome gem planes so it’s the biome is planes we can move on what this means is or so if the biome is Planes or forest or pills or swamp or desert or Tyga we can spawn in here now you can delete these if you don’t want your tree to spawn certain biomes so if we delete or desert right now there will be no trees because the the same is only in a desert I mean It’s only it’s only place you’ll find sand except maybe like on the beach or something so um if we go and look at our by own classes so you’re going to want to find biome Jen here all the biomes you can find there’s desert forest hell Hills mushroom island ocean plaines River snow like all of these are biomes so go ahead and fill it in whatever you want delete whatever Bibles you don’t want and I mean my tree pretty much responds in every single biome but only on sand so you know just choose your biomes whatever you want next we’re Going to do the same thing almost the same thing as we did for our thing up here is make sure to like put braces after the if statement okay so usually are people yelling I’ll tell my daughter alright so you’re going to put braces opening closing braces after an if Statement and inside of that if statement you’re going to put a for loop now you’re going to do exactly like what we did before up here so for int x equals 0 x is less than four now this is how many trees do you want in one trunk I have four trees and a chunk of 16 by 16 then it’d be too much let’s let’s bring it down to two trees and let’s do that and I put a semicolon x + + to increase whatever you guys know anything if you don’t know four loops but pretty Much make another body opening closing loop I mean opening closing brackets then put your int yeah this figure out what you want and int k or let’s just name it I don’t know let’s stop name it X but yeah let’s just name it k that’s What those in a that’s what was in the generating class so int k equals base X dot R & R next in so this is what we did right here this pretty much like what is the value the x value and we can get rid of this eighth See if that works pretty much like the x and z coordinates of where you want you treat a spawn so you can spawn from anywhere like from 0 and 16 there’s that so you can spawn anywhere on the on the thing on the on the chunk so you want to NK is base xbox ran in the same thing we’d up here into l well you know what to make this easy let’s name its x-coordinate and z coordinate and he put x cordon and z coordinate and the next you’re going to want to get height value If that is so you want to do int let’s just do i I get height value so x coordinate and z coordinate so into i will be world that get height value x coordinate Z coordinate and then finally we’re going to want to generate the tree itself so tree whatever you named your Thing up here treat i generate you’re going to pass in the world r and which minus R and yours needs beer and um so if you’re getting an error right here try to put in rain dumb then you want to put an x coordinate the eye and then the Z coordinate and that’s pretty much all I mean let’s check it out so we which yeah we downsize to two trees / trunk again if you’re making a tree in a desert i highly suggest playing on the playing on the seed desert because right we need turn around there’s a desert Right there it’s really easy for debugging i actually just found this out like I randomly has set the desert and that worked so okay so we’re getting about two trees / trunk it’s uh yeah I can see that yeah it’s not that crowded you can maybe do Like one tree / trunk you know it’s not that crowded it’s it’s fairly decent if you if you’re going to put trees in in other biomes for example um make sure to do it like you know one tree / trunk that’s that’s pretty decent cuz there’s Going to be some other trees in there also and whatnot so I mean this is this is fairly decently uh I don’t have had the word I forgot it that’s not organized but it’s fairly recently placed so it’s not you know it’s not too heavy on the on the trees but it’s Pretty decent it’s about what you find a gnome forced so you know that’s that and yeah make sure there’s the custom texture of the trees now it finally works cuz i forgot about the other method but yeah so that’s all I got um the code will be up on the Minecraft Forum that net topic in I mean it i think it’s going to be up before you even see this video so that’s good so make sure to check on there make sure to LIKE debate if you liked it comments down in a comment section below all your Errors and suggestions do not PM me I’m I’m getting sick of them already sorry but i’m like i’ve said this so many times and I just keep getting people messaging me errors like no I’m probably not going to get to your area because your error has been already answered on The forum so please look on the forum yeah all your suggestions and errors check out the description below there’s a link to the forum make sure to check out the topic post on there I will probably answer it if it’s on there I’ll probably not answered if you PM me so You know it’s it’s all about you and how you want your things answered the code is also on their source code download is also on the topic so check that out and that’s all i got i hope you guys enjoy a washing new trees and saplings are Probably going to be next so yeah watch out for those so thanks for watching see you Video Information
This video, titled ‘Minecraft Modding Made Easy: Custom Trees and Generation! Part 3 (HD)’, was uploaded by x2robbie2x on 2011-12-24 20:31:55. It has garnered 2675 views and 23 likes. The duration of the video is 00:13:28 or 808 seconds.
Info & Downloads in description!
MCForum: http://www.minecraftforum.net/topic/827181-tutorial-minecraft-modding-made-easy/ Eclipse: http://www.eclipse.org/downloads/ MCP: http://mcp.ocean-labs.de/index.php/MCP_Releases MCP’s Twitter: https://twitter.com/SeargeDP Modloader: Google “Modloader Minecraft” – first link Minecraftwiki Item/Block ID chart: http://www.minecraftwiki.net/images/8/8c/DataValuesBeta.png ____________________________________ Make sure to check out π http://www.youtube.com/user/x2robbie2x https://twitter.com/#!/x2robbie2x