Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@b45d9b6 Fix summon_entity effect attempting to add incorrect entity (#11004)
PaperMC/Paper@7eec21e [ci skip] add adventure-key javadoc (#11014)
PaperMC/Paper@8c8b227 Execute chunk tasks mid-tick
This commit is contained in:
granny
2024-07-04 02:47:07 -07:00
parent faa1f93b6f
commit 1ab7990b14
25 changed files with 138 additions and 157 deletions

View File

@@ -2,7 +2,7 @@ group = org.purpurmc.purpur
version = 1.21-R0.1-SNAPSHOT version = 1.21-R0.1-SNAPSHOT
mcVersion = 1.21 mcVersion = 1.21
paperCommit = aa8d38d3dbab3cb0021d0f24f726818caf77bf15 paperCommit = 8c8b227547fa78b8f3295e4ac8ee066777e04e98
org.gradle.caching = true org.gradle.caching = true
org.gradle.parallel = true org.gradle.parallel = true

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index 299b7b029384c58fed80d53cc0b77c420d62eed7..0635aacceec1ba9c753b4dde057876b91336d416 100644 index 1a734293c9416f13324bb0edf8f950c9029f8bc4..42fa7df2badca3fe26258ce0db934ba33f9cec80 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -13,7 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { @@ -13,7 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
@@ -214,10 +214,10 @@ index b24265573fdef5d9a964bcd76146f34542c420cf..710477ae27ebc5afdf0012ef0867d05e
public SystemReport getSystemReport() { public SystemReport getSystemReport() {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 68f60e77e0bfd42b6419491c1d59b6432974216b..85ed9fd1f49163a77695524a1bb338097e4c35c3 100644 index 330bee331335454a61cf8350a6654217c8124445..646d1947351eb9dea1e301698ed4a03a96e03f8a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -966,7 +966,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1028,7 +1028,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
shutdownThread = Thread.currentThread(); shutdownThread = Thread.currentThread();
org.spigotmc.WatchdogThread.doStop(); // Paper org.spigotmc.WatchdogThread.doStop(); // Paper
if (!isSameThread()) { if (!isSameThread()) {

View File

@@ -92,7 +92,7 @@ index 7d82cc6b847124cf4225428ba310309544928148..04fd1172b47a74b16955cf93fc20f64f
this.setPvpAllowed(dedicatedserverproperties.pvp); this.setPvpAllowed(dedicatedserverproperties.pvp);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index fee155c81df385faa474e3aec777a30375ecb07d..db8ae59dc8f1eb52c344210c03634fc0b0012e82 100644 index fa6b8ce6505a3c094187298a63b0e944e1e74af1..9b81f4c7d504065837bee4533bac978807c35663 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -172,6 +172,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -172,6 +172,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@@ -103,7 +103,7 @@ index fee155c81df385faa474e3aec777a30375ecb07d..db8ae59dc8f1eb52c344210c03634fc0
public final co.aikar.timings.WorldTimingsHandler timings; // Paper public final co.aikar.timings.WorldTimingsHandler timings; // Paper
public static BlockPos lastPhysicsProblem; // Spigot public static BlockPos lastPhysicsProblem; // Spigot
private org.spigotmc.TickLimiter entityLimiter; private org.spigotmc.TickLimiter entityLimiter;
@@ -261,6 +262,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -266,6 +267,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config & Anti-Xray protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config & Anti-Xray
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
@@ -159,7 +159,7 @@ index caf6ff33b42472d30f28629470e12889f50490cc..2047354b757cb239b5bbf8dfd8cce284
public void restart() { public void restart() {
org.spigotmc.RestartCommand.restart(); org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index b63e965d726a5c96ec4f3aa16016f3610bb3f95a..6f8fa47897bcbde6db6c3297f6d929dd038e45ee 100644 index 6e1f92b45504cef0c4dcbbebf3df339ef4cad0a1..48e8b7405270632130721e87579ee2438a0f0b75 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -176,6 +176,14 @@ public class Main { @@ -176,6 +176,14 @@ public class Main {

View File

@@ -22,10 +22,10 @@ index 2767d6f97e8b314d23a8e62f22dfd396f5660d31..a64e5997b94cc8173f0512d1e282355f
super(x, y, z); super(x, y, z);
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 85ed9fd1f49163a77695524a1bb338097e4c35c3..827d994be0c486e56748f7066e0f27128f4aba5d 100644 index 646d1947351eb9dea1e301698ed4a03a96e03f8a..c6aea5dde7fe84800996be05bc44167e13374b1e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1712,6 +1712,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1775,6 +1775,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers
@@ -34,7 +34,7 @@ index 85ed9fd1f49163a77695524a1bb338097e4c35c3..827d994be0c486e56748f7066e0f2712
this.profiler.push(() -> { this.profiler.push(() -> {
String s = String.valueOf(worldserver); String s = String.valueOf(worldserver);
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 798016774df02c3f7ebf909c9cc125f8427a39be..df01eaebfcb759eefb512b3c7eeb861e96f88688 100644 index 2d97ca1f3c625c0206d35b785c57d9587924ed0a..3610c7a9e8415f310653d2769a2cb8d6724a69ba 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -229,6 +229,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -229,6 +229,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable server mod name
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 827d994be0c486e56748f7066e0f27128f4aba5d..db8507f11ca46c642700a8d9db70e0296921ffa8 100644 index c6aea5dde7fe84800996be05bc44167e13374b1e..325efea1b8d55be22da7828fd5e88e4744d2e4d4 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1870,7 +1870,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1933,7 +1933,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate @DontObfuscate
public String getServerModName() { public String getServerModName() {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Lagging threshold
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index db8507f11ca46c642700a8d9db70e0296921ffa8..6676970d434b8c1200d8ec3c0304084b640a7eb8 100644 index 325efea1b8d55be22da7828fd5e88e4744d2e4d4..ed2526eab7e643df322001d4acf4d8c97b07c277 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -319,6 +319,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -319,6 +319,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -16,7 +16,7 @@ index db8507f11ca46c642700a8d9db70e0296921ffa8..6676970d434b8c1200d8ec3c0304084b
public volatile Thread shutdownThread; // Paper public volatile Thread shutdownThread; // Paper
public volatile boolean abnormalExit = false; // Paper public volatile boolean abnormalExit = false; // Paper
@@ -1226,6 +1227,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1288,6 +1289,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.recentTps[0] = tps1.getAverage(); this.recentTps[0] = tps1.getAverage();
this.recentTps[1] = tps5.getAverage(); this.recentTps[1] = tps5.getAverage();
this.recentTps[2] = tps15.getAverage(); this.recentTps[2] = tps15.getAverage();

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Zombie horse naturally spawn
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index df01eaebfcb759eefb512b3c7eeb861e96f88688..f1cedc22891cf2c91115188545d752567d3761b1 100644 index 3610c7a9e8415f310653d2769a2cb8d6724a69ba..149165bfe4bdab02233416677d72e5afd5f64225 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -814,10 +814,18 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -831,10 +831,18 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
boolean flag1 = this.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.getEffectiveDifficulty() * this.paperConfig().entities.spawning.skeletonHorseThunderSpawnChance.or(0.01D) && !this.getBlockState(blockposition.below()).is(Blocks.LIGHTNING_ROD); // Paper - Configurable spawn chances for skeleton horses boolean flag1 = this.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.getEffectiveDifficulty() * this.paperConfig().entities.spawning.skeletonHorseThunderSpawnChance.or(0.01D) && !this.getBlockState(blockposition.below()).is(Blocks.LIGHTNING_ROD); // Paper - Configurable spawn chances for skeleton horses
if (flag1) { if (flag1) {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable TPS Catchup
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6676970d434b8c1200d8ec3c0304084b640a7eb8..9835183dc91230f86200eb18cf9ce9a26e5808ab 100644 index ed2526eab7e643df322001d4acf4d8c97b07c277..57ca70b66115d1ca8ebcf262510e56ed88b63459 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1258,6 +1258,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1320,6 +1320,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.popPush("nextTickWait"); this.profiler.popPush("nextTickWait");
this.mayHaveDelayedTasks = true; this.mayHaveDelayedTasks = true;
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos); this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);

View File

@@ -18,7 +18,7 @@ index 039a86034928a5eb7aaa2d7ca76a7bddcca346bd..308f67d0616e2d6bb135258f1fda53cc
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 9835183dc91230f86200eb18cf9ce9a26e5808ab..7f1bfc5550c00aa3bd0871638c6f3f4e15c08508 100644 index 57ca70b66115d1ca8ebcf262510e56ed88b63459..dc57e5c5b35da05269c2a05da58814956174cd99 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -314,7 +314,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -314,7 +314,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -30,7 +30,7 @@ index 9835183dc91230f86200eb18cf9ce9a26e5808ab..7f1bfc5550c00aa3bd0871638c6f3f4e
// Spigot end // Spigot end
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
public static long currentTickLong = 0L; // Paper - track current tick as a long public static long currentTickLong = 0L; // Paper - track current tick as a long
@@ -1105,6 +1105,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1167,6 +1167,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L; private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
private long lastTick = 0; private long lastTick = 0;
private long catchupTime = 0; private long catchupTime = 0;
@@ -38,7 +38,7 @@ index 9835183dc91230f86200eb18cf9ce9a26e5808ab..7f1bfc5550c00aa3bd0871638c6f3f4e
public final RollingAverage tps1 = new RollingAverage(60); public final RollingAverage tps1 = new RollingAverage(60);
public final RollingAverage tps5 = new RollingAverage(60 * 5); public final RollingAverage tps5 = new RollingAverage(60 * 5);
public final RollingAverage tps15 = new RollingAverage(60 * 15); public final RollingAverage tps15 = new RollingAverage(60 * 15);
@@ -1219,14 +1220,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1281,14 +1282,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (++MinecraftServer.currentTick % MinecraftServer.SAMPLE_INTERVAL == 0) { if (++MinecraftServer.currentTick % MinecraftServer.SAMPLE_INTERVAL == 0) {
final long diff = currentTime - tickSection; final long diff = currentTime - tickSection;
final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP); final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);

View File

@@ -27,10 +27,10 @@ index 321188173918d0d60858a258400dfd682ccdb21c..af47074f3a61a8518697d7851e43d543
return true; return true;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index db8ae59dc8f1eb52c344210c03634fc0b0012e82..d0c200a3eea7d891c07b6d16664b77e404880977 100644 index 9b81f4c7d504065837bee4533bac978807c35663..edd0f51826ebf77a790bcb8c465a116ab9830922 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1581,4 +1581,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -1592,4 +1592,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
return null; return null;
} }
// Paper end - optimize redstone (Alternate Current) // Paper end - optimize redstone (Alternate Current)

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] Allow toggling special MobSpawners per world
In vanilla, these are all hardcoded on for world type 0 (overworld) and hardcoded off for every other world type. Default config behaviour matches this. In vanilla, these are all hardcoded on for world type 0 (overworld) and hardcoded off for every other world type. Default config behaviour matches this.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index f1cedc22891cf2c91115188545d752567d3761b1..44f7de001538435d526fac3bc6b7575e15d2bb89 100644 index 149165bfe4bdab02233416677d72e5afd5f64225..9fb10081518a6c2a6aa557324055f7596883cfdc 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -519,7 +519,24 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -536,7 +536,24 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
this.dragonParts = new Int2ObjectOpenHashMap(); this.dragonParts = new Int2ObjectOpenHashMap();
this.tickTime = flag1; this.tickTime = flag1;
this.server = minecraftserver; this.server = minecraftserver;
@@ -59,7 +59,7 @@ index c72b6ea5530e54fc373c701028e1c147cea34b59..96e9fce5f9084737d2fcf4deb8330573
if (spawnplacementtype.isSpawnPositionOk(world, blockposition2, EntityType.WANDERING_TRADER)) { if (spawnplacementtype.isSpawnPositionOk(world, blockposition2, EntityType.WANDERING_TRADER)) {
blockposition1 = blockposition2; blockposition1 = blockposition2;
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index b9236abf201401ea4bf4cf1f92b534669447cd1d..e2ff691f4d237af59710151754601eed24f49598 100644 index 36b2b377f3253e5013c307b82c6ed893d5b58ffd..e43e5facf44978994c8a515a20906dc8fbf8b9b8 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -70,6 +70,12 @@ public class PurpurWorldConfig { @@ -70,6 +70,12 @@ public class PurpurWorldConfig {

View File

@@ -18,10 +18,10 @@ index 76ef195a5074006b009acd9cc1744667c6aecbb9..659577549e132754281df76a7a1bfd88
public ClientboundSetTimePacket(long time, long timeOfDay, boolean doDaylightCycle) { public ClientboundSetTimePacket(long time, long timeOfDay, boolean doDaylightCycle) {
this.gameTime = time; this.gameTime = time;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7f1bfc5550c00aa3bd0871638c6f3f4e15c08508..3ac4bfc46bfc7a47e8dfb2a3458c449b5d79d3e7 100644 index dc57e5c5b35da05269c2a05da58814956174cd99..7d5b029eb87192ea372f940bdb18edca7aefe8fd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1705,7 +1705,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1768,7 +1768,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
long worldTime = level.getGameTime(); long worldTime = level.getGameTime();
final ClientboundSetTimePacket worldPacket = new ClientboundSetTimePacket(worldTime, dayTime, doDaylight); final ClientboundSetTimePacket worldPacket = new ClientboundSetTimePacket(worldTime, dayTime, doDaylight);
for (Player entityhuman : level.players()) { for (Player entityhuman : level.players()) {
@@ -31,7 +31,7 @@ index 7f1bfc5550c00aa3bd0871638c6f3f4e15c08508..3ac4bfc46bfc7a47e8dfb2a3458c449b
} }
ServerPlayer entityplayer = (ServerPlayer) entityhuman; ServerPlayer entityplayer = (ServerPlayer) entityhuman;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 44f7de001538435d526fac3bc6b7575e15d2bb89..a416766ababa6ec85d6d53e54042c87f82062a1f 100644 index 9fb10081518a6c2a6aa557324055f7596883cfdc..43d2ae53584b0894286c1ae8ca5409a368fa253c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -221,6 +221,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -221,6 +221,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -43,7 +43,7 @@ index 44f7de001538435d526fac3bc6b7575e15d2bb89..a416766ababa6ec85d6d53e54042c87f
private final RandomSequences randomSequences; private final RandomSequences randomSequences;
// CraftBukkit start // CraftBukkit start
@@ -607,6 +609,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -624,6 +626,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
this.chunkTaskScheduler = new ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkTaskScheduler((ServerLevel)(Object)this, ca.spottedleaf.moonrise.common.util.MoonriseCommon.WORKER_POOL); this.chunkTaskScheduler = new ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkTaskScheduler((ServerLevel)(Object)this, ca.spottedleaf.moonrise.common.util.MoonriseCommon.WORKER_POOL);
// Paper end - rewrite chunk system // Paper end - rewrite chunk system
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
@@ -51,7 +51,7 @@ index 44f7de001538435d526fac3bc6b7575e15d2bb89..a416766ababa6ec85d6d53e54042c87f
} }
// Paper start // Paper start
@@ -783,6 +786,13 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -800,6 +803,13 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
this.serverLevelData.setGameTime(i); this.serverLevelData.setGameTime(i);
this.serverLevelData.getScheduledEvents().tick(this.server, i); this.serverLevelData.getScheduledEvents().tick(this.server, i);
if (this.levelData.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) { if (this.levelData.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) {
@@ -65,7 +65,7 @@ index 44f7de001538435d526fac3bc6b7575e15d2bb89..a416766ababa6ec85d6d53e54042c87f
this.setDayTime(this.levelData.getDayTime() + 1L); this.setDayTime(this.levelData.getDayTime() + 1L);
} }
@@ -791,7 +801,21 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -808,7 +818,21 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
public void setDayTime(long timeOfDay) { public void setDayTime(long timeOfDay) {
this.serverLevelData.setDayTime(timeOfDay); this.serverLevelData.setDayTime(timeOfDay);
@@ -88,7 +88,7 @@ index 44f7de001538435d526fac3bc6b7575e15d2bb89..a416766ababa6ec85d6d53e54042c87f
public void tickCustomSpawners(boolean spawnMonsters, boolean spawnAnimals) { public void tickCustomSpawners(boolean spawnMonsters, boolean spawnAnimals) {
Iterator iterator = this.customSpawners.iterator(); Iterator iterator = this.customSpawners.iterator();
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index b70e4afa153ce3532649a55a48d58ec1ad6ee6b4..8c644fb65c9ca56a5c9a24945f4d43b117cd02f2 100644 index 85e16939a1ac27037b1959e4fc1ec57324a7c11e..fde8c013bb398f924d8c6a7fbfabf276f0a96936 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -121,6 +121,13 @@ public class PurpurWorldConfig { @@ -121,6 +121,13 @@ public class PurpurWorldConfig {

View File

@@ -42,7 +42,7 @@ index e96fca314bebea5fcdb684d3478af1b6dc5f13cf..5ab29081ab9f5dcf355d1dac2f2a8541
EntityBreedEvent entityBreedEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(entityageable, this, other, breeder, this.breedItem, experience); EntityBreedEvent entityBreedEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(entityageable, this, other, breeder, this.breedItem, experience);
if (entityBreedEvent.isCancelled()) { if (entityBreedEvent.isCancelled()) {
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index d0c200a3eea7d891c07b6d16664b77e404880977..54b57081264c367fba10433f25a6ef93f18fc4ab 100644 index edd0f51826ebf77a790bcb8c465a116ab9830922..9810b1cb4c771a01df93fd45e2f94019edabf6a5 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -181,6 +181,49 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -181,6 +181,49 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@@ -95,7 +95,7 @@ index d0c200a3eea7d891c07b6d16664b77e404880977..54b57081264c367fba10433f25a6ef93
public CraftWorld getWorld() { public CraftWorld getWorld() {
return this.world; return this.world;
} }
@@ -263,6 +306,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -268,6 +311,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), env); // Purpur this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), env); // Purpur
@@ -104,7 +104,7 @@ index d0c200a3eea7d891c07b6d16664b77e404880977..54b57081264c367fba10433f25a6ef93
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env); this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 56ebfaf5e523fe0ef70c2950f2efac12829e0cf2..3a636f4cee643c51b30b3e86c1d85be07438c631 100644 index 3a3f096f5edb65d854f81d96100bdf133647916c..a32fa43357885730ae4b5d641ab3bc2e7333d78a 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -115,6 +115,7 @@ public class PurpurWorldConfig { @@ -115,6 +115,7 @@ public class PurpurWorldConfig {

View File

@@ -17,10 +17,10 @@ index 911a12e8af22b5f7a645384fee37c9ad435a9be1..73774049d9d4165036ddf90979d2de83
if (environment.includeIntegrated) { if (environment.includeIntegrated) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3ac4bfc46bfc7a47e8dfb2a3458c449b5d79d3e7..ada01633d26745900f15a512293a93aa3b1ee42f 100644 index 7d5b029eb87192ea372f940bdb18edca7aefe8fd..e1cc431ff0b082115408f9fa88939bd5957cbc64 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1079,6 +1079,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1141,6 +1141,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.safeShutdown(waitForShutdown, false); this.safeShutdown(waitForShutdown, false);
} }
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) { public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Config for skipping night
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index a416766ababa6ec85d6d53e54042c87f82062a1f..aba483be8705ad41245604862cf403fd2d45a171 100644 index 43d2ae53584b0894286c1ae8ca5409a368fa253c..f2362ebe16440fd611ed80f056294c28611cf944 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -660,7 +660,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -677,7 +677,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE); int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
long j; long j;

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Make lightning rod range configurable
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index aba483be8705ad41245604862cf403fd2d45a171..72b55599cff0cf8b398c1c8f077dabe3f8d02bbf 100644 index f2362ebe16440fd611ed80f056294c28611cf944..0db8ecab2a27410059c7c131a4a903ee543e1801 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -977,7 +977,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -994,7 +994,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
return holder.is(PoiTypes.LIGHTNING_ROD); return holder.is(PoiTypes.LIGHTNING_ROD);
}, (blockposition1) -> { }, (blockposition1) -> {
return blockposition1.getY() == this.getHeight(Heightmap.Types.WORLD_SURFACE, blockposition1.getX(), blockposition1.getZ()) - 1; return blockposition1.getY() == this.getHeight(Heightmap.Types.WORLD_SURFACE, blockposition1.getX(), blockposition1.getZ()) - 1;

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Customizable sleeping actionbar messages
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 72b55599cff0cf8b398c1c8f077dabe3f8d02bbf..65f36d4cf7789f9a7b26d29d9b2b5fdae199694f 100644 index 0db8ecab2a27410059c7c131a4a903ee543e1801..0faac1e8358b7095190f170e981874d52eb31914 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1026,11 +1026,27 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -1043,11 +1043,27 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
if (this.canSleepThroughNights()) { if (this.canSleepThroughNights()) {
if (!this.getServer().isSingleplayer() || this.getServer().isPublished()) { if (!this.getServer().isSingleplayer() || this.getServer().isPublished()) {
int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE); int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Option for if rain and thunder should stop on sleep
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 65f36d4cf7789f9a7b26d29d9b2b5fdae199694f..11b73081f5e225257027c15749636ed147b969af 100644 index 0faac1e8358b7095190f170e981874d52eb31914..3f5460eef103b0c664f52838fb4f7e000c216879 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1186,6 +1186,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -1203,6 +1203,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@VisibleForTesting @VisibleForTesting
public void resetWeatherCycle() { public void resetWeatherCycle() {
// CraftBukkit start // CraftBukkit start
@@ -16,7 +16,7 @@ index 65f36d4cf7789f9a7b26d29d9b2b5fdae199694f..11b73081f5e225257027c15749636ed1
this.serverLevelData.setRaining(false, org.bukkit.event.weather.WeatherChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents this.serverLevelData.setRaining(false, org.bukkit.event.weather.WeatherChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents
// If we stop due to everyone sleeping we should reset the weather duration to some other random value. // If we stop due to everyone sleeping we should reset the weather duration to some other random value.
// Not that everyone ever manages to get the whole server to sleep at the same time.... // Not that everyone ever manages to get the whole server to sleep at the same time....
@@ -1193,6 +1194,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -1210,6 +1211,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
this.serverLevelData.setRainTime(0); this.serverLevelData.setRainTime(0);
} }
// CraftBukkit end // CraftBukkit end

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] UPnP Port Forwarding
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d2ec3b09bd5176f339fb618e4a1c89959fc0b7ff..64d31cfcd70c7186c2b0f93536922ed903eba368 100644 index 1eedf6b371834e307fd6010721c1f6eb94a5dbd2..4dd18ac6fd51cf0db7bb3a3290db7d5461984b7a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -321,6 +321,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -321,6 +321,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -16,7 +16,7 @@ index d2ec3b09bd5176f339fb618e4a1c89959fc0b7ff..64d31cfcd70c7186c2b0f93536922ed9
public volatile Thread shutdownThread; // Paper public volatile Thread shutdownThread; // Paper
public volatile boolean abnormalExit = false; // Paper public volatile boolean abnormalExit = false; // Paper
@@ -985,6 +986,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1047,6 +1048,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.info("Stopping server"); MinecraftServer.LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
MinecraftTimings.stopServer(); // Paper MinecraftTimings.stopServer(); // Paper

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Give bee counts in beehives to Purpur clients
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 64d31cfcd70c7186c2b0f93536922ed903eba368..1de97c47735190be65c220289bcb320d7be7e2ba 100644 index 4dd18ac6fd51cf0db7bb3a3290db7d5461984b7a..3318f2f5858b453ad7a9e4eee908dc128e08faa7 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1090,6 +1090,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1152,6 +1152,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) { public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
org.purpurmc.purpur.task.BossBarTask.stopAll(); // Purpur org.purpurmc.purpur.task.BossBarTask.stopAll(); // Purpur

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Allow void trading
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 11b73081f5e225257027c15749636ed147b969af..be1d11d58aca571ed5b943bcbc00bafda5ea91db 100644 index 3f5460eef103b0c664f52838fb4f7e000c216879..dfb25c24237d98159e3c58b3d800c6ab5dc5e81b 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2571,7 +2571,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -2598,7 +2598,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
// Spigot Start // Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
// Paper start - Fix merchant inventory not closing on entity removal // Paper start - Fix merchant inventory not closing on entity removal

View File

@@ -42,10 +42,10 @@ index d0d36a57ec4896bcb74970f8fb24d8f3e17db133..0c8fe5b2500480c3a9e9ab3285ad22e0
} catch (Exception exception) { } catch (Exception exception) {
if (exception instanceof ReportedException) { if (exception instanceof ReportedException) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1de97c47735190be65c220289bcb320d7be7e2ba..6753ea878a19a8cb883db783664929a8927799ac 100644 index 3318f2f5858b453ad7a9e4eee908dc128e08faa7..5702660ef5769ab44278f30eafb517acdd358be9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1546,15 +1546,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1609,15 +1609,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
public void tickServer(BooleanSupplier shouldKeepTicking) { public void tickServer(BooleanSupplier shouldKeepTicking) {
@@ -64,7 +64,7 @@ index 1de97c47735190be65c220289bcb320d7be7e2ba..6753ea878a19a8cb883db783664929a8
// Paper end // Paper end
new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper - Server Tick Events new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper - Server Tick Events
@@ -1579,9 +1579,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1642,9 +1642,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
io.papermc.paper.util.CachedLists.reset(); // Paper io.papermc.paper.util.CachedLists.reset(); // Paper
// Paper start - move executeAll() into full server tick timing // Paper start - move executeAll() into full server tick timing
@@ -76,7 +76,7 @@ index 1de97c47735190be65c220289bcb320d7be7e2ba..6753ea878a19a8cb883db783664929a8
// Paper end // Paper end
// Paper start - Server Tick Events // Paper start - Server Tick Events
long endTime = System.nanoTime(); long endTime = System.nanoTime();
@@ -1604,7 +1604,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1667,7 +1667,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.logTickMethodTime(i); this.logTickMethodTime(i);
this.profiler.pop(); this.profiler.pop();
org.spigotmc.WatchdogThread.tick(); // Spigot org.spigotmc.WatchdogThread.tick(); // Spigot
@@ -85,7 +85,7 @@ index 1de97c47735190be65c220289bcb320d7be7e2ba..6753ea878a19a8cb883db783664929a8
} }
private void logTickMethodTime(long tickStartTime) { private void logTickMethodTime(long tickStartTime) {
@@ -1675,9 +1675,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1738,9 +1738,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getPlayerList().getPlayers().forEach((entityplayer) -> { this.getPlayerList().getPlayers().forEach((entityplayer) -> {
entityplayer.connection.suspendFlushing(); entityplayer.connection.suspendFlushing();
}); });
@@ -97,7 +97,7 @@ index 1de97c47735190be65c220289bcb320d7be7e2ba..6753ea878a19a8cb883db783664929a8
// Paper start - Folia scheduler API // Paper start - Folia scheduler API
((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick(); ((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick();
getAllLevels().forEach(level -> { getAllLevels().forEach(level -> {
@@ -1694,21 +1694,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1757,21 +1757,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Paper end - Folia scheduler API // Paper end - Folia scheduler API
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
this.profiler.push("commandFunctions"); this.profiler.push("commandFunctions");
@@ -124,7 +124,7 @@ index 1de97c47735190be65c220289bcb320d7be7e2ba..6753ea878a19a8cb883db783664929a8
// Send time updates to everyone, it will get the right time from the world the player is in. // Send time updates to everyone, it will get the right time from the world the player is in.
// Paper start - Perf: Optimize time updates // Paper start - Perf: Optimize time updates
for (final ServerLevel level : this.getAllLevels()) { for (final ServerLevel level : this.getAllLevels()) {
@@ -1728,7 +1728,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1791,7 +1791,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
} }
// Paper end - Perf: Optimize time updates // Paper end - Perf: Optimize time updates
@@ -133,7 +133,7 @@ index 1de97c47735190be65c220289bcb320d7be7e2ba..6753ea878a19a8cb883db783664929a8
this.isIteratingOverLevels = true; // Paper - Throw exception on world create while being ticked this.isIteratingOverLevels = true; // Paper - Throw exception on world create while being ticked
Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; move down Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; move down
@@ -1755,9 +1755,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1818,9 +1818,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.push("tick"); this.profiler.push("tick");
try { try {
@@ -145,7 +145,7 @@ index 1de97c47735190be65c220289bcb320d7be7e2ba..6753ea878a19a8cb883db783664929a8
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception ticking world"); CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
@@ -1772,24 +1772,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1835,24 +1835,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
this.profiler.popPush("connection"); this.profiler.popPush("connection");
@@ -233,7 +233,7 @@ index c96740a82eac9101f74edeb44edf4b64d1d633e0..1b6c5a36e96a3845d55b0b798a8cffdc
} }
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 82e7f7c3c2f51bc135585f43bc5167bcde2f8a98..779b7ec2f243f4a8868d78e7fe5b5c57446d60aa 100644 index 64ed296cfbe7e5d27286b8cee70454fd1d99ebb0..be22cbe607876fdf39120d6957db541146e6e589 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -357,9 +357,9 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -357,9 +357,9 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -281,7 +281,7 @@ index 82e7f7c3c2f51bc135585f43bc5167bcde2f8a98..779b7ec2f243f4a8868d78e7fe5b5c57
this.level.getProfiler().pop(); this.level.getProfiler().pop();
this.clearCache(); this.clearCache();
} }
@@ -423,7 +422,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -424,7 +423,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
gameprofilerfiller.push("filteringLoadedChunks"); gameprofilerfiller.push("filteringLoadedChunks");
List<ServerChunkCache.ChunkAndHolder> list = Lists.newArrayListWithCapacity(this.chunkMap.size()); List<ServerChunkCache.ChunkAndHolder> list = Lists.newArrayListWithCapacity(this.chunkMap.size());
Iterator iterator = this.chunkMap.getChunks().iterator(); Iterator iterator = this.chunkMap.getChunks().iterator();
@@ -290,7 +290,7 @@ index 82e7f7c3c2f51bc135585f43bc5167bcde2f8a98..779b7ec2f243f4a8868d78e7fe5b5c57
while (iterator.hasNext()) { while (iterator.hasNext()) {
ChunkHolder playerchunk = (ChunkHolder) iterator.next(); ChunkHolder playerchunk = (ChunkHolder) iterator.next();
@@ -436,7 +435,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -437,7 +436,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
if (this.level.tickRateManager().runsNormally()) { if (this.level.tickRateManager().runsNormally()) {
gameprofilerfiller.popPush("naturalSpawnCount"); gameprofilerfiller.popPush("naturalSpawnCount");
@@ -299,7 +299,7 @@ index 82e7f7c3c2f51bc135585f43bc5167bcde2f8a98..779b7ec2f243f4a8868d78e7fe5b5c57
int k = this.distanceManager.getNaturalSpawnChunkCount(); int k = this.distanceManager.getNaturalSpawnChunkCount();
// Paper start - Optional per player mob spawns // Paper start - Optional per player mob spawns
int naturalSpawnChunkCount = k; int naturalSpawnChunkCount = k;
@@ -461,7 +460,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -462,7 +461,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
spawnercreature_d = NaturalSpawner.createState(naturalSpawnChunkCount, this.level.getAllEntities(), this::getFullChunk, !this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new LocalMobCapCalculator(this.chunkMap) : null, false); spawnercreature_d = NaturalSpawner.createState(naturalSpawnChunkCount, this.level.getAllEntities(), this::getFullChunk, !this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new LocalMobCapCalculator(this.chunkMap) : null, false);
} }
// Paper end - Optional per player mob spawns // Paper end - Optional per player mob spawns
@@ -308,7 +308,7 @@ index 82e7f7c3c2f51bc135585f43bc5167bcde2f8a98..779b7ec2f243f4a8868d78e7fe5b5c57
this.lastSpawnState = spawnercreature_d; this.lastSpawnState = spawnercreature_d;
gameprofilerfiller.popPush("spawnAndTick"); gameprofilerfiller.popPush("spawnAndTick");
@@ -497,21 +496,21 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -503,21 +502,21 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
} }
} }
} }
@@ -336,10 +336,10 @@ index 82e7f7c3c2f51bc135585f43bc5167bcde2f8a98..779b7ec2f243f4a8868d78e7fe5b5c57
gameprofilerfiller.pop(); gameprofilerfiller.pop();
gameprofilerfiller.pop(); gameprofilerfiller.pop();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index be1d11d58aca571ed5b943bcbc00bafda5ea91db..2c622aaa370bb8cf3b6d68bc6533abe318992d6a 100644 index dfb25c24237d98159e3c58b3d800c6ab5dc5e81b..c2aaca3cdc77f14e1d19eb4ac8cbf10a3ae0b6d3 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -686,7 +686,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -703,7 +703,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
} }
gameprofilerfiller.popPush("tickPending"); gameprofilerfiller.popPush("tickPending");
@@ -348,7 +348,7 @@ index be1d11d58aca571ed5b943bcbc00bafda5ea91db..2c622aaa370bb8cf3b6d68bc6533abe3
if (!this.isDebug() && flag) { if (!this.isDebug() && flag) {
j = this.getGameTime(); j = this.getGameTime();
gameprofilerfiller.push("blockTicks"); gameprofilerfiller.push("blockTicks");
@@ -695,24 +695,24 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -712,24 +712,24 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
this.fluidTicks.tick(j, paperConfig().environment.maxFluidTicks, this::tickFluid); // Paper - configurable max fluid ticks this.fluidTicks.tick(j, paperConfig().environment.maxFluidTicks, this::tickFluid); // Paper - configurable max fluid ticks
gameprofilerfiller.pop(); gameprofilerfiller.pop();
} }
@@ -380,7 +380,7 @@ index be1d11d58aca571ed5b943bcbc00bafda5ea91db..2c622aaa370bb8cf3b6d68bc6533abe3
} }
this.handlingTick = false; this.handlingTick = false;
@@ -725,7 +725,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -742,7 +742,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
if (flag1 || this.emptyTime++ < 300) { if (flag1 || this.emptyTime++ < 300) {
gameprofilerfiller.push("entities"); gameprofilerfiller.push("entities");
@@ -389,7 +389,7 @@ index be1d11d58aca571ed5b943bcbc00bafda5ea91db..2c622aaa370bb8cf3b6d68bc6533abe3
if (this.dragonFight != null && flag) { if (this.dragonFight != null && flag) {
gameprofilerfiller.push("dragonFight"); gameprofilerfiller.push("dragonFight");
this.dragonFight.tick(); this.dragonFight.tick();
@@ -733,7 +733,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -750,7 +750,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
} }
org.spigotmc.ActivationRange.activateEntities(this); // Spigot org.spigotmc.ActivationRange.activateEntities(this); // Spigot
@@ -398,7 +398,7 @@ index be1d11d58aca571ed5b943bcbc00bafda5ea91db..2c622aaa370bb8cf3b6d68bc6533abe3
this.entityTickList.forEach((entity) -> { this.entityTickList.forEach((entity) -> {
if (!entity.isRemoved()) { if (!entity.isRemoved()) {
if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed
@@ -760,8 +760,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -777,8 +777,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
} }
} }
}); });
@@ -409,7 +409,7 @@ index be1d11d58aca571ed5b943bcbc00bafda5ea91db..2c622aaa370bb8cf3b6d68bc6533abe3
gameprofilerfiller.pop(); gameprofilerfiller.pop();
this.tickBlockEntities(); this.tickBlockEntities();
} }
@@ -894,7 +894,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -911,7 +911,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
} // Paper - Option to disable ice and snow } // Paper - Option to disable ice and snow
gameprofilerfiller.popPush("tickBlocks"); gameprofilerfiller.popPush("tickBlocks");
@@ -418,7 +418,7 @@ index be1d11d58aca571ed5b943bcbc00bafda5ea91db..2c622aaa370bb8cf3b6d68bc6533abe3
if (randomTickSpeed > 0) { if (randomTickSpeed > 0) {
LevelChunkSection[] achunksection = chunk.getSections(); LevelChunkSection[] achunksection = chunk.getSections();
@@ -927,7 +927,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -944,7 +944,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
} }
} }
@@ -427,7 +427,7 @@ index be1d11d58aca571ed5b943bcbc00bafda5ea91db..2c622aaa370bb8cf3b6d68bc6533abe3
gameprofilerfiller.pop(); gameprofilerfiller.pop();
} }
@@ -1241,8 +1241,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -1268,8 +1268,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
// Spigot end // Spigot end
// Paper start- timings // Paper start- timings
final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(entity); final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(entity);
@@ -438,7 +438,7 @@ index be1d11d58aca571ed5b943bcbc00bafda5ea91db..2c622aaa370bb8cf3b6d68bc6533abe3
// Paper end - timings // Paper end - timings
entity.setOldPosAndRot(); entity.setOldPosAndRot();
ProfilerFiller gameprofilerfiller = this.getProfiler(); ProfilerFiller gameprofilerfiller = this.getProfiler();
@@ -1258,7 +1258,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -1285,7 +1285,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
entity.postTick(); // CraftBukkit entity.postTick(); // CraftBukkit
} else { entity.inactiveTick(); } // Paper - EAR 2 } else { entity.inactiveTick(); } // Paper - EAR 2
this.getProfiler().pop(); this.getProfiler().pop();
@@ -447,7 +447,7 @@ index be1d11d58aca571ed5b943bcbc00bafda5ea91db..2c622aaa370bb8cf3b6d68bc6533abe3
Iterator iterator = entity.getPassengers().iterator(); Iterator iterator = entity.getPassengers().iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -1275,8 +1275,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -1302,8 +1302,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
if (passenger instanceof Player || this.entityTickList.contains(passenger)) { if (passenger instanceof Player || this.entityTickList.contains(passenger)) {
// Paper - EAR 2 // Paper - EAR 2
final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(passenger); final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(passenger);
@@ -458,7 +458,7 @@ index be1d11d58aca571ed5b943bcbc00bafda5ea91db..2c622aaa370bb8cf3b6d68bc6533abe3
// Paper end // Paper end
passenger.setOldPosAndRot(); passenger.setOldPosAndRot();
++passenger.tickCount; ++passenger.tickCount;
@@ -1306,7 +1306,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -1333,7 +1333,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
this.tickPassenger(passenger, entity2); this.tickPassenger(passenger, entity2);
} }
@@ -467,7 +467,7 @@ index be1d11d58aca571ed5b943bcbc00bafda5ea91db..2c622aaa370bb8cf3b6d68bc6533abe3
} }
} else { } else {
passenger.stopRiding(); passenger.stopRiding();
@@ -1328,7 +1328,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -1355,7 +1355,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
if (!savingDisabled) { if (!savingDisabled) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit
@@ -476,7 +476,7 @@ index be1d11d58aca571ed5b943bcbc00bafda5ea91db..2c622aaa370bb8cf3b6d68bc6533abe3
if (progressListener != null) { if (progressListener != null) {
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel")); progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
} }
@@ -1338,10 +1338,10 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -1365,10 +1365,10 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
progressListener.progressStage(Component.translatable("menu.savingChunks")); progressListener.progressStage(Component.translatable("menu.savingChunks"));
} }
@@ -558,10 +558,10 @@ index 85b4b24361e785acf75571ff98f924c00ae80748..09a7b418ddf564c0be13297f7c216db2
} }
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 54b57081264c367fba10433f25a6ef93f18fc4ab..e353384abb69aa4cee6fb20277df874b40466ace 100644 index 9810b1cb4c771a01df93fd45e2f94019edabf6a5..1b85d31a81404ea817c892ac0bd055058fe8f079 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -985,15 +985,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -990,15 +990,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
ProfilerFiller gameprofilerfiller = this.getProfiler(); ProfilerFiller gameprofilerfiller = this.getProfiler();
gameprofilerfiller.push("blockEntities"); gameprofilerfiller.push("blockEntities");
@@ -580,7 +580,7 @@ index 54b57081264c367fba10433f25a6ef93f18fc4ab..e353384abb69aa4cee6fb20277df874b
// Spigot start // Spigot start
// Iterator<TickingBlockEntity> iterator = this.blockEntityTickers.iterator(); // Iterator<TickingBlockEntity> iterator = this.blockEntityTickers.iterator();
boolean flag = this.tickRateManager().runsNormally(); boolean flag = this.tickRateManager().runsNormally();
@@ -1017,7 +1017,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -1027,7 +1027,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
} }
this.blockEntityTickers.removeAll(toRemove); // Paper - Fix MC-117075 this.blockEntityTickers.removeAll(toRemove); // Paper - Fix MC-117075

View File

@@ -83,10 +83,10 @@ index e9775b4506909bee65a74964f0d5391a0513de1d..684f7f202305c09b1037c5d38a52a5ea
} }
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb87073f8af682 100644 index 5702660ef5769ab44278f30eafb517acdd358be9..6791cdae222c0156df8defbec78a221ff90945e4 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -359,13 +359,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -421,13 +421,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) { public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
super("Server"); super("Server");
SERVER = this; // Paper - better singleton SERVER = this; // Paper - better singleton
@@ -106,7 +106,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
this.random = RandomSource.create(); this.random = RandomSource.create();
this.port = -1; this.port = -1;
this.levels = Maps.newLinkedHashMap(); this.levels = Maps.newLinkedHashMap();
@@ -979,9 +979,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1041,9 +1041,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
// Paper end // Paper end
// CraftBukkit end // CraftBukkit end
@@ -118,7 +118,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
MinecraftServer.LOGGER.info("Stopping server"); MinecraftServer.LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
@@ -1252,16 +1252,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1314,16 +1314,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
boolean flag = i == 0L; boolean flag = i == 0L;
@@ -139,7 +139,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
this.tickServer(flag ? () -> { this.tickServer(flag ? () -> {
return false; return false;
} : this::haveTime); } : this::haveTime);
@@ -1272,7 +1272,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1334,7 +1334,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
throw new RuntimeException("Chunk system crash propagated to tick()", crash); throw new RuntimeException("Chunk system crash propagated to tick()", crash);
} }
// Paper end - rewrite chunk system // Paper end - rewrite chunk system
@@ -148,7 +148,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
this.mayHaveDelayedTasks = true; this.mayHaveDelayedTasks = true;
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos); this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
// Purpur start // Purpur start
@@ -1288,9 +1288,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1350,9 +1350,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.tickRateManager.endTickWork(); this.tickRateManager.endTickWork();
} }
@@ -161,7 +161,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
this.isReady = true; this.isReady = true;
JvmProfiler.INSTANCE.onServerTick(this.smoothedTickTimeMillis); JvmProfiler.INSTANCE.onServerTick(this.smoothedTickTimeMillis);
} }
@@ -1499,7 +1499,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1562,7 +1562,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error
@@ -170,7 +170,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
super.doRunTask(ticktask); super.doRunTask(ticktask);
} }
@@ -1572,9 +1572,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1635,9 +1635,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.ticksUntilAutosave = this.autosavePeriod; this.ticksUntilAutosave = this.autosavePeriod;
// CraftBukkit end // CraftBukkit end
MinecraftServer.LOGGER.debug("Autosave started"); MinecraftServer.LOGGER.debug("Autosave started");
@@ -182,7 +182,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
MinecraftServer.LOGGER.debug("Autosave finished"); MinecraftServer.LOGGER.debug("Autosave finished");
} }
io.papermc.paper.util.CachedLists.reset(); // Paper io.papermc.paper.util.CachedLists.reset(); // Paper
@@ -1588,7 +1588,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1651,7 +1651,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime; long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent(); new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
// Paper end - Server Tick Events // Paper end - Server Tick Events
@@ -191,7 +191,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
long j = Util.getNanos() - i; long j = Util.getNanos() - i;
int k = this.tickCount % 100; int k = this.tickCount % 100;
@@ -1602,7 +1602,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1665,7 +1665,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.tickTimes60s.add(this.tickCount, j); this.tickTimes60s.add(this.tickCount, j);
// Paper end - Add tick times API and /mspt command // Paper end - Add tick times API and /mspt command
this.logTickMethodTime(i); this.logTickMethodTime(i);
@@ -200,7 +200,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
org.spigotmc.WatchdogThread.tick(); // Spigot org.spigotmc.WatchdogThread.tick(); // Spigot
//co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper // Purpur //co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper // Purpur
} }
@@ -1693,11 +1693,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1756,11 +1756,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}); });
// Paper end - Folia scheduler API // Paper end - Folia scheduler API
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
@@ -214,7 +214,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down //Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
// CraftBukkit start // CraftBukkit start
@@ -1739,20 +1739,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1802,20 +1802,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers
worldserver.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur worldserver.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur
@@ -240,7 +240,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
try { try {
//worldserver.timings.doTick.startTiming(); // Spigot // Purpur //worldserver.timings.doTick.startTiming(); // Spigot // Purpur
@@ -1765,17 +1765,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1828,17 +1828,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
throw new ReportedException(crashreport); throw new ReportedException(crashreport);
} }
@@ -262,7 +262,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
//MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper // Purpur //MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper // Purpur
this.playerList.tick(); this.playerList.tick();
//MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper // Purpur //MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper // Purpur
@@ -1783,7 +1783,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1846,7 +1846,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
GameTestTicker.SINGLETON.tick(); GameTestTicker.SINGLETON.tick();
} }
@@ -271,7 +271,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
//MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper // Purpur //MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper // Purpur
for (int i = 0; i < this.tickables.size(); ++i) { for (int i = 0; i < this.tickables.size(); ++i) {
@@ -1791,7 +1791,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1854,7 +1854,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
//MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper // Purpur //MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper // Purpur
@@ -280,7 +280,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
iterator = this.playerList.getPlayers().iterator(); iterator = this.playerList.getPlayers().iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -1801,7 +1801,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1864,7 +1864,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
entityplayer.connection.resumeFlushing(); entityplayer.connection.resumeFlushing();
} }
@@ -289,7 +289,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
} }
private void synchronizeTime(ServerLevel world) { private void synchronizeTime(ServerLevel world) {
@@ -1809,7 +1809,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1872,7 +1872,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
public void forceTimeSynchronization() { public void forceTimeSynchronization() {
@@ -298,7 +298,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
Iterator iterator = this.getAllLevels().iterator(); Iterator iterator = this.getAllLevels().iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -1818,7 +1818,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1881,7 +1881,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.synchronizeTime(worldserver); this.synchronizeTime(worldserver);
} }
@@ -307,7 +307,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
} }
public boolean isLevelEnabled(Level world) { public boolean isLevelEnabled(Level world) {
@@ -2530,6 +2530,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -2593,6 +2593,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
public ProfilerFiller getProfiler() { public ProfilerFiller getProfiler() {
@@ -315,7 +315,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
return this.profiler; return this.profiler;
} }
@@ -2776,7 +2777,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -2839,7 +2840,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit end // CraftBukkit end
private void startMetricsRecordingTick() { private void startMetricsRecordingTick() {
@@ -324,7 +324,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(Util.timeSource, this.isDedicatedServer()), Util.timeSource, Util.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> { this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(Util.timeSource, this.isDedicatedServer()), Util.timeSource, Util.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> {
this.executeBlocking(() -> { this.executeBlocking(() -> {
this.saveDebugReport(path.resolve("server")); this.saveDebugReport(path.resolve("server"));
@@ -2786,40 +2787,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -2849,40 +2850,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.willStartRecordingMetrics = false; this.willStartRecordingMetrics = false;
} }
@@ -377,7 +377,7 @@ index 6753ea878a19a8cb883db783664929a8927799ac..f00825d506242bc3ab3aef6b48cb8707
} }
public Path getWorldPath(LevelResource worldSavePath) { public Path getWorldPath(LevelResource worldSavePath) {
@@ -2872,15 +2873,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -2935,15 +2936,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
public boolean isTimeProfilerRunning() { public boolean isTimeProfilerRunning() {
@@ -468,7 +468,7 @@ index 1b6c5a36e96a3845d55b0b798a8cffdc7a4ffd93..ecd02b10c4120a7d7342b12ec95be0ee
public boolean hasWork() { public boolean hasWork() {
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 779b7ec2f243f4a8868d78e7fe5b5c57446d60aa..c50e1dee1a32ea7a8fd412f98e944a0e81b69b02 100644 index be22cbe607876fdf39120d6957db541146e6e589..63b03939a15150eeafc0498a6c810153bcc0e271 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -374,26 +374,26 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -374,26 +374,26 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -516,7 +516,7 @@ index 779b7ec2f243f4a8868d78e7fe5b5c57446d60aa..c50e1dee1a32ea7a8fd412f98e944a0e
this.clearCache(); this.clearCache();
} }
@@ -416,10 +416,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -417,10 +417,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
this.lastInhabitedUpdate = i; this.lastInhabitedUpdate = i;
if (!this.level.isDebug()) { if (!this.level.isDebug()) {
@@ -530,7 +530,7 @@ index 779b7ec2f243f4a8868d78e7fe5b5c57446d60aa..c50e1dee1a32ea7a8fd412f98e944a0e
List<ServerChunkCache.ChunkAndHolder> list = Lists.newArrayListWithCapacity(this.chunkMap.size()); List<ServerChunkCache.ChunkAndHolder> list = Lists.newArrayListWithCapacity(this.chunkMap.size());
Iterator iterator = this.chunkMap.getChunks().iterator(); Iterator iterator = this.chunkMap.getChunks().iterator();
//if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper // Purpur //if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper // Purpur
@@ -434,7 +434,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -435,7 +435,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
} }
if (this.level.tickRateManager().runsNormally()) { if (this.level.tickRateManager().runsNormally()) {
@@ -539,7 +539,7 @@ index 779b7ec2f243f4a8868d78e7fe5b5c57446d60aa..c50e1dee1a32ea7a8fd412f98e944a0e
//this.level.timings.countNaturalMobs.startTiming(); // Paper - timings // Purpur //this.level.timings.countNaturalMobs.startTiming(); // Paper - timings // Purpur
int k = this.distanceManager.getNaturalSpawnChunkCount(); int k = this.distanceManager.getNaturalSpawnChunkCount();
// Paper start - Optional per player mob spawns // Paper start - Optional per player mob spawns
@@ -463,7 +463,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -464,7 +464,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
// this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings // Purpur // this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings // Purpur
this.lastSpawnState = spawnercreature_d; this.lastSpawnState = spawnercreature_d;
@@ -548,7 +548,7 @@ index 779b7ec2f243f4a8868d78e7fe5b5c57446d60aa..c50e1dee1a32ea7a8fd412f98e944a0e
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
Util.shuffle(list, this.level.random); Util.shuffle(list, this.level.random);
@@ -498,7 +498,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -504,7 +504,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
} }
//this.level.timings.chunkTicks.stopTiming(); // Paper // Purpur //this.level.timings.chunkTicks.stopTiming(); // Paper // Purpur
@@ -557,7 +557,7 @@ index 779b7ec2f243f4a8868d78e7fe5b5c57446d60aa..c50e1dee1a32ea7a8fd412f98e944a0e
if (flag) { if (flag) {
//try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings // Purpur //try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings // Purpur
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies); this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
@@ -506,14 +506,14 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -512,14 +512,14 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
} }
} }
@@ -575,7 +575,7 @@ index 779b7ec2f243f4a8868d78e7fe5b5c57446d60aa..c50e1dee1a32ea7a8fd412f98e944a0e
} }
} }
@@ -694,7 +694,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -700,7 +700,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@Override @Override
protected void doRunTask(Runnable task) { protected void doRunTask(Runnable task) {
@@ -585,10 +585,10 @@ index 779b7ec2f243f4a8868d78e7fe5b5c57446d60aa..c50e1dee1a32ea7a8fd412f98e944a0e
} }
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791d22f06fb 100644 index c2aaca3cdc77f14e1d19eb4ac8cbf10a3ae0b6d3..72f529cbe455377c2a2b4938693fa7858fc2ce9c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -644,16 +644,16 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -661,16 +661,16 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
} }
public void tick(BooleanSupplier shouldKeepTicking) { public void tick(BooleanSupplier shouldKeepTicking) {
@@ -608,7 +608,7 @@ index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791
this.advanceWeatherCycle(); this.advanceWeatherCycle();
} }
@@ -685,30 +685,30 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -702,30 +702,30 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
this.tickTime(); this.tickTime();
} }
@@ -646,7 +646,7 @@ index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791
if (flag) { if (flag) {
// this.timings.doSounds.startTiming(); // Spigot // Purpur // this.timings.doSounds.startTiming(); // Spigot // Purpur
this.runBlockEvents(); this.runBlockEvents();
@@ -716,7 +716,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -733,7 +733,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
} }
this.handlingTick = false; this.handlingTick = false;
@@ -655,7 +655,7 @@ index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791
boolean flag1 = !paperConfig().unsupportedSettings.disableWorldTickingWhenEmpty || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players // Paper - restore this boolean flag1 = !paperConfig().unsupportedSettings.disableWorldTickingWhenEmpty || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players // Paper - restore this
if (flag1) { if (flag1) {
@@ -724,12 +724,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -741,12 +741,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
} }
if (flag1 || this.emptyTime++ < 300) { if (flag1 || this.emptyTime++ < 300) {
@@ -671,7 +671,7 @@ index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791
} }
org.spigotmc.ActivationRange.activateEntities(this); // Spigot org.spigotmc.ActivationRange.activateEntities(this); // Spigot
@@ -739,9 +739,9 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -756,9 +756,9 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed
entity.discard(); entity.discard();
} else if (!tickratemanager.isEntityFrozen(entity)) { } else if (!tickratemanager.isEntityFrozen(entity)) {
@@ -683,7 +683,7 @@ index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791
if (true || this.chunkSource.chunkMap.getDistanceManager().inEntityTickingRange(entity.chunkPosition().toLong())) { // Paper - rewrite chunk system if (true || this.chunkSource.chunkMap.getDistanceManager().inEntityTickingRange(entity.chunkPosition().toLong())) { // Paper - rewrite chunk system
Entity entity1 = entity.getVehicle(); Entity entity1 = entity.getVehicle();
@@ -753,22 +753,22 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -770,22 +770,22 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
entity.stopRiding(); entity.stopRiding();
} }
@@ -711,7 +711,7 @@ index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791
} }
@Override @Override
@@ -844,9 +844,9 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -861,9 +861,9 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
boolean flag = this.isRaining(); boolean flag = this.isRaining();
int j = chunkcoordintpair.getMinBlockX(); int j = chunkcoordintpair.getMinBlockX();
int k = chunkcoordintpair.getMinBlockZ(); int k = chunkcoordintpair.getMinBlockZ();
@@ -723,7 +723,7 @@ index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791
if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - Option to disable thunder if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - Option to disable thunder
BlockPos blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15)); BlockPos blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
@@ -883,7 +883,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -900,7 +900,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
} }
} }
@@ -732,7 +732,7 @@ index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791
if (!this.paperConfig().environment.disableIceAndSnow) { // Paper - Option to disable ice and snow if (!this.paperConfig().environment.disableIceAndSnow) { // Paper - Option to disable ice and snow
for (int l = 0; l < randomTickSpeed; ++l) { for (int l = 0; l < randomTickSpeed; ++l) {
@@ -893,7 +893,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -910,7 +910,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
} }
} // Paper - Option to disable ice and snow } // Paper - Option to disable ice and snow
@@ -741,7 +741,7 @@ index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791
//timings.chunkTicksBlocks.startTiming(); // Paper // Purpur //timings.chunkTicksBlocks.startTiming(); // Paper // Purpur
if (randomTickSpeed > 0) { if (randomTickSpeed > 0) {
LevelChunkSection[] achunksection = chunk.getSections(); LevelChunkSection[] achunksection = chunk.getSections();
@@ -908,7 +908,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -925,7 +925,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
for (int l1 = 0; l1 < randomTickSpeed; ++l1) { for (int l1 = 0; l1 < randomTickSpeed; ++l1) {
BlockPos blockposition1 = this.getBlockRandomPos(j, k1, k, 15); BlockPos blockposition1 = this.getBlockRandomPos(j, k1, k, 15);
@@ -750,7 +750,7 @@ index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791
BlockState iblockdata = chunksection.getBlockState(blockposition1.getX() - j, blockposition1.getY() - k1, blockposition1.getZ() - k); BlockState iblockdata = chunksection.getBlockState(blockposition1.getX() - j, blockposition1.getY() - k1, blockposition1.getZ() - k);
if (iblockdata.isRandomlyTicking()) { if (iblockdata.isRandomlyTicking()) {
@@ -921,14 +921,14 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -938,14 +938,14 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
fluid.randomTick(this, blockposition1, this.random); fluid.randomTick(this, blockposition1, this.random);
} }
@@ -767,7 +767,7 @@ index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791
} }
@VisibleForTesting @VisibleForTesting
@@ -1245,19 +1245,19 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -1272,19 +1272,19 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
//try { // Purpur //try { // Purpur
// Paper end - timings // Paper end - timings
entity.setOldPosAndRot(); entity.setOldPosAndRot();
@@ -792,7 +792,7 @@ index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791
//} finally { timer.stopTiming(); } // Paper - timings // Purpur //} finally { timer.stopTiming(); } // Paper - timings // Purpur
Iterator iterator = entity.getPassengers().iterator(); Iterator iterator = entity.getPassengers().iterator();
@@ -1280,12 +1280,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -1307,12 +1307,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
// Paper end // Paper end
passenger.setOldPosAndRot(); passenger.setOldPosAndRot();
++passenger.tickCount; ++passenger.tickCount;
@@ -809,7 +809,7 @@ index 2c622aaa370bb8cf3b6d68bc6533abe318992d6a..fa652c9cea66b31c2452ed77cf251791
// Paper start - EAR 2 // Paper start - EAR 2
if (isActive) { if (isActive) {
passenger.rideTick(); passenger.rideTick();
@@ -1297,7 +1297,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -1324,7 +1324,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
vehicle.positionRider(passenger); vehicle.positionRider(passenger);
} }
// Paper end - EAR 2 // Paper end - EAR 2
@@ -1078,7 +1078,7 @@ index a715ecf4a8ac91d3e5e5c6269d89e54b2c1cd279..223c3665126c576eddb1a8f7c9f5bc60
}; };
} }
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 5c0157a5f54e9de21398ccb3421850b356d1751e..541fbd5b90cc6a2dd98733bc90602256d2ef59ed 100644 index ef24ef826ab825ce0a22ff3c5ad84d9494d63aef..8b234996acfcb9f22e32ce94984ae4afd7ad8142 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -859,7 +859,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -859,7 +859,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1806,7 +1806,7 @@ index bff83fe413c7baef4ba56a3270ea4463a58c792f..3ee7bf7e10f8120258baaae8f77cdcbb
if (this.fire) { if (this.fire) {
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index e353384abb69aa4cee6fb20277df874b40466ace..a5dab1252bec8f0ba5e40313e329731c559945f3 100644 index 1b85d31a81404ea817c892ac0bd055058fe8f079..9b7831f326e6cf8f84e5c420749b43cd7edcfd87 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -268,7 +268,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -268,7 +268,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@@ -1827,7 +1827,7 @@ index e353384abb69aa4cee6fb20277df874b40466ace..a5dab1252bec8f0ba5e40313e329731c
final List<Entity> ret = new java.util.ArrayList<>(); final List<Entity> ret = new java.util.ArrayList<>();
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel)this).moonrise$getEntityLookup().getHardCollidingEntities(entity, box, ret, predicate); ((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel)this).moonrise$getEntityLookup().getHardCollidingEntities(entity, box, ret, predicate);
@@ -982,9 +982,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -987,9 +987,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
} }
protected void tickBlockEntities() { protected void tickBlockEntities() {
@@ -1839,7 +1839,7 @@ index e353384abb69aa4cee6fb20277df874b40466ace..a5dab1252bec8f0ba5e40313e329731c
//this.timings.tileEntityPending.startTiming(); // Spigot // Purpur //this.timings.tileEntityPending.startTiming(); // Spigot // Purpur
this.tickingBlockEntities = true; this.tickingBlockEntities = true;
if (!this.pendingBlockEntityTickers.isEmpty()) { if (!this.pendingBlockEntityTickers.isEmpty()) {
@@ -1020,7 +1020,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -1030,7 +1030,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
//this.timings.tileEntityTick.stopTiming(); // Spigot // Purpur //this.timings.tileEntityTick.stopTiming(); // Spigot // Purpur
this.tickingBlockEntities = false; this.tickingBlockEntities = false;
co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper
@@ -1848,7 +1848,7 @@ index e353384abb69aa4cee6fb20277df874b40466ace..a5dab1252bec8f0ba5e40313e329731c
this.spigotConfig.currentPrimedTnt = 0; // Spigot this.spigotConfig.currentPrimedTnt = 0; // Spigot
} }
@@ -1224,7 +1224,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -1235,7 +1235,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@Override @Override
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) { public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
@@ -1857,7 +1857,7 @@ index e353384abb69aa4cee6fb20277df874b40466ace..a5dab1252bec8f0ba5e40313e329731c
// Paper start - rewrite chunk system // Paper start - rewrite chunk system
final List<Entity> ret = new java.util.ArrayList<>(); final List<Entity> ret = new java.util.ArrayList<>();
@@ -1250,7 +1250,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -1261,7 +1261,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
public <T extends Entity> void getEntities(final EntityTypeTest<Entity, T> entityTypeTest, public <T extends Entity> void getEntities(final EntityTypeTest<Entity, T> entityTypeTest,
final AABB boundingBox, final Predicate<? super T> predicate, final AABB boundingBox, final Predicate<? super T> predicate,
final List<? super T> into, final int maxCount) { final List<? super T> into, final int maxCount) {
@@ -1866,7 +1866,7 @@ index e353384abb69aa4cee6fb20277df874b40466ace..a5dab1252bec8f0ba5e40313e329731c
if (entityTypeTest instanceof net.minecraft.world.entity.EntityType<T> byType) { if (entityTypeTest instanceof net.minecraft.world.entity.EntityType<T> byType) {
if (maxCount != Integer.MAX_VALUE) { if (maxCount != Integer.MAX_VALUE) {
@@ -1545,6 +1545,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -1556,6 +1556,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
} }
public ProfilerFiller getProfiler() { public ProfilerFiller getProfiler() {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] config for startup commands
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f00825d506242bc3ab3aef6b48cb87073f8af682..6dbea75748021ecc950888213a431ab2495c4a18 100644 index 6791cdae222c0156df8defbec78a221ff90945e4..e6a23507b69a128aabf4f811d6099281b24583fd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1205,6 +1205,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1267,6 +1267,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
// Paper end - Add onboarding message for initial server start // Paper end - Add onboarding message for initial server start
@@ -26,7 +26,7 @@ index f00825d506242bc3ab3aef6b48cb87073f8af682..6dbea75748021ecc950888213a431ab2
long i; long i;
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 7e1ffdf66be384e68c2ab005a1b439609e4a1a13..10f15a76e9443db84d2443dfe5cf9856e0472630 100644 index 59d919908f8f12e74f811cf6c6f2e7e59e45361f..3ca1cf6f2adb026264b5fd477e03a78e2c8446e6 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -581,4 +581,16 @@ public class PurpurConfig { @@ -581,4 +581,16 @@ public class PurpurConfig {

View File

@@ -1,19 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: granny <granny@purpurmc.org>
Date: Mon, 1 Jul 2024 00:16:57 -0700
Subject: [PATCH] fix summon_entity effect attempting to add incorrect entity
diff --git a/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java b/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
index d927357d541cf206bb3019b2fda3473a77b44ec4..e40c96a6f50ad7438116a1e6454b2bf45f042233 100644
--- a/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
+++ b/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
@@ -54,7 +54,7 @@ public record SummonEntityEffect(HolderSet<EntityType<?>> entityTypes, boolean j
// CraftBukkit start
world.strikeLightning(entity1, (context.itemStack().getItem() == Items.TRIDENT) ? LightningStrikeEvent.Cause.TRIDENT : LightningStrikeEvent.Cause.ENCHANTMENT);
} else {
- world.addFreshEntityWithPassengers(user, CreatureSpawnEvent.SpawnReason.ENCHANTMENT);
+ world.addFreshEntityWithPassengers(entity1, CreatureSpawnEvent.SpawnReason.ENCHANTMENT); // Purpur
// CraftBukkit end
}