Fix non block ticking chunks not sending block/light updates

Needed to redirect the getTickingChunk call in
broadcastChangedChunks to use the chunk to send method.
This commit is contained in:
Spottedleaf
2024-11-18 13:24:24 -08:00
parent d24f6c2874
commit 3d9ae3f018

View File

@@ -315,6 +315,22 @@ abstract class ServerChunkCacheMixin extends ChunkSource implements ChunkSystemS
return false;
}
/**
* @reason We need to use {@link ChunkHolder#getChunkToSend()} as the new chunk system will not bring every chunk
* sent to players up to block ticking.
* @author Spottedleaf
*/
@Redirect(
method = "broadcastChangedChunks",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/level/ChunkHolder;getTickingChunk()Lnet/minecraft/world/level/chunk/LevelChunk;")
)
private LevelChunk redirectTickingChunk(final ChunkHolder instance) {
return instance.getChunkToSend();
}
/**
* @reason Perform mid-tick chunk task processing during chunk tick
* @author Spottedleaf