This tutorial assumes you have already
- Read the Pre-requisites
- Downloaded the latest Forge MDK
- Setup your mod folder as described at the top of the main Forge 1.14.3 tutorials page
- Read and followed 1.0 - Gradle Configuration
- Read and followed 1.1 - Importing the project into your IDE
- Read and followed 1.2 - Basic Mod
This tutorial isn’t finished yet. However you can always look at the code in my ExampleMod, where I write and perfect the stuff I teach in these tutorials. My main mod class is here
1) make a >public >no args >constructor with nothing in it
2) Now make a constant logger for your mod
public static final Logger LOGGER = LogManager.getLogger(MODID);
(import the log4j logger not the java.util one)
3) Then in your constructor call LOGGER.debug("Hello from YourModName!");
4) for eclipse people refresh /src/
5) If you run your game again, you should be able to see “Hello from YourModName!” in your log
The final result should look something like this
package io.github.cadiboo.examplemod;
import net.minecraftforge.fml.common.Mod;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
/**
* @author Cadiboo
*/
@Mod(ExampleMod.MODID)
public final class ExampleMod {
public static final String MODID = "examplemod";
public static final Logger LOGGER = LogManager.getLogger(MODID);
public ExampleMod() {
LOGGER.debug("Hello from Example Mod!");
}
}