Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitors are not synced on chunk load in the presence of Immersive Portals #90

Open
SquidDev opened this issue Apr 28, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@SquidDev
Copy link
Member

SquidDev commented Apr 28, 2022

Useful information to include:

  • Minecraft version: 1.18.2
  • Mod Version: Built from latest commit (8e224cc).

Immersive Portals overwrites the ChunkMap.playerLoadedChunk method, deferring sending the chunk data until later on:

https://github.com/qouteall/ImmersivePortalsMod/blob/6f512afb56d1ff0835b30a7a8eaf65b0043e84e7/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/mixin/common/chunk_sync/MixinChunkMap_C.java#L111-L116

This means that monitor data is now sent too early, before IP has sent BlockEntitys. Thus, when the client receives the monitor data, it has no monitors to associate it with, and discards them, resulting in black monitors when chunks are loaded.

There's a couple of fixes I can see here:

  • Hook into IP's NewChunkTrackingGraph.beginWatchChunkSignal event and also call MonitorWatcher.onWatch when that "signal" is fired. This isn't an official API, so has no stability guarantees.

  • Add an event to Fabric API for chunk watching/unwatching. Then update CC:R to listen to this event and submit a MR to IP to fire it in their own chunk watching code. Obviously this has a much longer turn around time.

I'm going to file this issue on IP's side too, given that they're the Problem Mod here, and see if they have any suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant