[Bug] Screenshake crashes clients on multiplayer servers (NEOFORGE - 1.21.1)
AceTheEldritchKing opened this issue ยท 1 comments
Observed behaviour
As reported by some of my playtesters, one of my entities which uses API's camera screenshake while walking crashes clients on multiplayer servers. This is not observed in singeplayer worlds, and seems to be a multiplayer only issue. This issue has been recorded before with another addon's spell crashing the game due to it using screenshake as well. Any time screenshake is used too often, it results in a crash for the client.
Expected behaviour
Screenshake is stable in multiplayer similar to how it is stable in singleplayer.
Steps to reproduce
- Create a new entity class
- Call screenshake at least every second (to match footsteps)
- Open a multiplayer instance
- Summon the entity
Server Type
Dedicated Server
Crashlog
Iron's Spells N Spellbooks version
1.21.1-1.14.5
Forge version
Neoforge 1.21.1-21.1.186
Other mods
I've encountered this issue my mod Discerning The Eldritch which uses the camera screenshake to mimic heavy footsteps. Below is the code I used.
// Screenshake when it walks
if (this.tickCount % 20 == 0 && !isPlayingRiseAnimation())
{
if (this.getDeltaMovement().x < 0 || this.getDeltaMovement().z < 0 || this.getDeltaMovement().z > 0 || this.getDeltaMovement().x > 0)
{
CameraShakeManager.addCameraShake(new CameraShakeData(4, this.position(), 20));
}
}
Crashlog Check
- I understand if this is a crashbug and I did not attach a crashlog, this will not be handled
Fabric Check
- I understand if I am using Farbic APIs or Connector, this will not be handled