Skip to content

Commit 14412f6

Browse files
committed
chore: remove unused code paths in notickvd
1 parent 6ba3fda commit 14412f6

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

c2me-notickvd/src/main/java/com/ishland/c2me/notickvd/common/Config.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ public class Config {
1313
" Lower this for a better latency and higher this for a faster loading")
1414
.getLong(GlobalExecutors.GLOBAL_EXECUTOR_PARALLELISM * 2L, GlobalExecutors.GLOBAL_EXECUTOR_PARALLELISM * 2L, ConfigSystem.LongChecks.POSITIVE_VALUES_ONLY);
1515

16-
public static final boolean compatibilityMode = new ConfigSystem.ConfigAccessor()
17-
.key("noTickViewDistance.compatibilityMode")
18-
.comment("Whether to use compatibility mode to send chunks \n" +
19-
" This may fix some mod compatibility issues")
20-
.getBoolean(true, true);
21-
2216
public static final boolean enableExtRenderDistanceProtocol = new ConfigSystem.ConfigAccessor()
2317
.key("noTickViewDistance.enableExtRenderDistanceProtocol")
2418
.comment("""

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

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)