Posted March 2, 201411 yr I have followed the tutorial on the wiki for 1.7 networking but it never seems receive the packets I sent like fml is not finding it. Code is the same as wiki but the packet justs sends a string (that works) but the decode method on the packetpipeline is never called. Do I have to register it at all? No code because it is same as wiki but the channel name is different. And the pack just sends a string. Will post like to code if needed. I do send the packet and I have debug print statements in the sending method of the packetpipeline. And it is sent but never received.
March 4, 201411 yr Author Networking package https://github.com/chibill/AdditionalCrafting/tree/master/AdditionalCrafting-1.7.2/src/java/chibill/additionalcrafting/common/networking Where i am sending it from. https://github.com/chibill/AdditionalCrafting/blob/master/AdditionalCrafting-1.7.2/src/java/chibill/additionalcrafting/common/ACEventHandler.java
March 4, 201411 yr You didn't add public void registerPackets() { registerPacket(SendChatAll.class); } Do that, issue fixed.
March 4, 201411 yr Author I register it in my main class. https://github.com/chibill/AdditionalCrafting/blob/master/AdditionalCrafting-1.7.2/src/java/chibill/additionalcrafting/common/AdditionalCraftingBase.java And it seems like the server never calls the decode function in the packetpipeline from testing with print statments.
March 4, 201411 yr Author heres the wierd part it works in debug mode with breakpoints. But not in normal mode.
March 4, 201411 yr i'm a bit new to packet's but try changing (in you https://github.com/chibill/AdditionalCrafting/blob/master/AdditionalCrafting-1.7.2/src/java/chibill/additionalcrafting/common/networking/SendChatAll.java) AdditionalCraftingBase.packetPipeline.sendToAll(this); to AdditionalCraftingBase.packetPipeline.sendToAll(new SendChatAll(message));
March 5, 201411 yr Author I will try but that would make a memory leak if I was on the server and disconnected and reconnected. But okay I will try.
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.