The Bug:
The lunge enchantment doesn’t work in creative mode if you have 6 or less hunger points.
When the player has less than 6 or less hunger points in creative mode, they can still sprint, so similar behavior should apply to the lunge enchantment and how it functions.
Steps to Reproduce:
Give yourself a spear enchanted with lunge by using the command provided below.
/give @s minecraft:diamond_spear[minecraft:enchantments={"minecraft:lunge":3}]
Enter survival mode and use the spear until you get 6 or less hunger points.
Switch into creative mode and attempt to lunge with the spear.
Observed Behavior:
The lunge enchantment doesn’t work.
Expected Behavior:
The lunge enchantment would work.
post_piercing_attack was hardcoded to ignore players with 6 hunger points or less in survival too, and now any datapack with custom enchantments (that use post_piercing_attack) wont work correctly, this isn’t just a creative problem