Fix structure

This commit is contained in:
DaMachinator 2018-01-19 19:52:19 -05:00 committed by Arcanitor
parent 1280cea8d1
commit 12778e855d
3 changed files with 50 additions and 10 deletions

View File

@ -1,10 +0,0 @@
import net.minecraftforge.fml.common.Mod;
@Mod(modid = CivilEngineering.MODID, name = CivilEngineering.NAME, version = CivilEngineering.VERSION, serverSideOnly = true,useMetadata = true)
public class CivilEngineering {
public static final String MODID = "civilengineering";
public static final String NAME = "Civil Engineering";
public static final String VERSION = "0.0.1";
}

View File

@ -0,0 +1,36 @@
package arcanitor.civilengineering;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import org.apache.logging.log4j.Logger;
@Mod(modid = CivilEngineering.MODID, name = CivilEngineering.NAME, version = CivilEngineering.VERSION, serverSideOnly = true,useMetadata = true)
public class CivilEngineering {
public static final String MODID = "civilengineering";
public static final String NAME = "Civil Engineering";
public static final String VERSION = "0.0.1";
@Mod.Instance(value = CivilEngineering.MODID)
public static CivilEngineering instance;
public static Logger logger;
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
logger = event.getModLog();
logger.info("Bridge building pre-init.");
}
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
logger.info("Bridge building init.");
}
@Mod.EventHandler
public void init(FMLPostInitializationEvent event) {
logger.info("Bridge building post-init.");
}
}

View File

@ -0,0 +1,14 @@
package arcanitor.civilengineering.eventhandlers;
import arcanitor.civilengineering.CivilEngineering;
import net.minecraftforge.event.ServerChatEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@Mod.EventBusSubscriber
public class HandleChatMessage {
@SubscribeEvent
public static void chatMessageGlobal(ServerChatEvent event) {
CivilEngineering.logger.info("Message on server: "+event.getMessage()+" sent by "+event.getUsername());
}
}