Working on network handler
This commit is contained in:
parent
46762eedbb
commit
9ee1354874
|
@ -2,9 +2,7 @@ package arcanitor.civilengineering;
|
|||
|
||||
import arcanitor.civilengineering.eventhandlers.FMLEventHandler;
|
||||
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 net.minecraftforge.fml.common.event.*;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@Mod(
|
||||
|
@ -40,9 +38,13 @@ public class CivilEngineering {
|
|||
|
||||
@Mod.EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
logger.info("Bridge building post-init.");
|
||||
|
||||
FMLEventHandler.postInit(event);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void serverStarting(FMLServerStartingEvent event){
|
||||
logger.info("Building chat bridge");
|
||||
FMLEventHandler.serverStarting(event);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,9 +3,11 @@ package arcanitor.civilengineering.eventhandlers;
|
|||
|
||||
import arcanitor.civilengineering.CivilEngineering;
|
||||
import arcanitor.civilengineering.Config;
|
||||
import arcanitor.civilengineering.network.NetworkHandler;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
@ -23,4 +25,7 @@ public class FMLEventHandler {
|
|||
config.save();
|
||||
}
|
||||
}
|
||||
public static void serverStarting(FMLServerStartingEvent event) {
|
||||
(new Thread(new NetworkHandler())).start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,4 @@ public class NetworkHandler implements Runnable {
|
|||
public void run() {
|
||||
CivilEngineering.logger.info("Network Thread");
|
||||
}
|
||||
|
||||
public static void Main(String[] args) {
|
||||
(new Thread(new NetworkHandler())).start();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue