More cleanup. Bidirectional server <-> client network works for mods as well as FML|HS now.

This commit is contained in:
Christian committed 2013-12-06 11:17:40 -05:00
1 parent 58f7487cfa
commit e544adba5c
15 files changed
+291 -63

No files matched your search

@@ -30,6 +30,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.launchwrapper.Launch;
import net.minecraft.network.NetworkManager;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.World;
@@ -122,6 +123,8 @@ public class FMLClientHandler implements IFMLSidedHandler
private Map<String, IResourcePack> resourcePackMap;
private NetworkManager networkConnection;
/**
* Called to start the whole game off
*
@@ -564,4 +567,15 @@ public class FMLClientHandler implements IFMLSidedHandler
ObfuscationReflectionHelper.setPrivateValue(MinecraftServer.class, server, true, "field_71296"+"_Q","serverIs"+"Running");
}
}
@Override
public NetworkManager getClientToServerNetworkManager()
{
return this.networkConnection;
}
public void currentConnection(NetworkManager networkManager, boolean shouldChange)
{
if (shouldChange) this.networkConnection = networkManager;
}
}