Decided to actually plug in the network. idea copyright olloth 2015

This commit is contained in:
CannibalVox 2015-03-10 13:13:26 -05:00
parent 43e67bdbd3
commit 8d282cb021
4 changed files with 10 additions and 8 deletions

View file

@ -149,6 +149,7 @@ public class CommonProxy implements IGuiHandler
} }
public void registerSidedHooks(DDProperties properties) { public void registerSidedHooks(DDProperties properties) {
new ServerPacketHandler();
} }
} }

View file

@ -56,7 +56,7 @@ public class PocketManager
} }
private static class ClientLinkWatcher implements IUpdateWatcher<ClientLinkData> public static class ClientLinkWatcher implements IUpdateWatcher<ClientLinkData>
{ {
@Override @Override
public void onCreated(ClientLinkData link) public void onCreated(ClientLinkData link)
@ -85,7 +85,7 @@ public class PocketManager
} }
} }
private static class ClientDimWatcher implements IUpdateWatcher<ClientDimData> public static class ClientDimWatcher implements IUpdateWatcher<ClientDimData>
{ {
@Override @Override
public void onCreated(ClientDimData data) public void onCreated(ClientDimData data)

View file

@ -3,8 +3,10 @@ package StevenDimDoors.mod_pocketDim;
import java.io.File; import java.io.File;
import java.util.List; import java.util.List;
import StevenDimDoors.mod_pocketDim.network.DimDoorsNetwork;
import StevenDimDoors.mod_pocketDim.schematic.BlockRotator; import StevenDimDoors.mod_pocketDim.schematic.BlockRotator;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.event.*;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs; 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.EventHandler;
import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy; 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.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
@ -179,6 +175,8 @@ public class mod_pocketDim
MinecraftForge.TERRAIN_GEN_BUS.register(hooks); MinecraftForge.TERRAIN_GEN_BUS.register(hooks);
proxy.registerSidedHooks(properties); proxy.registerSidedHooks(properties);
DimDoorsNetwork.init();
} }
@EventHandler @EventHandler
@ -292,6 +290,7 @@ public class mod_pocketDim
DDLoot.registerInfo(properties); DDLoot.registerInfo(properties);
proxy.loadTextures(); proxy.loadTextures();
proxy.registerRenderers(); proxy.registerRenderers();
FMLCommonHandler.instance().bus().register(new ConnectionHandler());
} }
public static void translateAndAdd(String key, List list) { public static void translateAndAdd(String key, List list) {

View file

@ -57,5 +57,7 @@ public class ClientProxy extends CommonProxy
ClientOnlyHooks hooks = new ClientOnlyHooks(properties); ClientOnlyHooks hooks = new ClientOnlyHooks(properties);
MinecraftForge.EVENT_BUS.register(hooks); MinecraftForge.EVENT_BUS.register(hooks);
MinecraftForge.TERRAIN_GEN_BUS.register(hooks); MinecraftForge.TERRAIN_GEN_BUS.register(hooks);
PocketManager.getDimwatcher().registerReceiver (new PocketManager.ClientDimWatcher());
PocketManager.getLinkWatcher().registerReceiver(new PocketManager.ClientLinkWatcher());
} }
} }