Posted September 4, 201213 yr I have a parachute mod that works in multiplayer except that I can't seem to use a key binding. I press a key © to add some lift to the parachute, it works fine in singleplayer, LAN, but doesn't seem to respond in multiplayer. I recently converted this mod to FML, getting rid of all modloader code. What do I need to do to get this keybinding working serverside? Any help would be appreciated. I can't find anything on google or seaching these forums. I'm using FML recommended.
September 5, 201213 yr You need to send a packet to the server telling it that the player has pressed the key and then call your parachute code from there. Feel free to check out my packet handler code for TFC Here
September 5, 201213 yr Author Thanks, I'm trying to grasp how to get this to work. I get an NPE when I call my sendPacket method. I think the server instance is null. Do I need to implement IConnectionHandler and PlayerInfo as well? But I get the idea now anyway. Thank you very much.
September 5, 201213 yr Author Thanks again for your help, I got it working. I had to use FMLClientHandler.instance().sendPacket(packet); in my sendCustomPacket method. Using any of the 'getServer' methods failed with NPE.
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.