The Bug:
Entities floating in water don't receive vertical knockback upon being hit.
Steps to Reproduce:
Summon a creeper in some water.
Hit the creeper and observe the knockback it receives.
Observed Behavior:
Entities don't receive vertical knockback.
Expected Behavior:
Entities would receive vertical knockback.
Linked issues
relates to 1
Comments 22
The mob actually goes up a little bit. This makes sense as gravity is at play vertically but not horizontally.
I propably wasn't specific enough.
Example 1
When you are normally on the ground and attack a mob with a sword with knockback enchantment, the mob will fly far away and very little high (just like you expected).
Example 2
On the other hand when the mob is in water, you jump into water and swim underwater right under the mob (you look between it's legs) and then attack, you would expect the mob to fly really high into the air and not far away. Instead, it flies in the exactly same way as in the example 1.
If this doesn't help then I'll try to draw it in MS Paint.
EDIT: Also when you use Knockback II its even more visible and even more akward.
That is exactly what I did, attack from underwater, and the mob went both vertically (not by much mind you) and horizontally.
Well then it seems that you (Mojang) like it the way it is. I always imagined knockback as an extra power which is added to your punch and I imagined a punch to behave close to real-life punch.
I'll try to describe it another way.
Imagine that you have a ball and throw it in front of you (that's example 1), then imagine that you throw a ball above your head (that's example 2). That's how I imagined Knockback to work and how it also make sense to me. If Mojang wanted it to behave like some kind of horizontal teleporter, then I'll accept it (with sad panda face).
I can confirm this behavior in 1.19, though this ticket requires some amendments in order to accurately state what the problem is here. If it's okay, could I request ownership since the reporter has been inactive for just under two years? I'll make all the necessary changes and will keep this ticket actively updated. Thank you in advance 🙂
Unable to reproduce.