Foreign ladies and gentle ladies and welcome to the 1.20 series for Minecraft modding on Forge so as I’m sure all of you are aware 1.20 has just released and finally Forge has released for it um eight hours ago as of recording this so we’re going to start back with the tutorials and hopefully Get through them at a decent pace so first of all um if you’re coming from 1.19.4 I will leave this great um primer in the description made by Champion Ash so obviously a massive uh thanks to him uh because this is very helpful and it goes through basically All of the different changes between 1.19.4 and 1.20 so if you’re updating an existing mod um this will be extremely helpful as you can see it goes in tons of detail which is insane it’s basically every single change maybe missing one or two you never know it’s hard to get everything of course But there’s a lot here um so this is pretty much everything you should need so this will be linked in the description of this video so you can go and check that out if you need that but let’s get started with 1.20 so first thing we’re going to need to do Is install Java if you haven’t already so as far as I am aware um 1.20 still uses Java 17 so we can come and get that from adoptium.net or at least that’s what I will be using you can choose to use Amazon coretto or whatever you want um even Oracle is okay Um but I just prefer to use the open jdk and you want jdk 17 if you don’t see that here you can go into other platforms and versions and just select it so I’m using Windows x64 that’s very important you choose x64. you just want the jdk and then the version 17. And then you want to hit the MSI for Windows so you just download that and that will bring us a download I’m just going to give that a save into my f drive and we’ll see that downloads that will take a moment so we’ll leave that And move on to IntelliJ IDEA so that’s what I’m going to be using in title J you can use Eclipse if you wish or you could theoretically use vs code however I really really don’t recommend that you use vs code and I’ll just stick with a proper Java IDE such as IntelliJ and Eclipse because they will make your life a billion times easier so we need to do for getting IntelliJ is press download and here you can choose either the ultimate or the Community Edition so the Community Edition is free and the ultimate edition is paid for however if You are a student you can apply for the education pack which will get you this Ultimate Edition for free which is great so I do already have the ultimate edition and I’ll just show you the Community Edition download as well so I’ll put that also in our downloads folder And now our Java should be um installed so if you go ahead in fact I will show my desktop here so there we go there’s the jdk 17 so you just want to double click that and you should see it starts the install window just want to go next And you want to make sure that some of these are set so I add to path um just make sure that one of these is checked I tend to just do entire feature and same with the jar and same with the Java home you don’t need to worry about This javasoft thing that’s the old thing that doesn’t really happen anymore you just need to make sure you have these free these top three here and then you just want to hit next and then you can hit install now I already have it installed so I’m not going to do that Um but yeah you can do that if you wish or well you would need to of course um so I want to cancel that and then you just hit finish when you’re done okay and then you can remove the installer of course because you don’t need that And okay my IntelliJ is not quite done so we’ll move on to forge so I’m going to come on to my e-drive to do this and I’ve made a new folder called tutorials now you can put this wherever you want this folder and this will Basically be the folder of your mod so I create a new folder in here you can obviously put this on your desktop if you wish and this will just be whatever your mod is called so this is I was about to do 1.19 but this is 1.20 can you believe that 1.20 Tutorial mod boom you can have spaces you can have whatever you want this is just the name of the mod say for example you’re doing a space mod you would just call it space mod that’s a terrible name but you know it’s up to you what you call it really So my IntelliJ has actually now finished or no it’s not okay it hasn’t finished oh no it has finished taking a while so I’ll move that onto my desktop as well and you can just hit run on that so double click and you’ll get the UAC prompt which you Probably can’t see but you just want to hit yes on that of course hit next on the installer you have the install location um you can add these if you want I’m not going to worry about that and then you just want to hit install once again I’m Not going to do that because I already have it installed but you can do that if you want to use intelli eclipse is very similar I’ll have the download links for both in the description and then after you’re done you can delete the installer fantastic so the next thing we’re going To want to do is download forge so we need to download the MDK as you can see this was only released eight hours ago so this is the latest version for me but you’ll want to download whatever the latest version is for you um if you’re watching this sometime in The future there might also be a recommended version so if I go 1.19.4 you’ll see there’s also a recommended version generally or in fact in almost every circumstance you want to download the latest version and not the recommended version so the recommended version is more of really just a stable Version rather than what is actually recommended so you want to download the latest and we just want the MDK so hit MDK and you’ll get this ad here so look forward to get their money and you just want to hit skip up at the top right And then you want to download the MDK to wherever you want it to be so mine is on my e Drive and in the tutorials folder and you just want to put this in your mod folder so hit save that will download and you’ll see that’s already done because it’s not very big So once we have done that we can come to this ZIP here we can right click and you can do extract all and you just want to extract it all to this same folder and you’ll see a bunch of files get added now I’m going to delete some because we Don’t need all of these so for example readme we don’t need that license we don’t need that the MDK we don’t need that anymore credits change log we don’t need those either so just delete those and that should be everything we need but that’s basically all we’re going to Need to do and now we just need to open it in IntelliJ so let’s open Intel ordering and you should get a screen something like this now you see I already have a bunch of projects here you wouldn’t have those if you just installed it but we’re going to hit open And we just want to select our folder basically so mine is in my e Drive as I said tutorials and 1.20 tutorial mod and press OK and then we can close our file explorer because we don’t need that anymore so we’ll just let Gradle download you can see we’re using Gradle 8 now and if you want you can view the process in this little build window here that’s going to download Gradle and then it’s going to go through all of the dependencies download all of that and download all of the assets so this may take a while Um what this is essentially doing is it’s running that command I was talking about it’s running our Gradle Gradle W uh gen IntelliJ runs so we’ll just let this go through and I’ll be back with you once this has finished okay so you’ll see I actually Had an error here and this is going to be rather common when you’re starting out so early after a forged version just releases um but basically there’s currently an issue with the MDK so if you’re also getting this error you’ll need to come down into your gradle.properties and you’ll see here Where it says the forged version we just need to remove the 1.20 dash and just hit this elephant reload button and you’ll see it will start again and this time it should work so that’s just a bug with Forge as it’s just released hopefully that will be fixed by the time You’re watching this video um yeah but I’ll be back with you once again once this has finished all right everyone so as I’m sure you probably could have guessed um it didn’t work again so classic Ford moment I had to run guadaloo stop so I just went to terminal down here went dot Slash Bradley stop um because I was getting some errors uh just a classic Fords moment really but that did fix it or at least it seems to it seems to be going through and doing everything now so if you do get some errors something to do with um the project Scope Services Um and something to do with maybe run time class path copy if you get errors like that just go into terminal type dot slash Grand Lu stop or Gradle W as some people say uh gradually stop and if you hit enter and run that and then once again do the Elephant refresh then it should work I don’t exactly know why that happens um that’s a little bit beyond me but it does seem to um it does seem to fix it so hopefully this is actually about to finish should we wait for it you go downloading the loader the sources yeah this should Be about to finish um but yeah that should just be an issue with it being a new Forge hopefully once again as I say by the time this video releases hopefully the latest version fixes this um so that you don’t have to do this but uh we’ll see we’ll see if not then Everyone can start using brass maybe you know that is a joke by the way and if you don’t know what brass is that’s my mod loader but don’t worry about it just a little bit of a joke um so yeah there you go you can see it’s Now indexing so that’s all the Gradle stuff done and we can still continue while that’s indexing and continue doing everything we want to do so let’s talk through the whole kind of project structure here and we’ll go through what everything is what you should what you can touch what you Shouldn’t touch and Etc so we’ll go from top to bottom actually let’s um open it in File Explorer first because there’s some things we’ll see in there that aren’t showing up in IntelliJ and which actually we can change that so if I go tree appearance I should be able to see excluded files Um yeah just excluded files so first of all we have the dot Gradle folder so this just holds your Gradle installation uh don’t touch that basically um we have the dot idea folder which is just our IntelliJ stuff if you’re on Eclipse you all have a DOT Eclipse folder you’ll have Um prod no you have a DOT project you have your stuff like that same with vs code I believe you have some file or something don’t touch those um they’re just configuration stuff that need that your IDE will need then we have the build folder so this is Just basically all the Minecraft sources and Etc um you shouldn’t really touch these either that’s why you’ll see that orange because normally these would be excluded so you don’t see them um but we’ve chosen to see them then once again we have another Gradle folder which is for the Gradle wrapper Don’t touch that if you do ever need to upgrade the Gradle version then obviously you would do that in here but we’re not going to need to do that so leave that alone then we have the source folder so this is where all of our code is going to be And all of our resources and really everything inside of our mod so you see first we have the generated folder and this is for datagen which will allow you to programmatically generate different resources this is something we’ll cover in a future tutorial possibly maybe just a rough idea episode 14 maybe that’s Just a pure guess it might end out being sooner or later we’ll see but that is something we’ll cover in the future but for now you don’t need to see it so it just collapse it then we have main so this is where all of your main stuff is All of your code all of your resources so you’ll see we first have Java which is all of your code and then resources which are you guessed it all of your resources I’ll close that uh so in Java you’ll see we have the com example example mod so This is just literally what it says an example mod so there’s a bunch of stuff in here um and in the resources we have a meta INF folder so this is basically all of the meta stuff meta info as the folder suggests it’s really quite self-explanatory if you think about it And inside of there we currently just have the mods.tommel and the mods.com is basically um it tells Forge everything about your mod so your the loader you’re using the loaded version the license the mod ID the version the display name etc etc um and we’ll go through this in a minute To kind of fix some of this stuff and you’ll also see we have a pack.mc meta so this is just for your resource pack and your data pack these those will both use this file here so you should just leave this alone really and then we have the test folder So this is for if you are going to do like um testing using I think Minecraft’s testing thing um I’m not really going to cover that because it’s a bit obscure and really most people wouldn’t use it um it’s a nice thing to have but generally you can just ignore it and if You want even you can just delete that folder so just remove and then delete you can do that that’s fine you can also do the same with generated as well if you don’t intend to use datagen but you might find that keeps popping back up when you like reload Gradle and stuff so Just leave it really um then we have the get attributes so this is just literally as it says get attributes so it’s stuff for git and if you’re not using get to then leave this file Alone um I’ll just leave it alone anyways really then we have the Gradle w dot Battlegradloo.bat uh just leave this alone once again that’s the forge Gradle um script then we have the get ignore um so you can just ignore stuff from showing up to get um you can leave that alone too really a lot of these files you should just leave alone Um then we have the build.gradle so this is just your build script you see this is quite complex um and if you’re new you might be quite confused in What’s Happening Here really once again I would just leave this alone um the only reason you would ever need to Really touch this is if you’re doing something complex or if you’re adding a dependency which you would do in the repositories and dependency blocks here but we’ll cover that in the future for now we can just basically ignore those so we can close that then we have the Settings.grade also these just a bunch of pause settings once again leave that alone gradle.properties so this is actually quite important and this is if you need to change anything about your properties so for example you want to change the Minecraft version you do it here your version range you’ve got your forged Version the four version range Etc you’ve got your mapping Channel eventually we’ll set that to parchment but not right now and I’ll explain that in the future because parchment hasn’t released yet but soon hopefully uh you’ve got your mod ID here which we’ll talk about in a minute Um you’ve got the mod name you’ve got the mod license the mod version and etc etc all in here and then finally you just have this Gradle W file which is once again just a bunch of Gradle stuff that you should leave alone so let’s go through And let’s actually get this up and running and our mod working so first of all I’m going to come into the main Java I’m just going to delete this combo example and we’re going to make it ourselves so I’m going to create a new Edge now generally you would put this as a Domain that you own so for example I own the domain 30worthy dot Dev so I would actually call this dev.30 Worthy and then you put the name of the project so you know um tutorial mod if you don’t own a domain you can use a GitHub Domain and for that you could do IO dot get hub dots and then your username dots project name you can do that too alternatively you can just remove the i o part some people do that it’s up to you really it doesn’t really matter you Can even do like um com.github this is a bit strange but you can do that too that’s what you would do really if you don’t own a domain otherwise just use your domain but it’s important that you inverse it I don’t really know why that’s just what everyone does so I Would also recommend doing that just to keep with convention it’s just best for people that are seeing your mod and yourself to keep with the conventions so I’m going to put this back tutorial mod and inside of here I’m going to create a new class And this will be the name of your mod so this will be what I will call your main file or your main class you can call it main that is completely not possible you can call it whatever you want really um but I wouldn’t call it that because There’s other files called Main and you might get a bit confused instead I would just call it what your mod is so my mod is a tutorial mod so I would just call it tutorial mode if your mod was um you know a farming simulator mod you might call it farming simulator My mod for example industria I have the main class called industria I don’t call it industrial mod because it its name is just industria um for example I could just call this tutorial but I think tutorial doesn’t really make much sense in this context it looks a bit weird and I think it’s easier to just have it be tutorial mod which is what I’m going to leave it as but what you call that is up to you just make it make sense really and make it so other people can understand that this is your main class Thick in the main class by the way as your entry point to the mod this is where everything gets loaded from so if something isn’t really being referenced in your main class then there’s a high chance that’s why maybe it’s not loading or Etc but we can talk About that in the future when it comes to things that might be affected by that so to declare in Forge that this is a mod we simply do that by doing at mod above the class and inside of here we pass our mod ID so I’m just going to do tutorial mode Dot mod ID now this is just a string so you can alternatively um just put a string in here and say tutorial mod um which needs to be lowercase by the way no spaces no special symbols uh just lower case normal characters um like that A to zero to nine dashes dots I think are the only allowed characters so you can do that but I like to just create a constant for that so you know public static final string mod ID and I like to just set that here once again needs to be lowercase And it’s important that you remember whatever this is right um because this will be used throughout your whole entire modding process and you can’t really change it after you set it you can kind of you would have to go through all of your assets all of your Data all of your resources and change it so that’s my generally a you make a constant so you don’t have to do that with code as well and B try and keep it something that you know it’s gonna stay as for example I wouldn’t recommend calling this um like Untitled Project for example or just Untitled right I wouldn’t recommend doing that because it’s a pain to change it afterwards and in reality that’s also the same with whatever you call this folder you can’t read you can change it afterwards don’t get me wrong there’s just a lot of things you might have to Go through and actually change but that’s why I just recommend leaving it as something you know it’s gonna stay as but this is fine that’s all we need for the actual mod to load now the important thing is we do need to go and set that in our gradle.properties So in here you’ll see we’ve got the mod ID this is set to example mod but we need to set it to what our mod ID is so as you can see we just call it tutorial mod so we’ll put that in we’ve got the mod name so that’s tutorial mod Uh license so I’m just going to be using MIT um please choose a good license um you know you can figure that out mod version I’ll just leave that there mod group ID so this is just basically whatever you put as your root package here so mine is dev.30 dot tutorial mod You got the mod authors so that’s just me 30 worthy by the way and you’ve got your description which um this is a tutorial mod and you can remove all the comments here if you want just be careful not to remove any of these things because these are quite important Um it should say like what’s optional what’s not optional and you can set that all up and we’ll leave all of this stuff here that’s fine for now um now what we’ll just do in our meta infodel is make sure everything is fine in here so you see here where it’s using dollar Sign and then these brackets and then a name of something this is actually referring to what we just set in our Gradle dot properties so you see in here we have mod underscore ID and then here we have dollar sign bracket mod underscore ID bracket so that’s just referring to whatever is set In here it needs to be exactly the same so you can also like make new variables in here if you wanted I don’t know exactly what you would do maybe like um I don’t know beans is equal five right you could just come in here and say dollar sign brackets beans and that Would that would work I think um but I don’t know why you would do that so don’t do that I guess um and yeah with that done we can just reload Gradle again with the elephant up here and that will go through and rebuild everything probably so that might take a hot minute But once that’s done we can basically Run the game from there so if you come up to your runs up here you’ll see there’s no run configuration I already have gen Nintendo J runs because I was messing around with some things so you want to come to the Gradle tab on the Right and just hit uh Forge Gradle runs inside of tasks and then go run client you also see run data Run game tester and run server we’ll talk about those in the future but for now we just want to run client and this is going to take a moment Because we’re currently doing a Gradle build but once that’s complete we should see that the game starts to run so I’ll see you once the game has loaded oh I must mention um you might see there’s like a bunch of what looks like errors here um whilst you’re running the client I Wouldn’t worry about these and they’re not really errors they’re more so just like uh deprecated stuff inside of Forge and Minecraft and Etc um so I don’t really worry about those they’re not going to cause you any issues um so yeah that should be kind of all You need to worry about if they’re happening inside of this compiled Java task um they shouldn’t really be an issue unless there is something that’s referencing your code in there so if it mentions your package name inside of here instead of net Minecraft util thread for example then you know that Means it’s to do with your code instead of whatever so you see here we have Minecraft you know as you would expect with the new icon and everything so we’ve got narrator I don’t know where that’s here really new Leaf oh please continue There we go we don’t want the narrator So I don’t know how loud Minecraft is right now so I’m just going to turn it down just in case Also let’s do that I’ll go master volume 20 and if we just go to the mods here you can see we have tutorial mod mud ID tutorial mod authors 301t this is the tutorial that’s the description license MIT and you’ll see that’s all come from this cradle dots properties down here and likewise from the mods.tommel so that’s pretty amazing right and you can you know play the game as usual so you know create a new world Load in and you have your mod in the game and obviously in the next tutorial we’ll cover adding items and then blocks and then creative tabs food tools armor entities block entities energy fluids etc etc but for now you can see we’re in and should just Check that we’re in 1.20 I like to just you know grab a sniffer and a camel or was actually a giraffe and spawn these in amazing so without giraffe um if you if you get the reference you get it if you don’t get the reference um I apologize but yeah amazing Um I have nothing else to say really um so obviously like subscribe and I’ll see you in the next tutorial where we’ll add our first item good bye thank you Video Information
This video, titled ‘1.20 Minecraft Forge Modding Tutorial – Setting Up’, was uploaded by TurtyWurty on 2023-06-08 17:30:00. It has garnered 4555 views and 124 likes. The duration of the video is 00:31:46 or 1906 seconds.
In the next video we will get straight into the real modding with adding items into the game! 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.20-Tutorial-Mod
Forge Update Primer: https://gist.github.com/ChampionAsh5357/cf818acc53ffea6f4387fe28c2977d56 JDK: https://adoptium.net/ IntelliJ IDE: https://www.jetbrains.com/idea/download Eclipse IDE: https://www.eclipse.org/downloads/ Forge MDK: https://files.minecraftforge.net/net/minecraftforge/forge/index_1.20.html
Chapters: 0:00 – Intro 0:40 – Updating from 1.19.4 1:35 – Download JDK 2:45 – Download IntelliJ 4:00 – Installing JDK 5:15 – Creating Project Folder 6:10 – Installing IntelliJ 7:10 – Downloading Forge 8:30 – Setting up MDK 10:25 – Some errors with the MDK 13:15 – Project Structure explained 20:00 – The Main class 25:30 – Setting important properties 28:10 – Running the game 30:00 – Outro