diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/CommonProxy.java b/src/main/java/StevenDimDoors/mod_pocketDim/CommonProxy.java index eb82a4f7..cdd81d97 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/CommonProxy.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/CommonProxy.java @@ -149,6 +149,7 @@ public class CommonProxy implements IGuiHandler } public void registerSidedHooks(DDProperties properties) { + new ServerPacketHandler(); } } \ No newline at end of file diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/core/PocketManager.java b/src/main/java/StevenDimDoors/mod_pocketDim/core/PocketManager.java index 7b97f946..fd03a38a 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/core/PocketManager.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/core/PocketManager.java @@ -56,7 +56,7 @@ public class PocketManager } - private static class ClientLinkWatcher implements IUpdateWatcher + public static class ClientLinkWatcher implements IUpdateWatcher { @Override public void onCreated(ClientLinkData link) @@ -85,7 +85,7 @@ public class PocketManager } } - private static class ClientDimWatcher implements IUpdateWatcher + public static class ClientDimWatcher implements IUpdateWatcher { @Override public void onCreated(ClientDimData data) diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/mod_pocketDim.java b/src/main/java/StevenDimDoors/mod_pocketDim/mod_pocketDim.java index 645f239b..4f4f3146 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/mod_pocketDim.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/mod_pocketDim.java @@ -3,8 +3,10 @@ package StevenDimDoors.mod_pocketDim; import java.io.File; import java.util.List; +import StevenDimDoors.mod_pocketDim.network.DimDoorsNetwork; import StevenDimDoors.mod_pocketDim.schematic.BlockRotator; import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.event.*; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; @@ -82,12 +84,6 @@ import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; -import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; -import cpw.mods.fml.common.event.FMLServerStartingEvent; -import cpw.mods.fml.common.event.FMLServerStoppedEvent; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @@ -179,6 +175,8 @@ public class mod_pocketDim MinecraftForge.TERRAIN_GEN_BUS.register(hooks); proxy.registerSidedHooks(properties); + + DimDoorsNetwork.init(); } @EventHandler @@ -292,6 +290,7 @@ public class mod_pocketDim DDLoot.registerInfo(properties); proxy.loadTextures(); proxy.registerRenderers(); + FMLCommonHandler.instance().bus().register(new ConnectionHandler()); } public static void translateAndAdd(String key, List list) { diff --git a/src/main/java/StevenDimDoors/mod_pocketDimClient/ClientProxy.java b/src/main/java/StevenDimDoors/mod_pocketDimClient/ClientProxy.java index d3407fa4..4f965c19 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDimClient/ClientProxy.java +++ b/src/main/java/StevenDimDoors/mod_pocketDimClient/ClientProxy.java @@ -57,5 +57,7 @@ public class ClientProxy extends CommonProxy ClientOnlyHooks hooks = new ClientOnlyHooks(properties); MinecraftForge.EVENT_BUS.register(hooks); MinecraftForge.TERRAIN_GEN_BUS.register(hooks); + PocketManager.getDimwatcher().registerReceiver (new PocketManager.ClientDimWatcher()); + PocketManager.getLinkWatcher().registerReceiver(new PocketManager.ClientLinkWatcher()); } } \ No newline at end of file