mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
SPIGOT-945 - random light ticking not called whenoptimal chunks is zero.
This commit is contained in:
parent
38aa4c080b
commit
f2e9b61f57
@ -70,10 +70,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Spigot start
|
||||
+ int optimalChunks = spigotConfig.chunksPerTick;
|
||||
+ // Quick conditions to allow us to exist early
|
||||
+ if ( optimalChunks <= 0 || players.isEmpty() )
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+ if ( optimalChunks > 0 ) {
|
||||
+ // Keep chunks with growth inside of the optimal chunk range
|
||||
+ int chunksPerPlayer = Math.min( 200, Math.max( 1, (int) ( ( ( optimalChunks - players.size() ) / (double) players.size() ) + 0.5 ) ) );
|
||||
+ int randRange = 3 + chunksPerPlayer / 30;
|
||||
@ -107,10 +104,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ chunkTickList.put( hash, (short) -1 ); // no players
|
||||
}
|
||||
}
|
||||
+ // Spigot End
|
||||
}
|
||||
+ // Spigot End
|
||||
+ }
|
||||
|
||||
this.methodProfiler.b();
|
||||
if (this.L > 0) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
|
Loading…
Reference in New Issue
Block a user