mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
parent
792993faca
commit
ee99320810
@ -621,6 +621,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ net.minecraft.server.PlayerChunkMap chunkMap = getHandle().getChunkProvider().playerChunkMap;
|
||||
+ if (viewDistance != chunkMap.getEffectiveViewDistance()) {
|
||||
+ chunkMap.setViewDistance(viewDistance);
|
||||
+ if (viewDistance > getNoTickViewDistance()) setNoTickViewDistance(viewDistance);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@ -634,6 +635,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ if ((viewDistance < 2 || viewDistance > 32) && viewDistance != -1) {
|
||||
+ throw new IllegalArgumentException("View distance " + viewDistance + " is out of range of [2, 32]");
|
||||
+ }
|
||||
+ if (viewDistance < getViewDistance() && viewDistance != -1) {
|
||||
+ throw new IllegalArgumentException("View distance " + viewDistance + " is smaller than current ticking view distance (" + getViewDistance() + ")");
|
||||
+ }
|
||||
+ net.minecraft.server.PlayerChunkMap chunkMap = getHandle().getChunkProvider().playerChunkMap;
|
||||
+ if (viewDistance != chunkMap.getRawNoTickViewDistance()) {
|
||||
+ chunkMap.setNoTickViewDistance(viewDistance);
|
||||
|
Loading…
Reference in New Issue
Block a user