Skip to content

Commit 45ca6f0

Browse files
committed
fix: properly broadcast changes in notickvd chunks
1 parent 24be581 commit 45ca6f0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.ishland.c2me.notickvd.mixin;
22

3-
import com.ishland.c2me.base.common.theinterface.IFastChunkHolder;
43
import com.ishland.c2me.base.common.util.FilteringIterable;
54
import com.ishland.c2me.notickvd.common.IChunkTicketManager;
65
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
@@ -30,4 +29,9 @@ private Iterable<Entity> redirectIterateEntities(ServerWorld serverWorld, Operat
3029
return new FilteringIterable<>(op.call(serverWorld), entity -> !noTickOnlyChunks.contains(entity.getChunkPos().toLong()));
3130
}
3231

32+
@Redirect(method = "broadcastUpdates", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/world/ChunkHolder;getWorldChunk()Lnet/minecraft/world/chunk/WorldChunk;"))
33+
private WorldChunk broadcastBorderChunks(ChunkHolder instance) {
34+
return instance.getAccessibleFuture().getNow(ChunkHolder.UNLOADED_WORLD_CHUNK).orElse(null);
35+
}
36+
3337
}

0 commit comments

Comments
 (0)