Enigmatic Legacy 2.11.0 crashes dedicated servers due to unsafe client class reference in PacketUpdateExperience
Commoble opened this issue ยท 1 comments
Versions (Be specific, do not write "latest"):
- Enigmatic Legacy: 2.11.0
- Curios API: 1.16.5-4.0.5.0
- Patchouli: 1.16.4-50
- Forge:1.16.5-36.0.46
Description of a Bug:
PacketUpdateExperience::handle causes ClientPlayerEntity to be classloaded when PacketUpdateExperience is classloaded, causing dedicated servers to crash during FMLCommonSetupEvent. Client-only classes cannot safely be referred to in the handle methods of packet classes (even inside the enqueueWork lambda of server-to-client packets); the handle method must call a method from a different class (wherein which ClientPlayerEntity can be referred to) to avoid crashing dedicated servers.
How to Reproduce:
- Install Enigmatic Legacy on a dedicated server
- Start the server
- Server crashes due to attempting to classload ClientPlayerEntity
Logs:
Crash Log: Please use a paste site like hastebin.
https://gist.github.com/Yourname942/39e236bb190c4a7eaf09055548b9404f