1.17.x EntityPlayer rotation NMS (reflection)

Discussion in 'Spigot Plugin Development' started by Dawid, Jun 21, 2021.

Thread Status:
Not open for further replies.
  1. Someone find how can now use NMS to set yaw?
    Before 1.17 I used field "yaw" from entityPlayer.class.

    Code (Java):
  2. Just use the API. No clue why you want to force you to use NMS?
    • Agree Agree x 2
  3. Ty for help... I have my API and I need use packet from net.minecraft.server.X_X_VERSION... so I using reflection to make plugin working at a lot of versions.
  4. Entity#teleport(Location)
    • Agree Agree x 1
  5. Did u check net.minecraft.server.level.EntityPlayer? Teleport not exist.
  6. The api is made to support a lot of versions... lol

    Cause its from spigot, not NMS... you dont need nms
    • Like Like x 1
  7. teleport

    Don't develop against implementation if you can develop against API.
    • Agree Agree x 1
  8. To actually answer the question, I believe it is getYRot()
    • Like Like x 1
  9. Maybe too, but I tested and is just field named 'y' :p
    Thanks to everyone for the interesting conversation.

    Btw. Nobody has the right to tell me what to do, they can only suggest;)
Thread Status:
Not open for further replies.