When both client and server has Celestria the client will crash on Neoforge. This can also be replicated in the dev environment.
Exception:
java.lang.ClassCastException: class net.minecraft.client.player.LocalPlayer cannot be cast to class net.minecraft.server.level.ServerPlayer
The relevant line of code is here:
|
world.getPlayers().forEach(player -> PacketUtils.sendPlayPayloadS2C((ServerPlayerEntity) player, new WelcomePayload())); |
Just needs a simple a type check or a check to see if the world is server side.
When both client and server has Celestria the client will crash on Neoforge. This can also be replicated in the dev environment.
Exception:
java.lang.ClassCastException: class net.minecraft.client.player.LocalPlayer cannot be cast to class net.minecraft.server.level.ServerPlayer
The relevant line of code is here:
Celestria/common/src/main/java/eu/midnightdust/celestria/Celestria.java
Line 68 in a42ffc8
Just needs a simple a type check or a check to see if the world is server side.