@@ -43,37 +43,4 @@ private WorldChunk redirectSendWatchPacketsGetWorldChunk(ChunkHolder chunkHolder
4343 return chunkHolder .getAccessibleFuture ().getNow (ChunkHolder .UNLOADED_WORLD_CHUNK ).orElse (null );
4444 }
4545
46- // TODO ensureChunkCorrectness
47- @ Inject (method = "makeChunkAccessible" , at = @ At ("RETURN" ))
48- private void onMakeChunkAccessible (ChunkHolder chunkHolder , CallbackInfoReturnable <CompletableFuture <OptionalChunk <WorldChunk >>> cir ) {
49- cir .getReturnValue ().thenAccept (either -> either .ifPresent (worldChunk -> {
50- if (Config .compatibilityMode ) {
51- this .mainThreadExecutor .send (() -> this .sendToPlayers (chunkHolder , worldChunk ));
52- } else {
53- this .sendToPlayers (chunkHolder , worldChunk );
54- }
55- }));
56- }
57-
58- // private synthetic method_17243(Lorg/apache/commons/lang3/mutable/MutableObject;Lnet/minecraft/world/chunk/WorldChunk;Lnet/minecraft/server/network/ServerPlayerEntity;)V
59- // /**
60- // * @author ishland
61- // * @reason dont send chunks twice
62- // */
63- // @Overwrite
64- // private void method_17243(MutableObject<ChunkDataS2CPacket> mutableObject, WorldChunk worldChunk, ServerPlayerEntity player) {
65- // if (Config.ensureChunkCorrectness && NoTickChunkSendingInterceptor.onChunkSending(player, worldChunk.getPos().toLong()))
66- // this.sendChunkDataPackets(player, mutableObject, worldChunk);
67- // }
68-
69- @ WrapWithCondition (method = "method_61257" , at = @ At (value = "INVOKE" , target = "Lnet/minecraft/server/world/ServerChunkLoadingManager;sendToPlayers(Lnet/minecraft/server/world/ChunkHolder;Lnet/minecraft/world/chunk/WorldChunk;)V" ))
70- private boolean controlDuplicateChunkSending (ServerChunkLoadingManager instance , ChunkHolder chunkHolder , WorldChunk chunk ) {
71- return Config .ensureChunkCorrectness ;
72- }
73-
74- @ WrapWithCondition (method = "method_53687" , at = @ At (value = "INVOKE" , target = "Lnet/minecraft/server/world/ServerChunkLoadingManager;sendToPlayers(Lnet/minecraft/server/world/ChunkHolder;Lnet/minecraft/world/chunk/WorldChunk;)V" ))
75- private boolean controlDuplicateChunkSending1 (ServerChunkLoadingManager instance , ChunkHolder chunkHolder , WorldChunk chunk ) {
76- return Config .ensureChunkCorrectness ; // TODO config set to false unfixes MC-264947
77- }
78-
7946}
0 commit comments