Posted April 26, 201312 yr Hayho! I'm about to make my mod, Industrial Farming, Server-compatible. Therefore, I have to convert every Packet Handling stuff to something the Server is able to deal with - And here comes my problem. The Gui of one of my blocks contains a Slider. The value set by this slider is supposed to go to the Block TileEntity on both sides, Server and Client. Since the Gui is ClientSide only, I have to get the MinecraftServer-instance to send the corresponding packet. But if I use the common methods to send Packets from Client to Server, neither "PacketDispatcher.sendPacketToServer([Packet])" nor "FMLClientHandler.instance().sendPacket([Packet])" work - Do you know any possibility to get a variable set in the Client be sent to the Server? note, that this works completely fine in SinglePlayer. Thanks, Luigi
April 26, 201312 yr What do you mean by "does not work"? Do you have a packet handler set and are using the same channel on both sides?
April 26, 201312 yr Author Well, yes, I have a PacketHandler, of course. As I said before, when I have a singleplayer world, everything works fine. But if I use Server and Client seperatly, things are getting weird. And no, I use two different packet channels, one for Server and one for Client Side. That's fine, too. Greets
April 26, 201312 yr And no, I use two different packet channels, one for Server and one for Client Side. That's fine, too. Maybe I'm missunderstanding something, but you say that you send packets over different channels? I'm kinda wondering why you would do that. Why don't you use the same channel for both client and server? Seperating channels would only makes sense when you have to handle submodules, but not to seperate client and server.
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.