Hey guys this is taco freak um today i’m going to be talking about war generation in minecraft forge 1.16.3 um so there’s been a lot of confusion on how to do war generation in um in version 1.16 so i wanted to go over uh how i implemented it Um as a as a heads up i’ve only been modding for minecraft for about like two months so i’m not the most most knowledgeable there might be somebody else that could tell you something better but this is what i have working and i just kind of want to share it and get You guys moving um so first things first we’re going to open up our build.gradle file here and i want to point out something um i’m running on on on the mapping snapshot of 2020 1028 this is a date this is october 10th uh october 28 2020 Um version 1.16.3 um if you’re not aware what uh snapshots are and mappings um you might want to uh look into that i’ll link a video in the description by technovision who does a good job going over what mappings are but in general um what it pretty much means is that Some some methods might have different names um in it in like future versions or they might change a name and then they’ll have to change it in the forge code um so uh just just make sure you’re aware what that is if you wanna you want everything that i Do today to work for you just make sure that your your snapshot version is as follows here um and it could change in later versions um and i’m using minecraft forge 1.16.3-34.1.10 of course uh you should be able to use any other ones that’s 1.16.3 what’s important is this snapshot version Um but uh yeah so with that out of the way let’s talk about um the or generation now so first thing we’re gonna do is we’re gonna generate a new package i’m gonna call it world then i’m gonna create a new package underneath world and i’m going to call it Um where’s package here’s package i’m going to call it gen for generation and then we’re going to make a new class here and we’re going to call it or generation uh we’re gonna go ahead and that all right and uh i’m gonna paste the code for everything i’m doing um in the Description below um and and i will pretty much be copying from it so feel free to have that open and get and start copying over some of the code there are some big blocks um that’d be kind of annoying to just have to type up and stuff so Um and just uh follow along with me with the paste bin so first thing we’re going to do is copy the first line above the class here and it’s going to be mod event subscriber and we’re going to go ahead and import that there and the reason we’re importing that is We’re going to run an event run a method we want to to run during an event when the mic when minecraft starts up to register our oars um and uh and i’ll show you that in a moment later when we when we write the part for that Um all right and what we want to do is at the bottom of that placement that i have i’m going to copy the the the uh the register method i’m going to put it here at the bottom of my my class here but it’s this part right here It’s called register and this just pretty much does the registering for the like the configured features and stuff so um this doesn’t really do too this is a lot but we don’t really need to mess around with this too much let’s just import um what uh whatever classes we need to import here Um and then make sure you replace this part right here with your own mod id um i’m using my own my own code as a reference just to show you guys um mine is my main class is elementa and i have my mod id right here in uh in in my Main class so um i’m gonna just import my own class here of course put your own mod id there um all right and now next we’re gonna want to make three arraylists um uh the way i wrote it is so that we can organize all the features we want to add all the Ores we want to generate so i’m going to copy the first part of of my paste bin here and it’s going to be these three lines here so copy that into yours and i’m going to go ahead and import the arraylist class here so pretty much this is just a list of of The three types of orders you won’t generate we’re going to add our ores to these lists just to kind of keep everything organized um and uh and uh kind of like uh if you want to reference it from a different place in your mod you can always Reference it so let’s say you want to check all right what overworld ores are there you can you can check it that way too um all right so now next we’re going to make a we’re going to make the class where we register the ors so this one’s going to be called uh Public static void and we’re going to do register ors you can call this whatever but but finish the oars makes sense here because where we’re going to kind of register the ores kind of not really i’ll show you guys where that actually happens this is where we’re gonna add it to our List here um all right and then we’re gonna copy something for the paste bin again here we’re gonna copy the first chunk um and i’ll paste it here for you guys to see um leave some spaces around here so this is the overworld or register um This is the block that actually adds the like the configuration for how you want your ore to generate um so we’re going to go ahead and import feature here import or feature config and this is this should be your own block um that you want to put in origen for i’m Going to show you guys what blocks i’m going to be putting into the world here this is from my own mod of course um i’m going to be adding this nether or this this um this overworld ore and i’m going to this is not really supposed to generate my mod but just as An example i’ll show you guys i’ll show you guys this this is just the block i’m gonna have generate in the end um so these are the three ores this is called neutralis this is called flame crystal and this is called um air crystal block um um so Yeah you don’t have to do yours of course you can do something like um let’s do like blocks dot iron block for example and you want to make sure you do get the full state to get the default state of the block you’re going to be You’re going to be um putting into the world but we’re going to put my my block i have my blocks registered in in the class registry handler blocks it’s called neutralis or and i’m getting the block and then i’m getting the default state of the block um To show you guys just what my registry handler blocks looks like this is it right here it’s just a deferred registry um and then i have the ore right here um registered in there so nothing crazy going on here um and uh yeah so just get it from your Blog get your block and get its default state and you put it here um next is going to be the vane size so i want a vein size of let’s do eight just so we can kind of find it easily and this will register this will generate Up to eight veins up to an eight a vein size of eight um so for the range here this is at what height the ore should start spawning at um we want to we’re gonna leave it at 64. 64 is the same height as iron that iron generates that So make it kind of easy to find uh square i believe is just um in what shape the ore should generate um so we wanted to generate in the square and then the last one this is what i was talking about like an unmapped function with a snapshot and everything The beginning of the video so this is this doesn’t have a name just yet in a future mapping it might have a name um most likely um but this is pretty much just the chunk spawn frequency this is about how many of your ore should generate per chunk um We’re gonna change this to um let’s do 64 to make it easier to find the horse um and yeah so it should generate 64 veins of this stuff inside of every every um every uh chunk all right and then next um that’s pretty much all you need to do For that part next we’re going to do nether or so let’s grab the next section here from from my face bin um and and this one is gonna be the flame or i was talking about so i’m gonna give it a name i don’t i think i skipped over this part You gotta get just give it a name this one doesn’t matter so much it doesn’t really have to do anything with how it’s displayed just kind of like to reference it in the registry if you needed to get it from the registry um and um yeah so Um now this is where i want to explain another thing so let’s add the next line here for the end and again this is on the this is on the paste bin so i forgot to copy this line so let’s just head here this is end or register And um now this is where i’m going to talk about this part right here or is or feature config.fillerblocktype.neterac so this is the block you’re going to be replacing or not replacing but is where your or is going to be generating in so i’m going to again from my paste bin I’m going to copy a few lines here um with a description of what these mean so in this case we did a filler block type of base stone overworld um and base stone overworld is pretty much for generating your ore inside of stone granite diorite and endocyte um Uh for netherrack it’s this one right here it’s or feature gener feature config filler block type that netherrack um and um and now for the end stone one here um we’re gonna import this class here block match test rule test so what we’re pretty much doing here is We’re we’re seeing if a block matches what we’re looking for um and we’re doing end stone here so if we want to generate this in end stone so we’re doing a so from the actual minecraft blocks if you’re not aware this is from an actual minecraft block we’re getting end stone We’re gonna if we find endstone we’re gonna generate in a stone this this block right here air crystal block um and then here you specify the same stuff as before vane size i’m gonna do eight um i have the height here set higher uh because it’s the ends Um and some of the blocks are higher i don’t know exactly where i think it’s 64 actually that the island starts spawning but we’re gonna do it higher just so we have that um and then um then this bottom one same thing as fun chunk sponge on frequency um and Um you could replace this part right here with anything so i’m going to copy this here and i’m going to paste it right below and i’m going to generate let’s do okay so let’s do i have i do generate i do have another generation here um called earthy the pop deposit This i wanted to generate in inside of dirt um and not grass dirt like just regular dirt so we’re gonna what we do is replace this part here and we’ll copy this part here the new the new block match test will test and if the block is dirt we want to Generate inside of solid dirt um and then i do have a block that generates in this one um uh do i have it yeah i have it right here so it’s this one right here it’s like gravel but it’s like dark um i wanted to generate in the world as well so We’re gonna do uh we’ll remove this and we’re gonna do registry handler blocks uh we’ll do we’ll get my ore here so it’s gonna be the earthy deposit we’ll get the block and then we’ll get its default state um and yeah we’ll do again just to find It easy we’ll do vein size a range will start it um remember that the surface is higher than 64 so we’re going to go 128 for the generation height so we can actually get it generating i believe as of right now the highest point of any block In the game is 128 for like mountains um i think this might go up for the newer for the newer version of minecraft 1.17 that’s coming out with they’re doing the caves and cliffs update so this might actually be higher um in the future but for right now i think 128 Is the max um and uh yeah so we’re going to generate this block inside of any dirt any large uh features of dirt that generates um all right and then with with all that we pretty much got all the ores added that we want to test with today um And uh again we just added these to our list here and now this is where we’re going to actually like register the ores with the game so you want to go ahead and copy the next portion this is a big a little bit of a big section here um so I’m going to copy it and paste it below here and let’s go ahead and just import all of this stuff import import import alright and and now let’s just run through this so we’re getting a volume loading event uh for when the game’s loading volumes um we’re getting the event here and then From the event we are getting the generation that’s happening and then here now that we have the generation we can start adding our own generation um of course none of this you really have to change um i’ve kind of got it all done for you here um So bring but i will run through it just for your own education um so first we’re checking to see if the event category that we’re in right now equals the biome category uh nether and um if it does then we are we are um uh so we’re running through our list now so You see up here we have the list of nether ores so we’re gonna go through that list of another ores that we have which registered here and we’re gonna add every single one to the world so first thing we check is just make sure that there’s no empty parameters inside of that um Inside of this array in this list and if not then we’ll go ahead and do uh i will do generation that with features we’re going to add a feature here and generation stage.decorations we’re going to decorate the block um uh uh and we’re gonna do dot underground ores And then for or we’re gonna it’s gonna be um what’s in that list so again this is not anything you really have to concern yourself with all we’re doing is just running through every or in that list and generating it and generating it into the world um And then uh we’re doing the same thing for the end here so category the end and again same thing here for the overworld ores um and that’s pretty and that’s pretty much it for all the generation again this is not anything you really have to touch Um but although if you did want to do a specific kind of generation you could copy like let’s say you wanted to generate a specific volume you could do that here so you could do the same check here like if event.category.equals and then we do like volume dot Category dot and then you have all the categories you can think of here um i don’t think the nether has any specific categories i don’t think there’s any specific volumes like that in the nether although i’m not 100 sure on that one um but you could do ocean if you only Wanted to generate the ocean plains river savannah swamp taiga um you could do it you could change this yourself of course this is just for generation the main three places but if you didn’t want to generate in the ocean you could like you know make another list here and and do you Know ocean generation or whatever um call it like ocean oars or something like that and then just add a new a new uh line here as well um under here just copy this and then change this from the end to ocean and then just go through your and It will go through your list of um of uh of uh ocean horse or whatever so uh there’s a little room to play around with it again i just have a basic implementation of just you know the three main core types um so now this is all done Now to actually get this to work we’re going to go to our main class and we’re going to call it from our main class so you want to find in your main class the private void setup method here and we’re going to put a line uh or Generation so that’s the class we just made we’ll do dot register or so that’s that class we made so we’re calling that class we made in or generation right here register or um and that’s going to register all our ore for us um and um and that’s it So um one other thing i didn’t mention the subscribe event thing this is the reason we needed this part up here um it’s gonna call this method when it’s loading in like features in the world so um we register these ores here and then when we start Generating it in the world it’ll just grab them from our list that we made here um all right and that’s pretty much it so let’s go ahead and give it a run and uh and see uh see if everything worked out here all right so here we are in the game now um I’m going to go ahead and create a new world um call it demo or we should create it here do creative we’ll call it demo and we’ll go ahead and just create the world here um so first things we’re gonna look for are the the two overworld wars that we generated Um it’s gonna be the uh the earthy dirt the earthy um deposit and the neutralized ore um so here we are we generated in um let’s look for some of our deposits you can actually see already one of our deposits right here but anywhere where there’s dirt should generate um Uh we could look around a little bit more and i’m sure we’ll find some more um but yeah you can already see our ore down here actually you can see that right there um that’s our ore of course it’s generating all over the place because we put the chunks the the chunk spawning Pretty high um so that’s that so now um let’s go to the nether we confirmed that those two were spawning um let’s get ourselves some obsidian here we are in another um very weird very weird spawn here but you can already see our ore is already generating um You can see the uh the ores there and the ore is there so confirm that it’s generating here all right now we’re gonna go ahead and look for a stronghold just to get to the end um so we’ll do uh we’ll get some eye vendors here and uh we’re gonna go ahead And look for it so i’ll see you when we get there all right so here we made it to the uh the uh the end portal and destroyed that uh let’s go ahead and drop in our tiles here and let’s go into the net here all right so let’s jump in let’s look For our ore all right pretty safe another spawn here but yeah you can already see the stuff just plastered everywhere um so there it is you can see it all over again pretty high spawning rate you don’t have to do it yourself at that rate all right and yeah so that’s pretty much It that does it for the video guys i hope you guys have success with generating in your mod Video Information
This video, titled ‘Minecraft 1.16.3 Forge Ore Generation’, was uploaded by TechOFreak128 on 2020-11-05 23:28:22. It has garnered 3391 views and 92 likes. The duration of the video is 00:22:33 or 1353 seconds.
A short tutorial on how to get ore gen working in 1.16.3. I am using mapping snapshot 20201028-1.16.3 with forge 1.16.3-34.1.10. Please note I am not a Minecraft modding veteran I am just sharing what worked for me with everyone. I hope everyone is able to get their ores working!
Code: https://pastebin.com/Y5XJ8L2x TechnoVision’s Video on Mappings: https://youtu.be/NtYMgZ0_1PA
Feel free to use the pastebin code in your mod!
If you enjoy developing mods you might want to check out my Amnesia: Rebirth tutorial to learn how to make custom stories. Link to playlist below: https://youtube.com/playlist?list=PL4KkjlmOwLwwMVqedCNpi6caUxhgyf8Qr