From fc0e6c7e086876cce9676214e726a96dc1be209c Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 15 Oct 2021 19:20:32 -0700 Subject: [PATCH] Fix off by one for determining server view distance It was 1 greater than it should've been. lvar renaming caused the field viewDistance to be read when it should've been reading the watchDistance --- patches/server/0769-Replace-player-chunk-loader-system.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/0769-Replace-player-chunk-loader-system.patch b/patches/server/0769-Replace-player-chunk-loader-system.patch index c34aff99c5..8479bd31fa 100644 --- a/patches/server/0769-Replace-player-chunk-loader-system.patch +++ b/patches/server/0769-Replace-player-chunk-loader-system.patch @@ -1205,7 +1205,7 @@ index 54822e418e319db551bfea3218d00faf0e043f43..de0c6316c9b75a2ecc7d6abf7bcca24e } } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 2f5ab00d26dcf027ec0e152a8bf17686a280ae50..9b4d689c04c59056f0a2ec39cf26e173cb722641 100644 +index 2f5ab00d26dcf027ec0e152a8bf17686a280ae50..09b214362f24cefe55e39f886b7fc3b9315b3982 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -187,22 +187,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1379,7 +1379,7 @@ index 2f5ab00d26dcf027ec0e152a8bf17686a280ae50..9b4d689c04c59056f0a2ec39cf26e173 this.viewDistance = j; - this.setNoTickViewDistance(this.getRawNoTickViewDistance()); // Paper - no-tick view distance - propagate changes to no-tick, which does the actual chunk loading/sending -+ this.playerChunkManager.setTickDistance(Mth.clamp(viewDistance, 2, 32)); // Paper - replace player loader system ++ this.playerChunkManager.setTickDistance(Mth.clamp(watchDistance, 2, 32)); // Paper - replace player loader system } }