Topic category: Troubleshooting, bugs, and solutions
In my mod, I have many causes of the levitation effect for only a few ticks. An example is if I hit a mob while higher, I bounce up, and it works well unless I hit the ground, because then it will constantly give levitation and I can't clear it because it only gives it for a few ticks but it is put repeatedly. It's not just with that, because I also have this cooldown only lasting a few ticks, but sometimes it lasts longer or much longer and then it just goes away randomly. Another problem with that same levitation bug is when I have a certain gamerule off that the procedure checks for, it will give me the levitation even if I don't touch the ground right when hitting it. How do I fix this?
I think it might be a client/server desync problem. The easy fix is put your entire procedure in an "if" block with the condition "not client-side" This works in singleplayer and multiplayer and the only thing is won't work on is return logic and override motion vector, and then you just have part of the procedure not run on client side to fix it.
That was very helpful but in the dependency section on the right, it added
Entity attacked
( i ) Cancelable
['=] Server-side only
I feel like this caused another procedure editing the attributes of mobs to stop working. That one's global trigger is before entity attacked.