Jump to content

Nightstag

Members
  • Posts

    12
  • 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.
×
×
  • Create New...

Important Information

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