In this folder create a file named mods.toml. It follows the exact same format as for 1.12 but you need to use a pack_format of 4:Ĭreate a new folder with the name META-INF. In this file you specify some of the metadata for the mods resources. We also need to add a couple of files to the “ src/main/resources” folder.Ĭreate a file called pack.mcmeta. requires the modid as an attribute, so let’s add it. This will tell forge that this is a mod file. In the Mainclass add an annotation above the class declaration. In the reference class add 1 public static final String variable: MODID, this will be the id of your mod, it can be whatever you want, but it has to be all lowercase. The basic files are now set up so let’s start coding! This class is going to contain all of the of the constant values. One last class before we can start coding, I will call it Reference.
This class will be the entry point of the mod. Create a class in the mod packageand I will call it TutorialMod I will be referring to this class as the Main class.This package will contain all of the classes we are going to create. But you should think of your own name, I will be referring to this package as the mod package. Create a package in the “src/main/java” source folder.First, we need to create the main mod class.