mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-23 15:00:30 +01:00
Prevent light queue overfill when no players are online
This commit is contained in:
parent
4b78c0b805
commit
211f8e041c
5 changed files with 13 additions and 25 deletions
|
@ -25,7 +25,7 @@ Massive update to light to improve performance and chunk loading/generation.
|
|||
8) Fix NPE risk that crashes server in getting nibble data
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
index 19e02d12bb0c5a73066f7c57da40277918276210..f46f3ca87badefd668e70d792de5b3d3c0172a68 100644
|
||||
index 19e02d12bb0c5a73066f7c57da40277918276210..326c52f9f2cc729fd52162aeae18ec9dae3a4eaf 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
@@ -1070,7 +1070,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
@ -33,7 +33,7 @@ index 19e02d12bb0c5a73066f7c57da40277918276210..f46f3ca87badefd668e70d792de5b3d3
|
|||
return true;
|
||||
} else {
|
||||
- ChunkProviderServer.this.lightEngine.queueUpdate();
|
||||
+ //ChunkProviderServer.this.lightEngine.queueUpdate(); // Paper - not needed
|
||||
+ ChunkProviderServer.this.lightEngine.queueUpdate(); // Paper - not needed
|
||||
return super.executeNext() || execChunkTask; // Paper
|
||||
}
|
||||
} finally {
|
||||
|
@ -439,18 +439,6 @@ index 7318103feafd12ed631f907a450c9dc3d665a9a3..b47cd2a8fb4920531d80acfcfe40f821
|
|||
this.p.close();
|
||||
this.world.asyncChunkTaskManager.close(true); // Paper - Required since we're closing regionfiles in the next line
|
||||
this.m.close();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index e7cebe1277cb8fc54a080b93b34a66a2e962119b..0e738ace7d37011547378954aae91f79c7ebd544 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -826,6 +826,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
gameprofilerfiller.exit();
|
||||
timings.chunkTicksBlocks.stopTiming(); // Paper
|
||||
+ getChunkProvider().getLightEngine().queueUpdate(); // Paper
|
||||
// Paper end
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/util/thread/ThreadedMailbox.java b/src/main/java/net/minecraft/util/thread/ThreadedMailbox.java
|
||||
index 2efca1fe92b2e93dcbf5337eea8855b1b2b9a564..72bfda620f073fd3c3e4c43d78583386dadf95e6 100644
|
||||
--- a/src/main/java/net/minecraft/util/thread/ThreadedMailbox.java
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index 0e738ace7d37011547378954aae91f79c7ebd544..7f5d3bcf8be30a6bcdd077bfbc416079e3d969c1 100644
|
||||
index e7cebe1277cb8fc54a080b93b34a66a2e962119b..ea6f7397add28e87d60834495420e52920d6e95c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -1987,12 +1987,14 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1986,12 +1986,14 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
@ -24,7 +24,7 @@ index 0e738ace7d37011547378954aae91f79c7ebd544..7f5d3bcf8be30a6bcdd077bfbc416079
|
|||
// if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add
|
||||
this.removeTicketsForSpawn(this.paperConfig.keepLoadedRange, prevSpawn);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 54625156dd21607f27eb97f95dead60b806f19e1..1d1b150215c1e226fa2583829f0260cba4133f23 100644
|
||||
index 4a5027d6fbd6c68d0e3b43f74afdd49ffa22188c..0d22a15f91b1613f5f289ed570af3410d987f0dd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -389,11 +389,13 @@ public class CraftWorld implements World {
|
||||
|
|
|
@ -33,7 +33,7 @@ index 831bc83cdbf15f08961cc8703be348b458d47fd3..5974cc9f895478eebd4922faa26d5a94
|
|||
// Drop event experience
|
||||
if (flag && event != null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index 7f5d3bcf8be30a6bcdd077bfbc416079e3d969c1..595194e0a0e746c45e3766433bb827b7b51129b5 100644
|
||||
index ea6f7397add28e87d60834495420e52920d6e95c..1a2fc4883ed16c98a2c96881bfee7e744feb24fc 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -99,6 +99,7 @@ import net.minecraft.world.entity.animal.EntityWaterAnimal;
|
||||
|
@ -44,7 +44,7 @@ index 7f5d3bcf8be30a6bcdd077bfbc416079e3d969c1..595194e0a0e746c45e3766433bb827b7
|
|||
import net.minecraft.world.entity.npc.NPC;
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
import net.minecraft.world.entity.raid.PersistentRaid;
|
||||
@@ -1289,6 +1290,13 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1288,6 +1289,13 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
} else if (this.isUUIDTaken(entity)) {
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove stale POIs
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index 595194e0a0e746c45e3766433bb827b7b51129b5..5da7d1df97e70248d01cb1c452b26cfba415a5b0 100644
|
||||
index 1a2fc4883ed16c98a2c96881bfee7e744feb24fc..066897256ebe0927b5c62c1d096df74e81aa0363 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -2066,8 +2066,16 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -2065,8 +2065,16 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
Optional<VillagePlaceType> optional = VillagePlaceType.b(iblockdata);
|
||||
Optional<VillagePlaceType> optional1 = VillagePlaceType.b(iblockdata1);
|
||||
|
||||
|
@ -26,7 +26,7 @@ index 595194e0a0e746c45e3766433bb827b7b51129b5..5da7d1df97e70248d01cb1c452b26cfb
|
|||
|
||||
optional.ifPresent((villageplacetype) -> {
|
||||
this.getMinecraftServer().execute(() -> {
|
||||
@@ -2084,6 +2092,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -2083,6 +2091,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,10 +19,10 @@ index 1ceacb6bbfe99069763845a8aef48a3fb4841e32..d2f6e1308a4dfec663770e2c7f4de0cf
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index 07396504fbabc2eb006f2b7f8e53faafe67d5672..0a698a5a4a6502a488c9afb0ad97165e60030896 100644
|
||||
index ebb785df8c98e053f4e60f7fc7f216ea935cc541..492b57395cd51e39e1d88b193399ce02be378658 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -1684,6 +1684,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1683,6 +1683,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@Override
|
||||
public void notify(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1, int i) {
|
||||
this.getChunkProvider().flagDirty(blockposition);
|
||||
|
@ -30,7 +30,7 @@ index 07396504fbabc2eb006f2b7f8e53faafe67d5672..0a698a5a4a6502a488c9afb0ad97165e
|
|||
VoxelShape voxelshape = iblockdata.getCollisionShape(this, blockposition);
|
||||
VoxelShape voxelshape1 = iblockdata1.getCollisionShape(this, blockposition);
|
||||
|
||||
@@ -1712,6 +1713,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1711,6 +1712,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
||||
this.tickingEntities = wasTicking; // Paper
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue