Solved Trying to make a Flying Pig, so when you hold space you go up.

Discussion in 'Spigot Plugin Development' started by Xemor, Mar 29, 2020.

  1. Question is in the title, and I know it's possible because I've seen plugins like MyPet do it. I just can't work out how you would do it.
    I've been reading this to try and accomplish it, but the client doesn't send a different y value unless they're jumping or something.
  2. the way id go about it is listen to all packets and see what gets called when you hold spacebar. find the packet thats relevant and dissect the values inside the packet and see which one changes when you hold spacebar vs when you dont. thatll give you a way to figure out which value you need to look/listen for
  3. Thanks, I'll give that a go.
  4. How I solved it:
    • Use Reflection to see whether the player is currently jumping or not
    • If the player is jumping, move the pig upwards.