Posted September 29, 201411 yr Could somebody point me in the right direction for using key binding to control entities? (Haven't used packets except for TEs and DataWatchers) Also, is there a way to access vanilla keybinds, I want to use WASD while mounted but my own override vanilla's (mod works but you can't walk)
September 29, 201411 yr All key input is client-side only; vanilla keybindings are accessed via the game settings: Minecraft.getMinecraft().gameSettings.keyBindForward/Back/Left/Right. You can use KeyInputEvent to listen for the vanilla movement keys being pressed and send appropriate custom packets if the client player is riding your custom entity, which would basically just add velocity to it (which is usually even done from the client side - heck, you might not even need packets if you are only modifying movement). Anyway, I'd look at the Horse / Pig and see how they do it. http://i.imgur.com/NdrFdld.png[/img]
September 29, 201411 yr Author I have the keybinding and forge event set up but I need some help with the actual packets, I'm not using velocity for a number of reasons. I'll check out those two!
September 29, 201411 yr Author P.S. Could you at least pint me in the direction of those classes, sure that it's not just the EntityPig class.
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.