Make despawn distance configs per-category, improve per category spawn limit config (#6717)

Also adds per-world spawn limit config in paper.yml for `underground_water_creature`, and migrates existing spawn limit config options to their Mojang names.
This commit is contained in:
Jake Potrebic 2021-11-08 23:59:15 -08:00 committed by GitHub
parent 87121cef29
commit a923e332ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
165 changed files with 590 additions and 500 deletions

View file

@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index daad04711adcaac9dc3868f20f7dc3c4a09fbac8..b02306027b5aab96fd5036ec41296c8d3d9d99fd 100644
index e6be4991f07a9cd59946d501c002fd9113b46af0..25a0038179ae71511638ecb5cd3f47bd9b81e4b1 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -283,7 +283,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -33,7 +33,7 @@ index daad04711adcaac9dc3868f20f7dc3c4a09fbac8..b02306027b5aab96fd5036ec41296c8d
public final double[] recentTps = new double[ 3 ];
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
@@ -1006,6 +1006,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1007,6 +1007,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
{
return ( avg * exp ) + ( tps * ( 1 - exp ) );
}
@ -91,7 +91,7 @@ index daad04711adcaac9dc3868f20f7dc3c4a09fbac8..b02306027b5aab96fd5036ec41296c8d
// Spigot End
protected void runServer() {
@@ -1018,26 +1069,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1019,26 +1070,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
Arrays.fill( recentTps, 20 );
@ -133,7 +133,7 @@ index daad04711adcaac9dc3868f20f7dc3c4a09fbac8..b02306027b5aab96fd5036ec41296c8d
tickSection = curTime;
}
// Spigot end
@@ -1047,7 +1105,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1048,7 +1106,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
}