Neruina - Ticking Entity Fixer

Neruina - Ticking Entity Fixer

26M Downloads

kicked from the server, neruina caught lithium stuff

VaporeonScripts opened this issue · 11 comments

commented
commented

friendsandfoes illusion totem crashing the player by loading a client-side class on the server, report to them

commented

Thanks for the explanation and help!

commented

Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/multiplayer/PlayerInfo for invalid dist DEDICATED_SERVER

commented

@Bawnorton Which class exactly is this supposed to be?

commented

But why is this not happening without your mod?

commented

Are you running with lithium? I suspect based on the stack trace that lithium is reflectively loading your mob's class which includes client-side classes

commented

No, i tried without lithium, also ofc it contains the client-side classes, its an entity. But i find this suspicious, totem logic is around for like multiple years already without any kind of issues.

commented

Also i can't see in the logs, from which place it is trying to load the mentioned PlayerInfo, so i could try to identify the problem and fix it.

commented

No, i tried without lithium, also ofc it contains the client-side classes, its an entity. But i find this suspicious, totem logic is around for like multiple years already without any kind of issues.

Not of course, no vanilla mob includes client-side classes, closest is client-bound packets which exist in the server jar.

This requires very specific circumstances to occur and its triggered by your mod using the illusion totem + lithium w/ entity collision optimizations specifically on a dedicated server

Also i can't see in the logs, from which place it is trying to load the mentioned PlayerInfo, so i could try to identify the problem and fix it.

It's at the bottom via caused by, you can strip out the transformer info that neoforge attaches to stack trace elements to make it more readable

commented

I guess i will try to separate the client sided logic from my entity into the "util" class.

Also you are correct i combined some parts of client player and player, thus this mess.

commented

No problem, yeah its not exactly obvious

For the sake of clarity here is the logic flow:

  1. PlayerIllusionEntity spawns and tries to teleport
  2. Minecraft starts collision checks
  3. Lithium intercepts collision checks
  4. Lithium reflectively analyses the class for its canCollideWith method or parent implementation for caching and optimization
  5. This loads your class wholly which includes methods that contain references to client side classes
  6. A crash is propagated up the call chain until it reaches Neruina
  7. Neruina intercepts the crash and takes appropriate action, given this started running on a player tick it kicks the player