Tetra

Tetra

23M Downloads

[Bug]

Raycoms opened this issue ยท 7 comments

commented

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

commented

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:

  1. 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)

  2. To make 100% sure, there should still be a chunk loaded check before accessing the chunk.

Edit:

  1. Is there a reason this doesn't run on the client side?
commented

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.

commented

How many players do you have on when this starts to become noticable btw?

commented

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.

commented

I adjusted the config option, still being called, still loading chunks

commented

config might not be loaded yet at that point

commented

Ripped it in 4.8.0.