Skip to content

Instantly share code, notes, and snippets.

@WillR27
Created July 4, 2014 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WillR27/d822d873ea9b1cb712d0 to your computer and use it in GitHub Desktop.
Save WillR27/d822d873ea9b1cb712d0 to your computer and use it in GitHub Desktop.
package com.blocklings.network;
import java.io.IOException;
import com.blocklings.main.Blocklings;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.network.FMLNetworkEvent.ClientCustomPacketEvent;
public class ClientPacketHandler extends ServerPacketHandler {
@SubscribeEvent
public void onClientPacket(ClientCustomPacketEvent event) throws IOException {
channelName = event.packet.channel();
if (channelName.equals(Blocklings.networkChannelName)) {
ProcessPacketClientSide.processPacketOnClient(event.packet.payload(), event.packet.getTarget());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment