Posted July 16, 201510 yr Hi. Why player is null? @SubscribeEvent @SideOnly(Side.CLIENT) public void onClientPacket(ClientCustomPacketEvent event){ EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; ByteBuf buf = event.packet.payload(); System.out.println(player); //this is null packetHandler.handleClientSide(new PacketBuffer(buf), (WorldClient)player.worldObj, player); }
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.