Skip to content

Fix spear hits for pre-1.21.11 clients - #1381

Open
Almost10 wants to merge 1 commit into
ViaVersion:masterfrom
Almost10:fix/spear-stab
Open

Almost10 wants to merge 1 commit into
ViaVersion:masterfrom
Almost10:fix/spear-stab

Conversation

@Almost10

Copy link
Copy Markdown

Fixes #1314

1.21.11+ servers ignore attack packets while holding a piercing weapon and only handle spear hits through the STAB player action, which older clients don't send. This sends a stab before every main-hand swing. It has to go before the swing since the swing resets the attack charge. The server ignores it if the item isn't a piercing weapon.

Tested on Paper 26.3 with a 1.21.9 client: spear hits did nothing before, now they land, including from 3.8 blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spear Fix

1 participant