Knockback enchantment doesn't apply in PVP.
Problem: Knockback enchantment doesn't knock other players +3 / +6 blocks further back, only mobs. (Both passive and hostile.)
What I expected: Hitting a player with an item enchanted with Knockback should move a player further back than hitting them with a normal item.
Steps to reproduce:
- In creative mode give yourself two swords, an anvil, and a Knockback book. Enchant one sword with knockback.
- Spawn in a hostile mob. Hit with normal sword and with knockback sword. Observe that Knockback works on hostile mobs.
- Spawn in a passive mob. Hit with normal sword and with knockback sword. Observe that Knockback works on passive mobs.
- Invite a second player into the world. Ensure they are not in Creative mode and that /gamerule PVP is true. Hit with normal sword and with knockback sword. Second player will travel the exact same distance regardless of which sword you use.
Additional testing:
This seems to be a problem with the Knockback enchantment interacting with players regardless of what item the enchantment is on. I used an editor to enchant a stick with Knockback II and it behaves how I expect- the enchanted stick sends mobs 6 blocks further than a regular stick does. Players still travel the same distance when hit by a regular stick and a Knockback II stick. This scales with enchantment level- you can use the editor to give the stick Knockback 999 which immediately sent the villager I hit out of the 80 chunk render distance, but players still travel the ~3 blocks when hit by the Knockback 999 stick.
2019-11-17, 05:46 PM
2021-06-04, 10:39 PM
2020-07-23, 09:40 PM
25
15
291716