Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@09904fd Re-add legacy getChunkAtAsynchronously to ChunkProviderServer
This commit is contained in:
BillyGalbreath
2022-09-02 08:20:04 -05:00
parent ff8e329e9d
commit 415a70846c
4 changed files with 27 additions and 27 deletions

View File

@@ -2978,7 +2978,7 @@ index ca42c2642a729b90d22b968af7258f3aee72e14b..7613510e5f4c22ee15651f162fe1bca1
public boolean visible = true;
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index ea1b8f4fd49678f39b1036ae6be880bacc6997f8..40094f8ed5e04eed0378c68120c918af05090601 100644
index efcb80efc69a1e5ffc81b579bf535fd94e8144d7..795691bcb61a7c2b4f903d8db3b6714908c78ac2 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -75,6 +75,9 @@ public class ServerChunkCache extends ChunkSource {
@@ -2991,7 +2991,7 @@ index ea1b8f4fd49678f39b1036ae6be880bacc6997f8..40094f8ed5e04eed0378c68120c918af
private static int getChunkCacheKey(int x, int z) {
return x & 3 | ((z & 3) << 2);
@@ -783,6 +786,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -785,6 +788,7 @@ public class ServerChunkCache extends ChunkSource {
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
gameprofilerfiller.push("pollingChunks");
@@ -2999,7 +2999,7 @@ index ea1b8f4fd49678f39b1036ae6be880bacc6997f8..40094f8ed5e04eed0378c68120c918af
int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING);
boolean flag1 = level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
@@ -792,18 +796,25 @@ public class ServerChunkCache extends ChunkSource {
@@ -794,18 +798,25 @@ public class ServerChunkCache extends ChunkSource {
// Paper start - per player mob spawning
NaturalSpawner.SpawnState spawnercreature_d; // moved down
if ((this.spawnFriendlies || this.spawnEnemies) && this.chunkMap.playerMobDistanceMap != null) { // don't count mobs when animals and monsters are disabled
@@ -3031,7 +3031,7 @@ index ea1b8f4fd49678f39b1036ae6be880bacc6997f8..40094f8ed5e04eed0378c68120c918af
gameprofilerfiller.popPush("filteringLoadedChunks");
// Paper - moved down
this.level.timings.chunkTicks.startTiming(); // Paper
@@ -841,8 +852,8 @@ public class ServerChunkCache extends ChunkSource {
@@ -843,8 +854,8 @@ public class ServerChunkCache extends ChunkSource {
if ((true || this.level.isNaturalSpawningAllowed(chunkcoordintpair)) && this.chunkMap.anyPlayerCloseEnoughForSpawning(holder, chunkcoordintpair, false)) { // Paper - optimise anyPlayerCloseEnoughForSpawning // Paper - replace player chunk loader system
chunk1.incrementInhabitedTime(j);
@@ -3042,7 +3042,7 @@ index ea1b8f4fd49678f39b1036ae6be880bacc6997f8..40094f8ed5e04eed0378c68120c918af
}
if (true || this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) { // Paper - replace player chunk loader system
@@ -904,6 +915,30 @@ public class ServerChunkCache extends ChunkSource {
@@ -906,6 +917,30 @@ public class ServerChunkCache extends ChunkSource {
}
// Paper end - controlled flush for entity tracker packets
}