Started Rewriting Packet Handling

Started rewriting our packet handling code. Deleted PacketHandler in
favor of using sided (Server-, Client-) packet handlers to make it
easier to follow what's going on in our code. Added some event-based
handling of updates which greatly simplified signaling that data needs
to be sent, but it's not completely done yet.
This commit is contained in:
SenseiKiwi
2013-09-01 22:01:17 -04:00
parent efa5b3eb4c
commit 62fed83e2f
17 changed files with 421 additions and 221 deletions

View File

@@ -1,23 +1,15 @@
// This is my package declaration, do not mess with the standard (package net.minecraft.src;) like I did,
// Because I know what Im doing in this part, If you don't know what your doing keep it the normal (package net.minecraft.src;)
package StevenDimDoors.mod_pocketDimClient;
// Theses are all the imports you need
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
// Create a class and implement IPacketHandler
// This just handles the data packets in the server
public class ClientPacketHandler implements IPacketHandler{
public class ClientPacketHandler implements IPacketHandler
{
@Override
public void onPacketData(INetworkManager manager,
Packet250CustomPayload packet, Player player) {
// TODO Auto-generated method stub
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player)
{
}
}