Do not accept invalid client settings

This commit is contained in:
Spottedleaf 2022-05-07 14:59:20 -07:00
commit 4aa035fa95
2 changed files with 25 additions and 1 deletions

View file

@ -1066,7 +1066,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ protected int getClientViewDistance() {
+ return this.player.clientViewDistance == null ? -1 : this.player.clientViewDistance.intValue();
+ return this.player.clientViewDistance == null ? -1 : Math.max(0, this.player.clientViewDistance.intValue());
+ }
+
+ public void update() {