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:
@@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user