CodeChicken Lib 1.8.+

CodeChicken Lib 1.8.+

141M Downloads

How to use IClientPlayNetHandler/IServerPlayNetHandler in packet system

hohserg1 opened this issue ยท 1 comments

commented

ICustomPacketHandler-s have a parameters of PlayNetHandlers. How to use it?

void handlePacket(PacketCustom packet, Minecraft mc, IClientPlayNetHandler handler);
void handlePacket(PacketCustom packet, ServerPlayerEntity sender, IServerPlayNetHandler handler);
commented

They are provided for extra context and are basically guaranteed to be their respective implementation classes.
You can use them for whatever you want, what are you trying to accomplish?