Skip to content

Commit 99357b0

Browse files
committed
fix: sync lighting before sending to client attempt 2
1 parent 8096a5a commit 99357b0

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

c2me-notickvd/src/main/java/com/ishland/c2me/notickvd/mixin/MixinServerAccessibleChunkSending.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,7 @@ private static void sendChunkToPlayer(ServerChunkLoadingManager tacs, ItemHolder
120120
final WorldChunk worldChunk = (WorldChunk) holder.getItem().get().chunk();
121121
NewChunkHolderVanillaInterface holderVanillaInterface = holder.getUserData().get();
122122
holderVanillaInterface.combinePostProcessingFuture(((IThreadedAnvilChunkStorage) tacs).getLightingProvider().enqueue(holder.getKey().x, holder.getKey().z));
123-
CompletableFuture<?> completableFuturexx = holderVanillaInterface.getPostProcessingFuture();
124-
if (completableFuturexx.isDone()) {
125-
((IThreadedAnvilChunkStorage) tacs).invokeSendToPlayers(holderVanillaInterface, worldChunk);
126-
} else {
127-
completableFuturexx.thenAcceptAsync(v -> ((IThreadedAnvilChunkStorage) tacs).invokeSendToPlayers(holderVanillaInterface, worldChunk), ((IThreadedAnvilChunkStorage) tacs).getMainThreadExecutor());
128-
}
123+
((IThreadedAnvilChunkStorage) tacs).invokeSendToPlayers(holderVanillaInterface, worldChunk);
129124
}
130125

131126
}

c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/statuses/ServerBlockTicking.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,7 @@ private static void filterFluidTicks(ChunkLoadingContext context) {
115115
private static void sendChunkToPlayer(ChunkLoadingContext context) {
116116
final WorldChunk chunk = (WorldChunk) context.holder().getItem().get().chunk();
117117
NewChunkHolderVanillaInterface holderVanillaInterface = context.holder().getUserData().get();
118-
CompletableFuture<?> completableFuturexx = holderVanillaInterface.getPostProcessingFuture();
119-
if (completableFuturexx.isDone()) {
120-
((IThreadedAnvilChunkStorage) context.tacs()).invokeSendToPlayers(holderVanillaInterface, chunk);
121-
} else {
122-
completableFuturexx.thenAcceptAsync(v -> ((IThreadedAnvilChunkStorage) context.tacs()).invokeSendToPlayers(holderVanillaInterface, chunk), ((IThreadedAnvilChunkStorage) context.tacs()).getMainThreadExecutor());
123-
}
118+
((IThreadedAnvilChunkStorage) context.tacs()).invokeSendToPlayers(holderVanillaInterface, chunk);
124119
}
125120

126121
@Override

0 commit comments

Comments
 (0)