[Bug]
Raycoms opened this issue ยท 7 comments
Observed behaviour
Server lag spikes when too many people are on.
Expected behaviour
No lagspikes.
Steps to reproduce
Have multiple people on at the same time walking around. Potentially even close to not yet loaded chunks.
Crashlog
No response
Tetra version
4.5.0
mutil/mGui version
4.2.0
Forge version
1.18.1 0.9.59
Other mods
No response
Additional Info:
This is due to:
if (TickEvent.Phase.START == event.phase && event.player.tickCount % 20 == 0 && !event.player.level.isClientSide) {
In the LookAtBlock trigger.
Two things should be done here:
-
This should not be == 0 for all players, else with a lot of players, a lot of them do the same thing in the first tick. (A bit of randomness goes far here)
-
To make 100% sure, there should still be a chunk loaded check before accessing the chunk.
Edit:
- Is there a reason this doesn't run on the client side?
This will be removed in 1.18. Added a config option for you last time around called "look_trigger" which you can use to disable it, it has no use as the ruins are not available in 1.18 yet so there's no point in not disabling it.
Ah, the ruins are not there yet, I'll disable it right away then. Thanks.
As far as I saw, we already ran into issues with around 6 people on. Mostly seems to be when players are travelling and the chunks are still loading around them, which is horribly slow in 1.18 and a getBlockState can then blocking wait for the chunk to finish loading.