Skip to content

Commit

Permalink
Fix non block ticking chunks not sending block/light updates
Browse files Browse the repository at this point in the history
Needed to redirect the getTickingChunk call in
broadcastChangedChunks to use the chunk to send method.
  • Loading branch information
Spottedleaf committed Nov 18, 2024
1 parent d24f6c2 commit 3d9ae3f
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,22 @@ private boolean skipSaveTicketUpdates(final ServerChunkCache instance) {
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
Expand Down

0 comments on commit 3d9ae3f

Please sign in to comment.