Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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)

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.

  • 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!

  • 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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.