mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 01:17:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: 767ac20c Merge pull request #2174 from kickash32/Only-count-Natural-Spawned-mobs fa726c3f Create 0402-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch 97488cca Merge pull request #2296 from Spottedleaf/fix-loadchunk-again 36c48316 Fix loadChunk(x, z, false)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From a84ef584ec3dac4bc6b2b29db3a2492603708f6d Mon Sep 17 00:00:00 2001
|
||||
From 854429ab6cd52dfd88f48b40206055b8790085f0 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,11 +13,11 @@ Subject: [PATCH] Implement optional per player mob spawns
|
||||
6 files changed, 78 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 929f5c3031..4fcfcc34f8 100644
|
||||
index ff520d9e86..5ed02f6485 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 {
|
||||
maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24);
|
||||
@@ -519,6 +519,11 @@ public class PaperWorldConfig {
|
||||
}
|
||||
}
|
||||
|
||||
+ public boolean perPlayerMobSpawns = false;
|
||||
@@ -57,7 +57,7 @@ index f6a6421140..770ee018fe 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index ae18431c38..0bcf93e612 100644
|
||||
index 6ca98b7ad5..56e60e0ce1 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -105,6 +105,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -68,7 +68,7 @@ index ae18431c38..0bcf93e612 100644
|
||||
private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) {
|
||||
double d0 = (double) (chunkcoordintpair.x * 16 + 8);
|
||||
double d1 = (double) (chunkcoordintpair.z * 16 + 8);
|
||||
@@ -1099,6 +1100,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1131,6 +1132,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ index af397dd1f7..5e001733a9 100644
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 7f7b2a539a..54b13b046d 100644
|
||||
index f0380c5df4..0c4fd5ca4d 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -17,6 +17,9 @@ import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
||||
@@ -196,9 +196,9 @@ index 7f7b2a539a..54b13b046d 100644
|
||||
Object2IntMap<EnumCreatureType> object2intmap = new Object2IntOpenHashMap();
|
||||
ObjectIterator objectiterator = this.entitiesById.values().iterator();
|
||||
|
||||
@@ -950,13 +955,47 @@ public class WorldServer extends World {
|
||||
|
||||
if (enumcreaturetype != EnumCreatureType.MISC && this.getChunkProvider().b(entity)) {
|
||||
@@ -957,13 +962,47 @@ public class WorldServer extends World {
|
||||
}
|
||||
// Paper end
|
||||
object2intmap.mergeInt(enumcreaturetype, 1, Integer::sum);
|
||||
+ filteredEntities.add(entity); // Paper
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user