Progress on Rewriting Packet Handling

Continued building a system for transferring the complete internal
states of our dimensions from the server to the client. However, Steven
suggested that clients only need minimal data to operate properly, as
opposed to the server. My motivation for this more complicated system
was the concern that minimal information wouldn't be enough. I'm going
to commit my progress, then tear it down and write a much simpler
version.
This commit is contained in:
SenseiKiwi
2013-09-02 16:51:20 -04:00
parent 56ecb0cd9e
commit 307d2258d1
15 changed files with 348 additions and 64 deletions

View File

@@ -11,7 +11,7 @@ import net.minecraft.network.packet.Packet1Login;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.server.MinecraftServer;
import StevenDimDoors.mod_pocketDim.core.PocketManager;
import StevenDimDoors.mod_pocketDim.watcher.IOpaqueMessage;
import StevenDimDoors.mod_pocketDim.messages.IDataMessage;
import cpw.mods.fml.common.network.IConnectionHandler;
import cpw.mods.fml.common.network.Player;
@@ -41,7 +41,7 @@ public class ConnectionHandler implements IConnectionHandler
//Send information about all the registered dimensions and links to the client
try
{
IOpaqueMessage message = PocketManager.getState();
IDataMessage message = PocketManager.getState();
Packet250CustomPayload packet = new Packet250CustomPayload();
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
DataOutputStream writer = new DataOutputStream(buffer);