Enigmatic Legacy

Enigmatic Legacy

10M Downloads

Enigmatic Legacy 2.11.0 crashes dedicated servers due to unsafe client class reference in PacketUpdateExperience

Commoble opened this issue ยท 1 comments

commented

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:

  1. Install Enigmatic Legacy on a dedicated server
  2. Start the server
  3. Server crashes due to attempting to classload ClientPlayerEntity

Logs:

Crash Log: Please use a paste site like hastebin.
https://gist.github.com/Yourname942/39e236bb190c4a7eaf09055548b9404f

commented

That classloading is weird as hell, it worked fine in PacketGenericParticleEffect but the exact same case within new packet for some reason ends up loading that damn class.

Anyways, I just gone back in time real quick and already released 2.11.1 which fixes the issue.