More progression on patches

This commit is contained in:
Shane Freeder
2019-12-12 20:58:07 +00:00
parent 8199a18b2b
commit 78640d1334
13 changed files with 4371 additions and 23 deletions

View File

@@ -5,27 +5,25 @@ Subject: [PATCH] implement optional per player mob spawns
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
index 3a79cde59..431534f4f 100644
index 8de6c4816..e25544f11 100644
--- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -0,0 +0,0 @@ public class WorldTimingsHandler {
public final Timing miscMobSpawning;
public final Timing chunkRangeCheckBig;
public final Timing chunkRangeCheckSmall;
+ public final Timing playerMobDistanceMapUpdate;
+
public WorldTimingsHandler(World server) {
String name = server.worldData.getName() +" - ";
public final Timing poiUnload;
public final Timing chunkUnload;
@@ -0,0 +0,0 @@ public class WorldTimingsHandler {
miscMobSpawning = Timings.ofSafe(name + "Mob spawning - Misc");
chunkRangeCheckBig = Timings.ofSafe(name + "Chunk Tick Range - Big");
chunkRangeCheckSmall = Timings.ofSafe(name + "Chunk Tick Range - Small");
+
+ playerMobDistanceMapUpdate = Timings.ofSafe(name + "Per Player Mob Spawning - Distance Map Update");
}
public static Timing getTickList(WorldServer worldserver, String timingsType) {
poiUnload = Timings.ofSafe(name + "Chunk unload - POI");
chunkUnload = Timings.ofSafe(name + "Chunk unload - Chunk");
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index d0f5b2ab7..f63525d67 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -547,7 +545,7 @@ index 000000000..4f13d3ff8
+ }
+}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index f138b112f..109c6ada8 100644
index 1f6b1c4f1..cbe4b23e1 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -645,7 +643,7 @@ index d49ad0308..2fb04e3e9 100644
return this.bb;
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index fc6436c4f..9915c2443 100644
index 66bd402e9..041fedcfa 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -660,7 +658,7 @@ index fc6436c4f..9915c2443 100644
public final CallbackExecutor callbackExecutor = new CallbackExecutor();
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.l = supplier;
this.m = new VillagePlace(new File(this.w, "poi"), datafixer);
this.m = new VillagePlace(new File(this.w, "poi"), datafixer, this.world); // Paper
this.setViewDistance(i);
+ this.playerMobDistanceMap = this.world.paperConfig.perPlayerMobSpawns ? new com.destroystokyo.paper.util.PlayerMobDistanceMap() : null; // Paper
+ }
@@ -757,7 +755,7 @@ index e168c528c..56dabbc15 100644
@Nullable
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7b89b509a..fd42390d4 100644
index a08308a12..4da5c8982 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -0,0 +0,0 @@ public class WorldServer extends World {