New ores in the depths below and thus let’s add custom ore generation to Minecraft playing Minecraft is awesome playing with mods is even better but the best is playing with mods and Friends official partner of the channel bisc hosting has you covered with its easy to use panel you can effortlessly install Over 2,000 different mod packs with one click of a button but it gets even better if you use my link in the description below and use the code count Jo a checkout as a new customer you will get an additional 25% off your first month so check out bisc hosting for a Smooth gaming experience and your server hosting needs visit BC hosting.com and use the code cjo at checkout for 25% off your first month all right back in morning in this tutorial we’re going to be adding a custom or generation to Minecraft yes finally a fan favorite over here of course and highly Anticipated tutorial for custom or generation now there’s a couple of things that are quite important and that is for custom or generation you will need data gen that is the way that we’re going to set this up now what you can do is you can take a look at the Json files That are going to be generated and basically change them manually they are all available in the GitHub repository so both the code as well as the generated Json files are available however I just highly highly highly recommend you do it the way that I show you because otherwise it’s going to be Very complicated very fast now for World Generation in the tutorial mode package we’re going to create the world gen package over here and we will need four classes for this so this is going to be the mod configured features class we will also need the mod Place features Class we will then need the mod biome modifiers class over here and last but certainly not least the mod or placement class and I’m we going to start with the mod configured features now a configured feature is basically a a feature that you can configure with certain variables Now in our case we’re going to use an or feature with an or config eration that is the general idea that’s going to basically be saying hey spawn these ores and this can be replaced by those ores and in this size so for our purposes first of all we need two helper methods Which I will copy over you can basically get those in the get up repository they are fairly straightforward as you can see here we’re basically creating a resource key while here we’re registering something with a boot stab context for some reason it’s not called bootstrap context I believe this is a Typo somewhere in the micraft code or something I don’t know but there you go that is basically the two methods that we need and then we need three different resource keys so those are going to be public static final resource key of type configured feature of type question mark Comma question mark and this is going to be the Overworld Sapphire _ oror key equal to the register key method passing in the sapphire undor or right here as the name so this is going to be the resource key for our Sapphire ore and then we’re going to duplicate the this Twice and this is then going to be the nether Sapphire or and here as well of course neore Sapphire uncore or and here is going to be end Sapphire ore and here and Sapphire or as well so those three resource keys are very important and we Do need all of them we’re then going to make a public static void boot strap method I’m going to call bootstrap the parameter is the boot stab context you can see it’s not bootstrap boot stab for some reason of type configured feature of type question mark question mark I’m Going to call this the context over here and then we can get to registering but before we register we actually need a couple of other things so when you spawn an ore basically the idea is that you have a certain rule test and this determines hey you can replace these Blocks with this custom ore that’s how basically it works right the entire world spawns and then it’s going to say okay now we want some ores over here so basically our deep slate ore can only replace deep slate and the Deep slate or replaceable blocks for this we’re going To make some rule tests over here so there going to be a rule test I’m going to call this the stone replaceables equal to a new tag Match test of type Block tags. Stone or replaceables all blocks in this tag are then going to be replaceable once we Sol of the target Replacing so in our case right all of the stone replaceables those would be like this of course going to be Stone but there’s also things like diorite and granite and stuff like that would also be in there but we also need a couple of other rule tests that we need of course Need the Deep slate replace Ables equal to a new tag Match test of block tags. deep slate or replaceables we also want a rule test of Netherrack replaceables equal to a new block Match test of blocks. Netherrack and then last but certainly not least rule test for End replaceables equal to a new block Match test again this time of blocks. endstone and there we go so this is going to to basically show you the vanilla ones as well as Netherrack and endstone now for the Overworld we’ll actually need a list here in this case a List of or configuration. Target block State this is going to be our Overworld Sapphire ores which is going to be equal to a list. of or configuration. Target passing in stone replaceables and then the second parameter is going to be mod blocks. Sapphire orget doget default state after the second closing Parenthesis Kama or configuration. Target deep slate replaceables Karma mod blocks. deep slate Sapphire orget doget default State because in the Overworld of course right both the sapphire ore as well as the deepside sapphire ore can spawn however the sapphire ore should only replace Stone replaceables but the Deep slate Sapphire ore can of course replace the Deep slate replaceables that’s the idea the other ones we can actually do in line so for the overall run we want to call the register method right here passing in the Contex text passing in the key so this would be the overall Sapphire or key then feature. or because this is an or feature and then the actual configuration which is going to be a new or configuration passing in the overall Sapphire ORS list right here as well as the size the size right here is by the way the vein size so this is the Size of the veins that spawn inside of the world and for the other ones we once again want to call the register method with the context over here and then the nether sappire or key feature. or and then a new or configuration first of all passing in the replaceables and then the Second parameter is going to be the nether or. getet here in this case. getet default State and you still want a size so there you go that’s the idea and you can duplicate this for the end as well making sure that you change the key right here that’s very important Changing the key changing the rule test and then changing what spawns here which is the endstone sapphire ore all of the code as always of course is available to you in in the description below in the GitHub repository so you can take a look at that as well but with that we have Basically created the mod configured features so this’s going to be the configured feature for what we need for both the Overworld as well as the nether as well as the end and we can proceed to the mod Play features class now here once again we’re going to need two Helper methods that I’m going to copy over they are pretty much almost the same thing that we have seen in the mod configured features in this case just it registers a resource key for the place feature here in this case and we need three more resource key so that’s going To be a public static final resource key of placed feature here and this is the sapphire uncore oror placed unor key equal to registered key and we’re going to call this the sapphire _ oror placed I do like to add the plac over here in the name of the key for your place Features I just use that as a convention we can duplicate this twice and also add the nether over here and of course don’t forget to change the name they all have to have unique names if they if they Clash then you will get an error and It’s not going to work so do double check that and there you go our three resource Keys done and for this we then also need a public static void boot strap method over here with a bootst context of placed feature want to call this the context over here and the first Thing that we’re actually going to need here is a very strange thing and that is a holder getter of type configured feature of type question mark comma question mark we’re going to call this the configured features equal to context. lookup. Registries doc configured features now why do we need This Insanity well the reason why we need it is we need to somehow reference the configured features that we’ve created right here but there’s no real way to get them instead of getting this like holder getter basically where we where we can easily look them up via the Resource key and that’s why we need the resource key right here and the resource Keys here we will also need in a second but before we can continue with the mod Place features we need a couple of methods methods in the mod or placement class over here those are just helper Methods I’ll be copying them over in this case they are the or placement common or placement and a rare or placement they are actually copied over from a vanilla class which is the or placement class right here but you can see those methods are private and I just Copy them over basically that is in my opinion the easiest way to basically do this they just make it way easier to specify the placement of your ORS so let’s continue over here in the bootstrap method you want to call the register method passing in the context Then passing in the sapphire or placed key then calling configured features. get or throw passing in mod configured features. overall Sapphire or key after the first closing parenthesis we can then call the mod or placement dot let’s do the common or placement with a count of 12 and then a height range placement Dot uniform with a vertical anchor. absolute of minus 64 and then a vertical anchor absolute of 80 let’s say we can end this with a semicolon and there you go now what does all of this Insanity mean well 12 means the number of veins per chunk that are going to spawn and Then the height range placement here in this case uniform means that it’s going to spawn uniformly so the veins are going to spawn uniformly from y level minus 64 all the way to+ 80 in the Y level I highly recommend you just use the absolute that’s the easiest way That’s basically the exact y level you can also use the triangle which will make it that the likelihood of a vein spawning at64 and 80 is the lowest and it gets basically progressively higher in the likelihood in the middle of those two which would be where exactly like 24 Or something like that why level 24 so highly recommended to basically just play around with the height range placement over here there’s a tons of things to do highly recommend also to take a look at the vanilla classes and how they do it that is basically always A good idea and then we can duplicate this twice here and then changing it to the nether Sapphire key here and of course very important the nether Sapphire core here as well in the mod configur features and then here the end placed key and here the end Sapphire or Key so those would basically then be both the mod configured as well as the mod placed features done and that is usually the two things that we need to do Moren however in Forge we need something that’s called a biome modifier now luckily we can actually also generate those fairly easily with data Gen that is why this is such a cool thing for this once again we need the resource key and that’s going to be a resource key of biome modifiers and we’ll proceed with this so we’re going to need a public static final resource key of type biome modifier over here This going to be the atore sapphire or equal to the register key method I’m going to call this add Sapphire or here there you go we can duplicate this twice and of course changing the name make sure to change the name in both of them Add the end ore and the nether or as well they there you go so those are going to be the two that we need right here and we also need the public static void bootstrap method with the boot stab context of biome modifier I’m want to call this the context right here and Let’s see for this we’re going to need the placed features so there going to be a VAR of placed features equal to context. lookup and we’re going to look up the Registries do Place feature here in this case as we need the to reference the place features in our biome modified To actually add those we’re also going to need another VAR and that is going to be the biomes here in this case because we also want to reference some biomes context. lookup and then pass in Registries do biome here in this case and then we can actually register our Biome modifiers for this we want to say context. register passing in the sapphire or key right here the biom modifier resource key comma a new Forge biome modifiers and then we want to choose the at features biome modifier as we want to add a feature to a certain Biome the biome we want to add this to we can Define via the biom so biomes get or throw and then in this case I’m going to choose biome tags. is Overworld because in this case right our Sapphire ore I want to spawn this in the entire Overworld if you want a different one you can basically just do biome tags and you can choose different biome tags over here or if you want to specify a specific biome you can do biomes choosing net Minecraft World level biome over here and then choosing for example You know the beach here and and then that should also work but I recommend in our example we’re going just going to choose the Overworld comma the second parameter here is a holder set. direct pass passing in place features. get or throw mod Place features. Sapphire or placed after the second closing Parenthesis generation step underground ores and then we can end all of this with a semicolon and no errors should be present highly recommended to take a look at this in the get up repository as well if there are any errors on your end but that is the whole idea this is Basically going to generate the biom modifier and we’re going to duplicate this twice for the nether as well as the end over here so add NE Sapphire ore now here in the biome is nether of course MPL features nether Sapphire ore and the generation step stays the same and the Last one is and adding the end Sapphire ore in of course is underscore end very important then here and Sapphire or place key and once again the underground orse stays the same and with that we have everything that we need so those are going to be the three Big World gen Classes which when you also add things like the tree generation which we’re going to add in the next couple of tutorials or other things that you might want to spawn inside of the world we’re always going to need a configured feature a place feature as well as a Biome modifier and those are then used in the data gen over here in a new class so in the data gen we’re going to create the new class called the mod World gen provider this will extend the data pack Builder entries provider hover over this create Constructor matching super this Is correct however the last one we’re going to delete here and just make a set. of and this is going to be tutorial modmod ID and then after the Registries we also want to pass in the Builder which right now doesn’t exist yet because this is what we have to Define There’s going to be a public static final registry set builder here called Builder this is going to be equal to a new registry set builder. add and we’re going to add Registries do configured feature and then mod configured features colon colon bootstrap I did write this Wrong so there you go they’re going to rename this to bootstrap there you go add another one and that’s going to be the Registries do Place feature and then mod Place features colon colon bootstrap and last but certainly not least Forge Registries dokeys do biom modifiers mod biom modifiers colon colon bootstrap Ending with a semicolon and there you go we can then go to our data generators here and at the very end generators. add provider event. include server please there you go new Mor World gen provider passing and pack output as well as the lookup provider and there you go all of A sudden we have everything that we’re going to need and this is going to generate our three configured features Json files our three placed feature Json files as well as our three biome modifiers Json files as well so let’s go to the Run data over here and in theory Those should be generated and then you will understand why while this is a quite involved process having this setup once makes it really easy to add more things in the future and if you see the different Json F that it generates those are going to be under data and then Tutorial mod Forge those are going to be your biome modifiers so those are going to be the things that are actually going to add things to biomes so let’s say for example the sapphire or you can see we’re looking for the biome of is Overworld we’re spawning the sapphire or Placed feature and what going to be under the step of underground ores absolutely awesome now in the world gen over here so tutorial mod World gen data folder we have the configure features which is going to be the or over here as you can see right we’re basically Looking for a Target and the target here are the stone or replaceables and we’re going to replace those with the sapphire ore or if we have deep state or replaceables and find those then we’re going to replace those with the Deep slate or Sapphire ore in this case and You can see the other ones work as well and when it comes to the place feature the same things happen that we have basically defined right a uniform height range distribution over here from- 64 to 80 and a count of 12 the rest here the In square and the Ty biome those are all handled via the or placement right here that basically is a default of Minecraft and there you go those are going to be the different Jason FS now like I said you can also make those manually but you just need a place feature configured Feature and the biom modifiers Json F and then it’s going to work completely without code however I highly recommend against it the risk of making a typo in one of those Jon f is quite high so I do recommend basically using the data gen route if you don’t want to that’s Totally fine of course that’s up to you but that is basically the way that I recommend it but with that done we can now join into the game make a new world and see if our custom ores spawn inside of it let’s take a look all right f i Back in Minecraft and let’s take a look over here let’s just descend down and we can see there we freaking go we already find some deep slate over here with our custom ore and let’s take a look maybe we can find some normal one as well absolutely So there’s a couple of normal ones here as well absolutely freaking fantastic let’s take a look at the nether as well all right we’re in the Nether and sometimes I did find it to be quite rare in the nether even if you have your different numbers high up you also have To take a look at which y level you are because ours only spawn until y level 80 so we do actually need to go down a little bit in order to find them but when you do that there you go you will find them in no time so that is the Nether ore as well so let’s last but certainly not least also take a look at the end all right we found ourselves in the end and you can already see some of it spawning right here and that’s of course way more below as well so it’s going to spawn basically everywhere in The main island and it should also spawn in any of the other Islands as long as it is basically in the correct y level so you know between minus 64 and 80 but you can of course also change that in the code but that is how easy it is to Add some custom or generation to Minecraft and that is it for this tutorial right here next time in this video we’ll be creating a custom tree hope to see you there so yeah Video Information
This video, titled ‘Forge Modding Tutorial – Minecraft 1.20.1: Ore Generation | #38’, was uploaded by Modding by Kaupenjoe on 2023-11-08 15:59:49. It has garnered 674 views and 33 likes. The duration of the video is 00:19:33 or 1173 seconds.
In this Minecraft Modding Tutorial, we are (finally) adding Custom Ore Generation to Minecraft 1.20.1 using Forge.
== 25% OFF FOR GAMING SERVERS == ▶️ https://www.bisecthosting.com/Kaupenjoe
== MODDING COURSES == FORGE ▶️ https://url.kaupenjoe.net/CourseForge120X FABRIC ▶️ https://url.kaupenjoe.net/CourseFabric120X
== SUPPORT ME ON PATREON == ▶️ https://url.kaupenjoe.net/patreon
== ASSETS & DOWNLOAD LINKS == GitHub Repo: https://github.com/Tutorials-By-Kaupenjoe/Forge-Tutorial-1.20.X/tree/38-oreGeneration
== 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 ▶️ NEW Fabric Modding with Minecraft 1.20.X: https://url.kaupenjoe.net/CourseFabric120X ▶️ 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://url.kaupenjoe.net/patreon
== SOCIALS == Discord: https://url.kaupenjoe.net/discord 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.
== 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