Hello hello hello everybody and welcome back to another minecraft modding tutorial for version 1.19 in this tutorial we’re going to be covering a highly requested feature and that is all generation so all generation has changed a lot in the recent updates so let’s just go ahead and get started with our generation Before i get started with this video i just wanted to mention that if you get stuck with anything modding related whether it be with these tutorials or not you can join my discord server which is linked in the description of this video and there are loads of people There who will be willing to help you with your problems and obviously uh loads of people asking for help as well as well as that is just a general chatting server as well so don’t feel that you need to join just for modding purposes anyways let’s get back onto the video So the first thing we’re going to do is come in our init package as usual and we’re going to create a configured feature in it and inside of here as we usually do we want our public static final deferred register and that is of type configured config hello I can’t i can’t spell configured feature and that will take in two question marks inside of the angled brackets and we’re going to call that configured features and that is equal to deferred register dot create and inside of here instead of putting the port registries dot etc we’re actually Going to be doing something slightly different and we’re going to put in registry now you need to make sure this is the correct registry so that is registry from the minecraft not from java.rni so you need to make sure it is the correct one and we want the configured feature registry And then we need to put in our mod id as usual so tutorial mod dot mod id and if we just put that on a new line so that we can see everything a little bit better Then we’re going to need to go ahead and create a replacement map so essentially what this is is a um kind of like a map it’s not actually a map but we’ll stick with it being called a map for now is a map of the block you want to replace to what you Want to replace it with for example stone to your ore or deep slate to your deep slate or so let’s go ahead and create these so this will be a private static final supplier and that’ll be of type list which will then be of type or configuration dot target block state And then we’re just going to call this example underscore over world underscore replacement since we’ll start with the overall then we’ll do the never and then the end and that’ll equal to suppliers dot memo eyes and that will take in a supplier of a list dot of and inside of here we can Supply it with what we want to replace so to do that we do or configuration dot target and that gives us our all configuration.target block state and inside of this target we’re going to give it all features dot stone or replaceables and then we’re going to give it the Block that we want to replace it with which in our case is going to be from our block in it so blocking it dot example underscore example underscore over world underscore or and then you do your dot get and your default block state afterwards and no semicolon because we have another One to do and what have i put that comma in the right place uh no so let’s just move these down a bit separate everything out and then if you want your block to generate below y0 you’ll need to give it a deep slate variant as well so we can do All configuration dot target and this time we’re going to use all features dot deep slate or replaceables and then give it your block again so this time we’re going to give it the deep slate overworld or dot get dot default block state fantastic so let’s just go back through this again First of all we’re creating a supplier here and then we’re providing a supplier with a list inside this list we’re providing a bunch of all configuration targets which will specify that we want to replace anything in this stone or replaceables with our or if it matches So if you do look at stone or replaceables coming to here it’s just a tag match so essentially it looks in the tag for stone or replaceables which is just a vanilla tag if you go into your assets and if you go into your data you will find that in there Essentially it’s just a stone granite and andesite i believe shouldn’t be anything else and for deep slate that will just be deep slate so then you just need to go ahead and do the same for the never and the end obviously only if you have never and end Ors or if you only have never or end ors then you don’t need to do the overworld one but i’m going to be demonstrating all three in this video so don’t worry about it if you are doing one and worrying about whether i will do that or not So we’ll do the never next so we’ll say once again a supplier of a list of all configuration dots target block state example unspoiled never and will replace the bulls replacement isn’t it yes and that’s equal to suppliers dot memorize then a supplier playlist dot off and plunk that down here There we go this time we’re only going to want one or configuration because obviously there’s no deep slate equivalent in the nether and that will just be or features my bad dot and you actually have two options here so you have nether or replaceables which will also Work for a basalt i believe or there is just never so we’ll just use never rack because that’s how our texture is made to be and then we just need to give it our never or not get default blocks right fantastic so that’s our another one Then we just need to do the same for the end this will be a little bit different but you will see that in a second so we need to give it all configuration.target block state example end underscore replacement is equal suppliers Dot memoize and a supplier new line we’ll go list dot off new line new line and in here we’ll do all configuration dot target and this time we’re going to neither need to give a new block match test and this will take in block slot and stud And then just need to give it our alt again so block init dodge end or dot dot default block state fantastic so what this block match test here is is that it just checks for an end stone block instead of checking for these and the reason we have to do this instead is Because vanilla doesn’t have an end variant of these uh never egg or stone or things because they don’t have any oars in the end so they haven’t created one which is fair enough it’s fine we can just create it like that no biggie after that we need to actually create Our configured features so let’s just go ahead and do those public static final registry object registry object or type configured feature we’ll give it the two question marks in the angled brackets and we’ll call this example Overall or is equal to configured features dot register we’ll give it our name as usual this must be lowercase and no spaces no special symbols etc then a supplier of a new configured feature and in here we need to give it feature.org that’s the feature we’re going to configure And then we need to give it our configuration which is just a new or configuration and then we just need to give it our placement so this is the overworld so we’ll do example perform replacement and we just need to do dot get to get it from that supplier And then finally we just need to give it essentially the size that it will be so the max vane size of the ore um i’m just going to give it 11 for the overworld and let’s just move this around a little bit so we’ll put this supplier on a new line There we go now i’m just going to copy paste this for the never and the end and we’ll just go through and place these so never and never and never and then finally the end and end and end and i’m also just going to replace these numbers as well so for example for The end i’ll give it 15 and i’ll say for the never it’s 7 just to give it some variation then we need to just go into our main class as you usually do and say configured feature in it dot configured features touch register bus fantastic so next we need to create a Placed feature and placed features will define essentially how it should be placed so we’ll create a placed feature in it and as usual you’re going to need your deferred register of placed feature and that’ll just be placed features is equal to deferred register Dot create and once again we’re going to give it a registry and this is of registry.placed feature registry and then our mod id as usual and we just need to import placed feature and here we’re going to want to copy in two methods you can find these in the description And we just need to import all of these so once again i think there is a way to automatically import all of these but i don’t unfortunately know because i’m not still too familiar with intellij i wish i was but not sure so then we just need to create our free Registry object for the overworld and and never so let’s go public static final registry object this would be a type placed feature and i’m going to call this example overworld underscore or is equal placed features dot register we like to give it the exact same name as what we called our configured feature So i’m going to do that and then it’ll just be a supplier of a new placed feature inside of here we’re first going to give it our configured feature so configured feature in it dot example overworld or dot get holder don’t get so it’s actually slightly Different we want to get the holder and then we want to get and then we’re just going to provide our common or placement common or placement and then this is the uh the count per chunk so that’s basically the rarity that it will be i’m gonna say there’s about seven per chunk And then we need to give it a height range placement now there are three options here there is triangle uniform and off triangle means that it will be essentially there’ll be more the lower it goes uniform means that it will just be a uniform amount no matter the height And of allows you to provide a custom hype provider but we’ll be using uh triangle for the overworld i think you can use whichever one you want is completely up to you i’m just going to use triangle and then we need to provide it a vertical anchor So the first vertical anchor is the bottom anchor so that’s basically uh the lowest point that your all can generate you have once again a few options here so you have bottom which refers to the bottom of the world you have top which refers to the top of the world You have above bottom which allows you to say okay this should spawn 10 blocks above the bottom of the world for example you have below top which is the same except it will be 10 blocks below the top of the world and then you have absolute values so say You only want to spawn between 64 and 32 no matter the um no matter the height of the world for example i’m just going to give the first vertical anchor the bottom since i think that’s the simplest and then i’ll just give it an absolute value For the top anchor so i’ll say an absolute of 20. in fact i’ll give it 40 to make it a little bit easier for us to find it and we’re basically just going to want to copy paste that for the never and the end so let’s just come into here Change this to never change this to never and i’ll leave the count per chunk the exact same then never i’ll give it a uniform since height in the nether isn’t really a thing um and i’ll just say bottom to top so it can spawn anywhere and then finally the end That’s why i just realized i accidentally gave this one the overworld this needs to be never just make sure that you do change everything that needs to be changed and end here as well and end here as well and in the placement i’ll give this bottom and i’ll say maybe like below top Because we haven’t used that one yet i’ll just say like 100 that should be like the bottom of the end island maybe so then that is our place feature in it so we can go back in our main class and just do place feature in it don’t place features don’t register bus Beyond that obviously what you do needs to create your blocks but i’m sure you’ve already done that because we have a block tutorial ages ago so that’s actually all of the code we can now come into our data and we need to now specify how We want it to spawn so when we want it to generate and um also what biomes for example so let’s come into our data package into tutorial mod and we’re going to create a new directory and that will be ford and then we’re going to create a directory inside of there Called biome underscore modifier and then inside of here we’re going to want to create a new json file and this is going to be called add underscore and then it’s just the name of your placed feature so the name of ours was example underscore overworld underscore or Dot json we’ll start with the overworld and we’ll go from there so we first have the uh basically the type that we wanted to generate at so we’re going to give it type and we want it to generate during the add features so that’s basically um How we want it to modify the biome right so this is the way we where we’re going to modify it we want to add a feature you can also remove and edit but we’ll we’ll keep it with add just keep everything a little bit simpler then we need to provide the biomes that We want to use and for this we’re going to use a tag that minecraft has called is underscore overworld and that means it can spawn only in overworld biomes and you can create your own tag for this if you wish i have a tutorial on tags already you can go and Check that out then we have the features and these are just the features that we want to modify this biome with so i’m going to be using tutorial mod which is my mod id of course example underscore overworld underscore or and then finally we have the step Which is the generation step that we want it to happen at and we want this to happen during underground wars because that’s what our oars are there are other generation steps of course that are i think a vegetable decoration um that’s all i can remember right now but if you look in A generation step class and come down into decoration here you can see all of the different generation steps that there are now we can just go ahead and just copy this and paste for the never and the end so let’s just quickly do that i don’t make this tutorial too long Um as i know we’re already hitting fairly long steps so that’s the never done literally just copy pasting and changing the dimension so end and we’ll say is end and example end-all fantastic so we can now go ahead and we can run the game so i actually have to run in terminal Because i’ve broken something recently so we gradually run client and yeah i’ll see you guys in the game okay here we are we are in the game now when you press single player and you go to create a new world it should say validating selected data packs if it Says that you know you’re on the right lines and things are going well so far um so i’m just gonna obviously do the basic stuff change to creative uh yeah yeah i’ll just leave it at that create new world and if you get this screen warning these settings are using experimental features And these blah blah blah blah you just want to hit yes and that means things are likely to work things are getting more and more likely the more we go along and hopefully we should get into the world and our or should be fairly easy to find so Just gotta wait for the world to generate this always takes a whole minute there’s not much we can do about that unfortunately and here we go it is done so just join the world as well and oh it’s frozen oh yes there we go okay so let’s go into spectator mode and Let’s just go down now i remember we did i think 50 above the bottom of the world so we should start seeing it fairly quickly um just gonna fly around a little bit and see if we can see if we can spot it anywhere it’s obviously still going to be More common the lower down we go since that is how we defined it to be and i’m just going to have to search around a little bit maybe it does seem a little more uncommon than i thought it would be unless it’s not working of course Is that ours yes there it is okay so we’ve have found it um i know it’s obviously not a great texture but you know that’s just how it is you have to bear with me there but yeah that is our or in the overworld so now let’s go ahead and test the nether Let’s set block portal we’ll do never portal and with some flying around hopefully this should be a little easier to find since we set it to uniform and there we go this is our never war once again not great but it it is what it is And then finally let’s go ahead and test the end so end portal hop into here and this should only be below the island since we set it to be 100 below the top and there we go here is our end or fantastic so that’s it for this tutorial I hope you guys did find it useful if you did please do be sure to go ahead and smash your face into that like button and subscribe if you really enjoyed please do be sure to share around and remember my discord server is open if you ever get stuck So yeah i’ll see you guys in the next tutorial good bye [Applause] Video Information
This video, titled ‘1.19.1 and 1.19.2 Minecraft Forge Modding Tutorial – Ore Generation’, was uploaded by TurtyWurty on 2022-08-05 16:30:02. It has garnered 3297 views and 60 likes. The duration of the video is 00:25:24 or 1524 seconds.
Hello everyone, in this video we will be generating our ores into the overworld, nether and end using the new ore generation and placement system!
In the next video we will be making a custom model for an item and a block! Remember, if you have any problems, please join the discord that is linked below!
–Links– Patreon: https://www.patreon.com/turtywurty Discord: https://discord.gg/BAYB3A38wn Github: https://github.com/DaRealTurtyWurty/1.19TutorialMod Trello: WIP