Updated Upstream (Paper)

Upstream has released updates that appears to apply and compile correctly

Paper Changes:
c6987e1a Peek the unload queue for chunk generation checks (#2332)
4ac69cec Bring task execution into server tick timings (#2357)
edce5384 Amend PlayerInteractAtEntityEvent javadoc for ArmorStands (#2309)
8ecd4337 Set spawning entity for fireworks spawned by a crossbow (#2358)
This commit is contained in:
William Blake Galbreath
2019-07-24 20:20:08 -05:00
parent 8f3dd0b176
commit eb13b323fd
8 changed files with 53 additions and 52 deletions

View File

@@ -1,4 +1,4 @@
From 25ba7be0350d6cecf3f97c1b8f3c15cb76cab74b Mon Sep 17 00:00:00 2001
From c8a1368c07cb0ba0bfe9c44c7ddb36cf8c2b354d Mon Sep 17 00:00:00 2001
From: kickash32 <kickash32@gmail.com>
Date: Tue, 11 Jun 2019 22:22:16 -0400
Subject: [PATCH] implement optional per player mob spawns
@@ -13,7 +13,7 @@ Subject: [PATCH] implement optional per player mob spawns
6 files changed, 76 insertions(+), 13 deletions(-)
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index ff520d9e86..c2823c10f9 100644
index 318a470eea..72b77e27e8 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -509,6 +509,11 @@ public class PaperWorldConfig {
@@ -29,10 +29,10 @@ index ff520d9e86..c2823c10f9 100644
private void countAllMobsForSpawning() {
countAllMobsForSpawning = getBoolean("count-all-mobs-for-spawning", false);
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index cd11efc68f..ede99204ad 100644
index ab87387573..f2c13a07bd 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -622,9 +622,21 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -628,9 +628,21 @@ public class ChunkProviderServer extends IChunkProvider {
// Paper start - only allow spawns upto the limit per chunk and update count afterwards
int currEntityCount = object2intmap.getInt(enumcreaturetype);
int difference = k1 - currEntityCount;
@@ -57,7 +57,7 @@ index cd11efc68f..ede99204ad 100644
}
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 594c2b9aa6..bdfa18bca7 100644
index 7d2808aa29..45594250de 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -137,6 +137,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -68,7 +68,7 @@ index 594c2b9aa6..bdfa18bca7 100644
private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) {
double d0 = (double) (chunkcoordintpair.x * 16 + 8);
double d1 = (double) (chunkcoordintpair.z * 16 + 8);
@@ -1322,6 +1323,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1327,6 +1328,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
@@ -168,7 +168,7 @@ index 925efd4a15..70580355c6 100644
@Nullable
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 3e66e1782c..f98b4346b5 100644
index dc710b2fbd..c28df6137b 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -70,6 +70,7 @@ public class WorldServer extends World {
@@ -179,7 +179,7 @@ index 3e66e1782c..f98b4346b5 100644
// CraftBukkit start
private int tickPosition;
@@ -931,6 +932,7 @@ public class WorldServer extends World {
@@ -937,6 +938,7 @@ public class WorldServer extends World {
}
public Object2IntMap<EnumCreatureType> l() {
@@ -187,7 +187,7 @@ index 3e66e1782c..f98b4346b5 100644
Object2IntMap<EnumCreatureType> object2intmap = new Object2IntOpenHashMap();
ObjectIterator objectiterator = this.entitiesById.values().iterator();
@@ -949,6 +951,7 @@ public class WorldServer extends World {
@@ -955,6 +957,7 @@ public class WorldServer extends World {
EnumCreatureType enumcreaturetype = entity.getEntityType().e();
if (enumcreaturetype != EnumCreatureType.MISC && this.getChunkProvider().b(entity)) {
@@ -195,7 +195,7 @@ index 3e66e1782c..f98b4346b5 100644
// Paper start - Only count natural spawns
if (!this.paperConfig.countAllMobsForSpawning &&
!(entity.spawnReason == CreatureSpawnEvent.SpawnReason.NATURAL ||
@@ -960,9 +963,42 @@ public class WorldServer extends World {
@@ -966,9 +969,42 @@ public class WorldServer extends World {
}
}