Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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.

Posted

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.