Topic category: Help with modding (Java Edition)
Yes, this may sound like a very weird and non-understandable request, but I'll try to explain everything as clear as I can. Basically, I want to make a potion, that does this:
When player's head pitch or jaw changes(not by a procedure, but when the players ACTUALLY moves their head by themselves) it will add addictional 9 degrees to it, depending onto which side player moved the head, if he moved it to right it adds 9 degrees to the rotation to right, but if left, then 9 addictional degrees to left and same to up and down.
Basically, I want to make a potion, that makes player's head pitch and yaw change be less smooth and more rough.
I tried all different ways to do this with complex procedures, that run each 20th tick or each 10th tick and ended up using 3 local variables and 2 NBTTags, but the result is either:
- Nothing happens, when potion is active
- Player's head constantly moves even when she's not moving it(possibly because procedure checks, if player's head was moved and moves it stronger, but it makes it move even more and endless loop happens, however I tried to use addictional local variable to check if the procedure changed the head pitch and yaw or the player herslef, but it didn't help)
- The player always ends up moving the head to the same spot
Any help would be appreciated! It would be even better if you'd suggest me your procedure.