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.

Nightstag

Members
  • Joined

  • Last visited

Everything posted by Nightstag

  1. My main question is what instance of player do I refer to to change motionX and motionY. I still need to know that to finish.
  2. I'd use a tick handler, not sure which one, though. I would assume server, though, correct? (Of course I would use an if inside of the method)
  3. Suppose I was running it without using keys, how would I do it?
  4. You sure? I did it with onUpdate before in a class that extends Item without packets.
  5. It's triggered by a keystroke in onPlayerTick.
  6. I'm trying to call it within a method: public void roll(Player player) { player.motionX = 10; } I just need to know what to put in the parameter for player when I'm referencing it.
  7. OK, basically, I need to change the player's motionX and motionY. How do I do this?
  8. Basically, I need to access an instance of player to change motionX, motionY, etc. How would I reference the main, or the being controlled instance of Player?
  9. I was trying to use it for calling a method when a key is pressed, (or just running it in onUpdate, whatever) and I chose onUpdate because it had, in the past I think, a parameter for the player. (Whick a tickhandler does not have/support, afaik)
  10. So I'm just supposed to do @Override public void onUpdate() { } I think I'm misinterpreting you.
  11. Are you sure...? I'm pretty sure I've used parameters with it in the past. Maybe I'm misunderstanding what you mean by parameters?
  12. So I'm attempting to use the onUpdate method, which, of course, requires @Override. However, I get an error stating that I need to override or implement a supertype method. So, of course, I type super.onUpdate(itemstack, world, player, par1, par2); I then get another error, stating that this method (onUpdate(ItemStack, Entity, int, boolean)) is undefined for the type object. Am I using the wrong parameters, or do I need to implement something else? Thanks.

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.