Hello and welcome to episode one of my minecraft modding tutorial for 1.16 in this tutorial we’ll be installing java eclipse and setting up the workspace to get started with our mod so the first thing we’re going to do is install java java is the programming language we’re going to be writing in Head over to adopt openjdk.net there’s a link in the description jdk stands for java development kit and it’s the version of java we’re going to be using to create our mod so where it says choose a version we’re going to select openjdk8 we don’t need to select a jvm Just leave it at hotspot and let’s download it i’m going to click keep and just wait for the open jdk to download once that downloads we’re going to open the msi file bear in mind i’m using windows click next accept the license agreement click next again and this is quite important as We want to also set the java home variable so select this feature will be installed on local hard drive and click next and click install to begin the installation and what this does is install java on your computer it will also set the environment variables and the java home path once that’s Installed we can check that our java home is set to the right place so let’s click start type in environment variables and open it and then click the environment variables button and then you should see this java home path if we click edit and click browse directory it should go to c Program files adopt open jdk jdk 8.0 275.1 dash hotspot and you want to click ok and then click ok again and then click ok and ok and now we’ve set up java home eclipse is going to be our ide or our development environment it’s the application that’s going to Help us write our code so head over to eclipse.org link in the description and click the download button this will send you to the eclipse download page just click download and then click download again and this will begin to download an exe file which is your flips installer so let’s wait for that To finish and once it’s downloaded we can open the exe file and after a bit of waiting we can see this eclipse installer by oomph so let’s wait for that to finish opening and it should open this window here now we are going to be developing in Java so let’s click the first option and let’s click install accept the license agreement and it should begin to install eclipse after finishes installing it’s going to give you a launch button but first let’s set up forward so we can close this installer for now so next we want to head over to Files dot files.minecraftforge.net link in the description in our minecraft version we want to select 1.16.4 because that’s the version we’re going to be coding for and it’s also the latest version of minecraft and here we can choose between the latest version of forge and the recommended version of forge we’re going To select the recommended version of forge because this is the most stable version and then we want to make sure to select the mdk which is the mod development kit let’s click on it and it should take us to this page so let’s click skip and it’s going to download a zip file Head over to where the file downloaded and let’s click it and we’re going to copy it to the place where we’re going to be modding so i’ve created a folder where i’m going to be doing all my modding and i’m going to paste the forge Mdk in here now let’s make a new folder you can name this whatever you want you can replace the tutorial mod this is going to be where our eclipse workspace is going to be now we can rename the zip to the name of our mod in my case it’s tutorial mod And right click and click extract all click extract once we’ve extracted this here we want to go to the navigation bar here and type cmd and this should open a command prompt window with this path here which is the part that we’ve saved our mod folder to now let’s type gradalu Gen eclipse runs dash dash refresh dash dependencies and you want to make sure you spelt it exactly as i have or it will give you an error now we can press enter and it should say starting dame on and if this comes up just allow it access to the network and Now this can take anywhere from a minute to almost an hour on some devices but it shouldn’t take too long so let’s just wait for that to finish and once it’s done for me it took five minutes we have to run one more command graderloo it clips so Again make sure you’ve spelt it correctly and click enter and again wait a bit more time while it sets up the eclipse workspace and finally it’s done this one took two minutes so we can close command prompt and open eclipse so let’s start eclipse like we would Start any other app and wait for it to load now we want to set the workspace for eclipse so let’s click browse and let’s locate the folder that we saved the mod to and select the workspace folder click select and click launch and once it’s loaded we can close the welcome window We can close the donate window we can close the outline window and we can close the problems javadoc and declaration before we start coding i want to quickly customize my eclipse so i’m going to go to windows preferences general appearance and i’m going to set the theme to dark I’m also going to search for font go to colors and fonts java and java edit text click edit and set my font to a custom font i’ve installed now if i click apply the theme has changed it might want to restart eclipse i’m not going to do this now but you can Click this button if you want to so now we want to install our json editor plugin which is going to allow us to edit json files let’s go to help eclipse marketplace and once it loads we’re going to search for json json and we’re going to install this json Editor plugin let’s click install next we want to accept and click finish when this window comes up we want to click install anyway and now it’s going to ask to restart the eclipse id so let’s click restart now every time you load eclipse it’s going to ask for the Workspace it should remember the previous workspace you put in so let’s just click launch and once it’s launched we can finally start coding let’s click import project click gradle and existing gradle project then click next click next again then let’s click browse now once again let’s go to our modding Folder but this time select the folder with forge inside it and click select then click finish and this can take a couple of minutes but it should import our project and once it’s loaded we can close these two gradle windows open the tutorial thing here click these three buttons And change our package presentation to hierarchical and now finally we can start coding our mod let’s open the source main java folder and this is where we’re going to code our mod so let’s right click on this package go to refactor and rename and now Let’s change it to the name of our mod so we’re going to rename it to com dot cy4 if you have a website you can change it to the name of your website and the address here then i’m going to put the name of my mod So now we need to think of a mod id the mod id can be any string of letters it shouldn’t have any spaces i don’t recommend it to have underscores or not and it shouldn’t have any numbers or capital letters so for example my mod id is going to be tutorial mod Like so and as you can see it has no numbers spaces letters or symbols and this is the mod id that minecraft is going to use to load into the game for example minecraft smart id is just minecraft let’s remember this mod id and click ok and now if we open this Package we have our example mod class i’m also going to rename this i’m just going to call it tutorial mode Let’s click finish and now open this tutorial mod.java class and you might be quite overwhelmed but we’re going to delete most of this right now let’s start by deleting all of these methods here from private void setup to registry events so let’s just delete That and you might see we get a lot of errors you can also press ctrl shift and f in eclipse to automatically format the code now let’s remove all of this here but leave minecraftforge.event bus stop register now what i’m going to do is type i event bus bus Is equal to fml mod loading context dot get dot get mod event and now we can hover over this to import or in eclipse you can press ctrl shift and o to automatically set all the right imports now let’s remove this and change our logger from private to Public so that we can access it from anywhere i’m also going to delete this comment and change our mod name to tutorial mod which is our mod id that we set up here next let’s create a variable for our mod id so under the logger we’re going to type public static Final string mod id is equal to and then once again we’re going to type tutorial mod now in our code whenever we want to reference mod id we just access the tutorial mod class which has this inside of it let’s ignore the warning that this isn’t used here Because it will be used once we create blocks and items that’s all the coding in java we’re going to be doing in this episode as we’re not actually going to be adding any features yet however we need we need to tell forge some data about our mod one When we load it to do this we go to source main resources which is going to have all the textures assets and json files for your mod inside the meta inf folder you’ll see a mods.toml file this will by default open a notepad so we can close it And click open with text editor and once again you might feel quite overwhelmed but we are going to delete most of this let’s start by deleting every single line that starts with a hashtag and make sure you don’t delete any line that doesn’t otherwise forge won’t be able to load your mod so I’m going to delete these four lines at the start and all the lines in between here so i want to leave the license mod loader and all that stuff once we finish we want to change these two example mod files to our mod id so tutorial mod Next let’s remove the line with the issue tracker url and these two update json urls and display urls i’m also going to remove the author’s line as it’s optional and i’m going to change the license to mit because my code is open source i’m also going to remove these comments that say mandatory Let’s change our mod id to tutorial mod and our display name which is what the display name of the mod is to tutorial mod with spaces and capital letters i’m going to leave the logo file here because i’m going to be setting a logo file later I’m going to set the credits to tutorial by cy4 next we have this really long lauren ipsum line which is the description of our mod so i’m just going to get everything and delete it you can have multiple lines in the description i’m just going to call it Multiply cy4 and you can write some stuff here but i’m not going to so that’s my description i’m going to delete this line and that’s all the customization we have to do now i’m just going to delete all these comments so that it’s a clean file and that is actually it Now we can load the mod so let’s double click on run client.launch and then close this and now whenever we want to launch the mod click run as and then select run client if you don’t see this you might have to open run client again And close it just so it registers as a launch file so let’s launch and you should see the console open and a new window which is the mod loading process this will start to load the mods that you have installed these mods are forge minecraft and your custom mod that you created this Might take a moment but eventually you’ll see the minecraft loading bar as it starts to load minecraft and now once it’s loaded we can see that there’s three mods loaded which are forge minecraft and our mod so if we click mods we should see minecraft forge and our tutorial mod Which currently doesn’t have a logo but has the name it doesn’t have a version it has the mod id credits and our description that we put this mod currently doesn’t add any content but in the next episode i’ll be telling you how you can add blocks items and tabs as well as Lots of custom features thank you for watching consider subscribing if you need help leave a comment and i’ll see you later Video Information
This video, titled ‘Minecraft Modding Tutorial 1.16 | 1.0 – Setup’, was uploaded by Cy4’s Modding on 2021-01-04 12:26:56. It has garnered 107785 views and 2520 likes. The duration of the video is 00:14:44 or 884 seconds.
im back i guess. Today we set up java and a basic mod.
(ɔ◔‿◔)ɔ ♥ ~ expand me
C://Follow_Me/ Subscribe: https://www.youtube.com/channel/UCJIDXtGpf4wv1ybDzdTA_vQ/ Website: https://mcmodding.club/tutorials/
C://Links/ https://adoptopenjdk.net/ https://www.eclipse.org/ http://files.minecraftforge.net/
C://Help/ Discord: https://discord.gg/x9Mj63m4QG Or comment on this video!
C://Source_Code/ This Episode: https://github.com/Cy4Shot/ModdingTutorial1.16/tree/main/1.0-Setup/ All Episodes: https://github.com/Cy4Shot/ModdingTutorial1.16/