RelativityMC / C2ME-fabric

A Fabric mod designed to improve the chunk performance of Minecraft.
MIT License
529 stars 48 forks source link

Chunks are not loaded / sent to players when the server tick manager is frozen #350

Closed fennifith closed 2 months ago

fennifith commented 2 months ago

Describe the bug

I'm working on a mod that involves teleporting players to a random location (between dimensions), freezing the game, and then starting a countdown before unfreezing. I noticed that with c2me installed, players will only see the "Loading terrain" screen and cannot see the world until the tick manager is unfrozen.

To Reproduce Steps to reproduce the behavior:

  1. Create a server with bingo-2.1.0-alpha.4+mc1.21.1.jar and c2me Currently the released versions of my mod do not have this issue, as they don't freeze chunks until after the countdown starts. (I'm sure there's a more minimal way to accomplish this - I've specifically narrowed the culprit down to server.tickManager.setFrozen(true))
  2. Start a game (/bingo start, or just whack the start button)
  3. Notice that the "Loading terrain" screen does not disappear until after the countdown ends

Expected behavior

Terrain should be able to continue loading even if tickManager.setFrozen(true) is used.

Screenshots

Runtime info (please complete the following information):

Crash reports / logs

Really not useful for this, as it doesn't show what's happening on the client (nor do the client logs): https://pastebin.com/BZh46gKm

Other mods

My bingo mod (plus its bajillion bundled libs), c2me, and fabric-api.

Checklist

Additional context

I'll likely revert my changes to keep it working for now, so no rush - but it'd be neat if this gets fixed!

Also, c2me has specifically made my mod way more playable with elytra (given that it is quite exploration-heavy), so thanks for working on it! :D

fennifith commented 2 months ago

Realized there's a much better way to reproduce this with just c2me: