mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
parent
792993faca
commit
ee99320810
1 changed files with 4 additions and 0 deletions
|
@ -621,6 +621,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ net.minecraft.server.PlayerChunkMap chunkMap = getHandle().getChunkProvider().playerChunkMap;
|
+ net.minecraft.server.PlayerChunkMap chunkMap = getHandle().getChunkProvider().playerChunkMap;
|
||||||
+ if (viewDistance != chunkMap.getEffectiveViewDistance()) {
|
+ if (viewDistance != chunkMap.getEffectiveViewDistance()) {
|
||||||
+ chunkMap.setViewDistance(viewDistance);
|
+ chunkMap.setViewDistance(viewDistance);
|
||||||
|
+ if (viewDistance > getNoTickViewDistance()) setNoTickViewDistance(viewDistance);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
@ -634,6 +635,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ if ((viewDistance < 2 || viewDistance > 32) && viewDistance != -1) {
|
+ if ((viewDistance < 2 || viewDistance > 32) && viewDistance != -1) {
|
||||||
+ throw new IllegalArgumentException("View distance " + viewDistance + " is out of range of [2, 32]");
|
+ 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;
|
+ net.minecraft.server.PlayerChunkMap chunkMap = getHandle().getChunkProvider().playerChunkMap;
|
||||||
+ if (viewDistance != chunkMap.getRawNoTickViewDistance()) {
|
+ if (viewDistance != chunkMap.getRawNoTickViewDistance()) {
|
||||||
+ chunkMap.setNoTickViewDistance(viewDistance);
|
+ chunkMap.setNoTickViewDistance(viewDistance);
|
||||||
|
|
Loading…
Reference in a new issue