![]() This is enough for forge to load the mod, to check if it loaded you can click on Mods and see if your mod is in there. Your mods.toml file should look something like this: The modid (Needs to be the same as in the annotation.The mods we are making, which need to contain:.We don’t need everything in that example, we only need to specify: But the example from forge shows you a lot. You should look into the toml format to understand how the file works. The mods.toml will tell forge which mods exist and some things like the name, modId, version etc. In this folder create a file named mods.toml. It follows the exact same format as for 1.13:Ĭ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. This will tell forge that this is a mod file. In the Mainclass add an annotation above the class declaration. Which basically means: start with a lowercase letter, then at least 1 but up to 63 more of the following chars: a to z, 0 to 9 _ and – ). In the Main class add 1 public static final String variable: MOD_ID, this will be the id of your mod, it can be whatever you want, but it has to be all lowercase (This is the exact regex used to check if it is valid: “^$”. The basic files are now set up so let’s start coding! 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. ![]() Your package name should adhere to the java conventions. ![]() 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. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |