Minor code and documentation cleanup. (#4664)
This commit is contained in:
parent
bf6249efe4
commit
2c7e9bed37
2 changed files with 20 additions and 6 deletions
|
|
@ -4,17 +4,28 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION)
|
||||
@Mod(modid = ExampleMod.MODID, name = ExampleMod.NAME, version = ExampleMod.VERSION)
|
||||
public class ExampleMod
|
||||
{
|
||||
public static final String MODID = "examplemod";
|
||||
public static final String NAME = "Example Mod";
|
||||
public static final String VERSION = "1.0";
|
||||
|
||||
|
||||
private static Logger logger;
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event)
|
||||
{
|
||||
logger = event.getModLog();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent event)
|
||||
{
|
||||
// some example code
|
||||
System.out.println("DIRT BLOCK >> "+Blocks.DIRT.getUnlocalizedName());
|
||||
logger.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue