mojira.dev
MC-275437

Fast moving entities freeze the server which causes watchdog crash

When using any tnt cannon entities move too fast thus load too many chunks which freezes the server which then crashes due to watchdog.

Previously entities werent loading chunks on their path thus didnt freeze the server, but 24w33a completely reworked entities colliding with interactable blocks (pressure plates, nether portals, lava cauldrons, powdered snow, etc) which makes entities load chunks.
Previously entities checked collisions with said blocks only at the end of their tick, but since 24w33a they search the entire path that entity covered in a tick for said blocks, this search loads and generates chunks which freezes the game.

Example:
1.21 no lag:
https://youtu.be/HRet2xJvzhU
24w33a minute of lag and the server crashes due to watchdog:
https://youtu.be/x_pddUNtNBQ
crash report from second video

Please note this is a very tmc (tech mc community) sensitive issue, it breaks the entire field of cannon tech, to fix it we can suggest limiting said search to only first ~10 blocks of path that entity took.
the mentioned "raycast" is performed in the
addCollisionsAlongTravel()
in the
BlockGetter.java

This issue is related to MC-275298

Linked issues

Attachments

Comments 6

can confirm 24w33a. This breaks a lot of cannon tech so it's really important that this gets fixed.

still an issue in 24w34a

still an issue in 24w35a

We did some math and the raycast can be limited by up to 30 blocks, any more than that leads to excessive chunkloading (its 30 because its width of 2 chunks that separate the entity processing chunks where entity can start its tick from unloaded chunks minus half the maximum hitbox size of the entity that can be shot in regular circumstances)

Savvvage_

Shugoh

Community Consensus

Platform

Very Important

Collision, Crash, Entities

24w33a, 24w34a, 24w35a

24w36a

Retrieved