DenizenScript / Denizen

NPC and general Spigot scripting, using the Denizen Scripting Language!
https://denizenscript.com/
MIT License
216 stars 106 forks source link

Use the correct `PlayerChunkSender` #2541

Closed tal5 closed 1 year ago

tal5 commented 1 year ago

Explanation

1.20.2 has a new PlayerChunkSender class, probably as part of their new chunk handling - it's stored in a field on ServerGamePacketListenerImpl, is created in the constructor, and gets used in a few places outside of that for chunk stuff. This PR sets the old listener's one into our overring one, which seems to fix the issues with chunk loading (using reflection as it's final).

Additions

Changes

Notes

mcmonkey4eva commented 1 year ago

if you want me to store a public static final Field and all. strongly preferred, in part because it yields an error message quicker while loading if it's wrong in a future update

tal5 commented 1 year ago

if you want me to store a public static final Field and all. strongly preferred, in part because it yields an error message quicker while loading if it's wrong in a future update

Should be done