mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-22 16:29:26 +00:00
Updated Upstream (Paper)
This commit is contained in:
@@ -13,10 +13,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 51f86a87c89057351d6984e655674212da8c7dcc..6dce2cb25a5e8b7c979a3f515e4c6c9cfbacd305 100644
|
||||
index c43884019b7162c7f58f636a89c7c19c445eec88..68ad7cb06d85c428f3560f95ed46bca32187e729 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -507,11 +507,16 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -499,11 +499,16 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
this.level.resetIceAndSnowTick(); // Gale - Airplane - optimize random calls in chunk ticking - reset ice & snow tick random
|
||||
if (this.level.getServer().tickRateManager().runsNormally()) {
|
||||
@@ -28,13 +28,13 @@ index 51f86a87c89057351d6984e655674212da8c7dcc..6dce2cb25a5e8b7c979a3f515e4c6c9c
|
||||
+ // Gale end - MultiPaper - skip unnecessary mob spawning computations
|
||||
this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
|
||||
int k = this.distanceManager.getNaturalSpawnChunkCount();
|
||||
// Paper start - per player mob spawning
|
||||
// Paper start - Optional per player mob spawns
|
||||
int naturalSpawnChunkCount = k;
|
||||
- NaturalSpawner.SpawnState spawnercreature_d; // moved down
|
||||
if ((this.spawnFriendlies || this.spawnEnemies) && this.level.paperConfig().entities.spawning.perPlayerMobSpawns) { // don't count mobs when animals and monsters are disabled
|
||||
// re-set mob counts
|
||||
for (ServerPlayer player : this.level.players) {
|
||||
@@ -535,7 +540,11 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -527,7 +532,11 @@ public class ServerChunkCache extends ChunkSource {
|
||||
this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
||||
|
||||
this.lastSpawnState = spawnercreature_d;
|
||||
@@ -47,7 +47,7 @@ index 51f86a87c89057351d6984e655674212da8c7dcc..6dce2cb25a5e8b7c979a3f515e4c6c9c
|
||||
|
||||
// Paper start - optimise chunk tick iteration
|
||||
ChunkMap playerChunkMap = this.chunkMap;
|
||||
@@ -623,7 +632,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -615,7 +624,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
if (tick && chunk1.chunkStatus.isOrAfter(net.minecraft.server.level.FullChunkStatus.ENTITY_TICKING)) {
|
||||
// Paper end - optimise chunk tick iteration
|
||||
chunk1.incrementInhabitedTime(j);
|
||||
@@ -56,7 +56,7 @@ index 51f86a87c89057351d6984e655674212da8c7dcc..6dce2cb25a5e8b7c979a3f515e4c6c9c
|
||||
NaturalSpawner.spawnForChunk(this.level, chunk1, spawnercreature_d, this.spawnFriendlies, this.spawnEnemies, flag1);
|
||||
}
|
||||
|
||||
@@ -669,6 +678,20 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -661,6 +670,20 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user