Our trees go strong and big let’s add trees and custom tree generation to Minecraft Or and in this in this tutorial we’re going to be adding custom trees and custom tree generation to Minecraft a very very much requested topic over here and let’s start this so first of all we of course need all of the blocks necessary for our well for our tree so For this what we’re going to do is we’re just gonna get the jumpy block over here once and we’re gonna make first of all the Dogwood log and yes that apparently is a real type of wood I have checked I wanted to have something that’s uh well That’s not seen before so there you go now this is going to be a pillar block very important so this is going to be a new pillar block very very important here and of course we also want certain things namely we wanted to copy the actual fabric block settings here from Blocks.org underscore log because this of course is the Dogwood log here now in theory we actually don’t need neither the strings nor the requires tool so we should get this from the log now you can you could of course keep this but we’re going to keep it like this that’s going To be fine now let’s duplicate this four times actually we need it seven times uh eight times I’m not even sure like it’s a lot of times basically yeah I think that this should be right because then we have uh Dogwood wood um very a little bit of a bad naming Scheme here but that’s okay so I’m gonna basically do call this wood changing the name here as well that’s very important and here here we also want to do oak wood in this case and this one is actually the stripped variant very important here this is going to be the Stripped underscore DOT log Dogwood log yes and then hear the name as well so stripped underscore making sure we copy from the stripped Ogle log yes and this is the stripped dog wood would because that is a great name for a band maybe I don’t know there you go strip the Dogwood wood and then this is the stripped oak wood yes there you go so now the pillar blocks are all done then this is going to be the planks now the planks are very important are of course first of all have to be renamed that is Number one so this is the Dogwood planks and then this is only a normal block this is very important that we do not have this as a pillar block because it is indeed not a pillar block this is going to be the planks there you go then This is going to be the leaves this is the dogwood leaves there you go and here as well and this is now a leaves block also very important that we choose the correct one and then we’re just taking the oak leaves here there you go and then last but not least actually last But almost the most important is the Dogwood sapling in this case there you go and this is as you can might imagine here a sapling block now actually what we need is we’re just going to put in a comma here because the first parameter of the sapling block class right of the Constructor here is actually a tree grower in this case or a sapling generator and this is something we’re going to well have to actually create in just a bit but for the time being now our blocks are added let’s now go through the uh crazy process of adding Well all of the crazy things that we need to add number one the different block renders here so this is going to be for the leaves that’s going to be cut out is fine and then for the sapling the cutout is fine as well so that is Definitely should be added here and then we also actually need all of the Json files so let’s start with the Json files and then there’s some other things that we need to do so namely it’s going to be basically baking making the stripped variants and the normal variants you Know sort of Faking it so that you can turn one into the other and then also the flammability of all of those blocks because right now they would not burn we’re gonna start with the Json files now all of this as well as all of the Code is as always of course available to you in the description below gather posture an individual just as well but for completion sake here we’re just going to copy this over it isn’t anything crazy right the sampling literally just points to a model file while the log here in this case has a Rock State Property called axis with X Y and Z as its three possible values and then just points to a different model and also rotates the block around this at this point really shouldn’t come as a surprise to you this is literally how the Norma Woodworks and should be I mean Pretty much fairly self-explanatory let’s also add the translation over here and here we are the translation has been added and then the models now when it comes to the models that are actually a few more block models than just well as many blocks as you have basically Because there is also the the horizontal one and the and the wood one and stuff like that so let’s just get all of this over here and it should be in theory nine of them I think that that is right but I guess we’re going to see when we Go into the game and nothing works then we’re gonna be able to see that as well but I’m pretty sure that this is going to work no worries when it comes to the items same deal here it is one for each block this time uh especially here is the sapling that Is actually a points to a block texture in this case now of course the reason for this is because of the texture that is displayed in the uh that is displayed in the world right that’s like a cross is the same texture that we have inside Of the inventory that’s why this in this case going straight block texture just so that we don’t need two textures of the same like the same texture twice like that that doesn’t make any sense let’s get the textures over here as well because I’ve set texture so often that At this point it almost sounds made up like a made-up word but it isn’t so then we have all of this done that’s pretty good already however now of course we need to make our blocks flammable now to do this what we’re going to do is we’re just going to Make a new class over here we’re going to call this the mod flammable blocks over here let’s go and we’ll just make a public static void called register register flammable blocks there you go like it and then what we want to do is we want to make a Flambo rock block registry or just you know a registry here equal to flammable block registry dot get default instance and then what we can do is we can call registry.add we can then add the block so block modblocks.mod blocks please there you go DOT log and the log has five and five And I’m just gonna copy this over here there’s going to be the wood also has five so the Dogwood wood has five and five and both of the stripped variants also have five and five there you go while the planks themselves have 5 and 20 and the leaves those are crazy they Actually have 30 and 60 apparently now you could look this up in the fire block class actually that is where all of those different values are now we still need to call this this is of course important right mod flammable blocks.register flammable blocks if you have any other ones you can of course Just add them here via this registry and then that should work as well so that’s pretty nice already but we need another thing and that is the stripable thing so we’re going to do mod stripable blocks as well and we’ll just do Public public static void register strippables sure That is going to be fine and this one uses the strippable block registry right here dot register so this is the input so modblocks.log is equal to modblocks.striptlog and then here it’s going to be the wood in this case so this is the Dogwood wood is equal to the Stripped Dogwood wood there you go damn and then we also want to call this now to me if you want to make this a little bit nicer you could you know also just put both of those in the same class just have one method that calls everything But you know that’s like basic Java stuff at this point I think that you should be able to do that if you so choose to at the time at this time we’re just going to call the register strippables here as well and that should be that so now we have them scrubbable And we also have them well flammable which is a really awesome indeed and the only thing that is missing here is the sapling block one now this sort of crosses over a little bit into a world generation because when you actually spawn a tree it already uses some World Generation for this in the feature package we’re gonna make a new package called tree and instead of here we’re gonna make a new Java class called The Dog Wood sapling sapling generator there you go which will extends the sapling generator class this one right here hover over this and implement the method The get tree feature method now I will actually make a deliberate error right here just so that I don’t forget to actually add it here and now in the mob blocks class we can just make a new Dogwood sapling generator there you go and that is now the modblocks class done Now we can proceed to the mod configured features because this is where our tree so to speak is going to be created I’m just going to create this at the bottom here and I will be copying the entire thing over now I will explain line by Line and also of course as always you have everything available in the description below get up after an individual just as well so you can take a look at this copy the order from there and then you will see so as you can see we have a registry entry over here of Configure feature of three feature config question mark and is called dogwood tree interestingly enough now this is basically registered under the name dogwood tree this is a tree feature and then we need a tree feature config Builder right here now there’s all sorts of different things that are in here the First one is a block State provider of the Dogwood log now what does that mean well basically this particular this particular block that you’re supplying here is going to be placed as the trunk right and whatever trunk your Q choosing here in this case it’s a straight plank A trunk Placer I can middle Mouse one click and actually see all of the different trunk placers here you could in theory also add your own trunk place or however it’s very complicated and we’re not going to get into this at this point the straight trunk Blazer here Basically there’s just the base height and then you have two random Heights that are basically being applied here so the straight trunk plates are literally just places these particular blocks here in a straight line up and then we have to supply the leaves here via a block State provider as well and that same thing right you could put in in theory any Block in here that you want right so you could in theory yes you could make a you know gold uh trunk with diamond leaves that actually does work I highly recommend just playing around with this A little bit having a little bit of fun trying out some different plasters trunk places trying out some different numbers here as well that can only always help same thing here with the trunk laser as with the foliage Placer in this case it is just a blob foliage Placer so it’s Just gonna sort of place the leaves in a blob for sort of fashion with these numbers right two zero and 4 height here in this case once again just play around with the numbers a little bit and then you’re gonna see the different ways that This works now when it comes to the two layers feature size this is still something that is a little bit of a mystery to me I think this has to do a little bit with the fact that how close the different trees can be together I believe although I’m not 100 sure here That is still you know because at the end of the day the world gen is quite crazy indeed so that is one thing that I’m not 100 sure about however we now have the registry entry right here so in theory what we can do in the dog sapling Generator we can now return mod configured features dog dog tree dogwood tree there you go and that will be that and now from our sapling we can already spawn our custom tree and that’s actually what we’re gonna do right now we’re gonna try this out so let’s just Go into the game and see if our tree already can spawn from our sapling Aha and we have missed something and that is exactly the copying of these this particular setting here this actually will lead to it not working so make sure to copy from the correct block and now Everything should work so now let’s jump into the game and see if it works alright we find those back in Minecraft and as you can see all of the different world wood and leaves and sapling has been added so now let’s place it down and let’s see if we can grow it with Some bone meal and indeed we can however apparently something happened with the leaves so this is probably something to do with the block State file because of course the model here works but that is of course fixable and also what you will see is that the leaves are decaying Right here now we can also fix that very very easily indeed but this is the first part that already works really well so the actual tree does Spawn from a sapling so that’s a very good indeed so now let’s fix the trees or fix the leaves in well more than one way right So for the texture let’s just search for leaves in here we should be hopefully able to find something so you can see that that is fine so missing a model for a particular variant over here let’s just take a look at the leaves variant and then we will see actually there is No leaves block state which probably explains why that wouldn’t work so there you go so that is absolutely no worries let’s just add the dogwood leaves here as well and there we go now this should fix the error there and to fix the despawning of the leaves actually under Data Minecraft tags in the blocks folder we want to add our logs to the logs tags or logs.json and I will just copy over the contents of this in this case there you go so it’s just all of our wood log and all of that so that these particular Blocks if they’re close to the leaves and the leaves will no longer despawn all right so now let’s continue with the world gen itself so for the world gen itself of course we’re going to continue with the configured features as well as some placed features so how is this Going to work well it’s going to be very very strange indeed however not to worry we’re gonna get through this nonetheless so the first thing we need to do is basically we need to turn this place out of this configure feature into a place feature so let’s get the first one over Here so this is the placed feature here called Dogwood checked now this basically just takes this configured feature here and checks it if the where to place it basically and checks if at that position where the feature wants to place the tree the sapling can survive now this is actually incredibly Important and needed in this case because if you don’t have this then your tree will just spawn like in the in the trees like in in the air and all of that so this is why this is so extremely important to add next thing we’re going to need is another configured feature so We’re going from configure feature to place feature to this configured feature which is called the spawn now this is very weird because it literally takes the Dogwood checked and has a 50 chance of placing that one down and a 50 chance of placing the same thing down as well I Still haven’t figured out how to do it any other way this is why I’m doing it this way if you have a better option please do feel free to leave me a comment down below and I will be sure to check that out but for the time being This is the way that I’m doing it I’m doing it and this is the way that it has been working for me at least and then we can go to the mod Place features class and actually get the placed one in here so this is the last One once again there you go and this is the placed feature we also call place so this is the one we’re gonna spawn in just a moment now I have one particular thing the create count extra here how does that work well it’s going to place Down one tree and then there’s a 10 chance of placing two extra trees down now this chance right here is very important so that you get this right so this has to be one divided by this has to be an integer otherwise it won’t work so basically what you’re gonna have is If one divided by 0.1 of course is going to be 10 absolutely no worse so 0.2 is going to work right uh we’re gonna have Point uh let’s say one divided by 0.5 it’s gonna work that’s fine but something like 1 divided by point six that is not going to work So that’s very important it has to be an integer otherwise it will not work I don’t know why that is the case if you do do this and it’s wrong then you’re going to get Chance data cannot be represented as list weight but keep that in mind very strange that they have They’re doing this like this but fair enough that is just how it’s going to be so do keep that in mind and now for this we’re going to make a new gen class over here so this is going to be the mod 3 Generation generation there you go Let’s take a look at the model or generation there you go where’s this code like I think I’m calling this yeah I’m calling this directly we’re going to fix that in just a moment as well but that’s okay that’s going to be public static void generate threes and what we’re Going to do here is the following nothing too crazy very similar to the origin actually biomodifications.ad feature we’re going to do biome selectors that let’s do found in Overworld actually now let’s do let’s do a specific one let’s do include by key and I believe this should be Under biomes it’s under biome Keys yeah there you go buy on keys and we’re going to do this in plain so we’re gonna only spawn this in Planes biome and it’s going to be generation step very important this is vegetal decoration very important here and then mod placed features dot Dogwood placed Dot Getkey.get and that should be that now we’re going to just add a new class over here this is going to be the model World gen class and I’m just going to have public static void generate then no or rate generate there you go World gen sure that’s gonna Be fine and this is going to call firstly model or generation generate worse because that’s like the or generation generates first and then we want mod tree generation generated trace and now instead of calling this one we’re just gonna do do mod World gen and then generate origin and there you go That should pretty much be everything that we need to do so I guess that should be pretty much everything that there is so let’s go into the game make a new world and see if it works alright as I’ve said don’t forget to create the new world here create new World and then let’s see if our trees spawn in the planes biome but I’m pretty sure that they will that’s gonna be very interesting indeed all right finds us back in Minecraft and well let’s just locate a biome planes over here and let’s Port over there and I’m pretty Sure there we actually go the trees are already here we have got the logs over here and all of that craziness so that is actually amazingly perfect and well I mean that’s that’s actually great so they spawn you can see the leaves also work and they won’t also despawn so That’s pretty awesome indeed and that’s how easy it can be to add some custom trees and tree generation to Minecraft right but that’s gonna be it for this tutorial right here I hope you found this useful and you’ll learn something new and I’ll see you all in the next tutorial oh yeah Video Information
This video, titled ‘Minecraft 1.19.2 Fabric Modding Tutorial | TREES & TREE GEN | #32’, was uploaded by Modding by Kaupenjoe on 2022-09-26 13:59:48. It has garnered 2649 views and 54 likes. The duration of the video is 00:18:38 or 1118 seconds.
In this Minecraft Modding Tutorial, I am adding custom Trees and Custom Tree Generation to Minecraft 1.19.2. All in Fabric and Minecraft 1.19.2.
== SUPPORT ME ON PATREON == ▶️ https://www.patreon.com/Kaupenjoe
== ASSETS & DOWNLOAD LINKS == GitHub Repo: https://github.com/Tutorials-By-Kaupenjoe/Fabric-Tutorial-1.19/tree/32-treeAndGeneration Gist: https://url.kaupenjoe.net/yt434/gist Assets Zipped: https://url.kaupenjoe.net/yt434/assets
== 25% OFF FOR GAMING SERVERS == ▶️ https://www.bisecthosting.com/Kaupenjoe
== TAKE A LOOK AT MY COURSES WITH COUPON CODES == ▶️ NEW Forge Modding with Minecraft 1.20.X: https://url.kaupenjoe.net/CourseForge120X ▶️ Learn Forge Modding with Minecraft 1.18: https://url.kaupenjoe.net/CourseForge118 * ▶️ Learn Fabric Modding with Minecraft 1.18: https://url.kaupenjoe.net/CourseFabric118 * ▶️ Complete and Roblox Lua Game Development: https://url.kaupenjoe.net/RobloxCoupon *
== SUPPORT ME ON PATREON == ▶️ https://www.patreon.com/Kaupenjoe
== SOCIALS == Discord: https://discord.com/invite/yqxykanpWf Personal Twitter: https://twitter.com/Kaupenjoe
Instagram: https://url.kaupenjoe.net/tutorials/instagram Facebook: https://url.kaupenjoe.net/tutorials/facebook Twitter: https://url.kaupenjoe.net/tutorials/twitter TikTok: https://url.kaupenjoe.net/tutorials/tiktok Written Tutorials: https://url.kaupenjoe.net/tutorials/blog
== LICENSE == Source Code is distributed under the MIT License. Additional Licenses for other assets can be seen below or in the accompanying CREDITS.txt on download.
== ADDITIONAL CREDITS == Outro Musik by Kevin MacLeod: “That’s a Wrap” Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 3.0 http://creativecommons.org/licenses/by/3.0
== AFFILIATE DISCLAIMER == * Some of the links and other products that appear in the video description are from companies which I will earn an affiliate commission or referral bonus from or are my own products. This means that if you click on one of the product links, I’ll receive a small commission or additional kickback without any additional cost for you. This helps support the channel and allows me to continue to make videos. Thank you for the support!
== HASHTAGS == #Minecraft #MinecraftModding #MinecraftTutorial #Kaupenjoe