diff --git a/build-data/paper.at b/build-data/paper.at index 51c7de20a..5f1aa5b28 100644 --- a/build-data/paper.at +++ b/build-data/paper.at @@ -252,3 +252,6 @@ public net.minecraft.world.entity.monster.Zombie supportsBreakDoorGoal()Z # Add Material#hasCollision public net.minecraft.world.level.block.state.BlockBehaviour hasCollision + +# add per world spawn limits +public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES diff --git a/patches/server/0004-Paper-config-files.patch b/patches/server/0004-Paper-config-files.patch index f755f4f09..80a1e546f 100644 --- a/patches/server/0004-Paper-config-files.patch +++ b/patches/server/0004-Paper-config-files.patch @@ -298,10 +298,10 @@ index 0000000000000000000000000000000000000000..bee2fa2bfbb61209381f24ed6508d3d1 +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..24c6f957aaf1f4064718b05d4e5f5759853c6f00 +index 0000000000000000000000000000000000000000..e4368db074da7b5e48b47d41875c1e63b9745c2a --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -0,0 +1,185 @@ +@@ -0,0 +1,188 @@ +package com.destroystokyo.paper; + +import com.google.common.base.Throwables; @@ -364,8 +364,8 @@ index 0000000000000000000000000000000000000000..24c6f957aaf1f4064718b05d4e5f5759 + commands = new HashMap(); + commands.put("paper", new PaperCommand("paper")); + -+ version = getInt("config-version", 23); -+ set("config-version", 23); ++ version = getInt("config-version", 24); ++ set("config-version", 24); + readConfig(PaperConfig.class, null); + } + @@ -405,7 +405,10 @@ index 0000000000000000000000000000000000000000..24c6f957aaf1f4064718b05d4e5f5759 + } + } + } ++ saveConfig(); ++ } + ++ static void saveConfig() { + try { + config.save(CONFIG_FILE); + } catch (IOException ex) { @@ -489,10 +492,10 @@ index 0000000000000000000000000000000000000000..24c6f957aaf1f4064718b05d4e5f5759 +} diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..0f80a0d930bff8c19440ee33a4c8d56d17495b5f +index 0000000000000000000000000000000000000000..6cb3a37612240d4150d7c62628f4b7440c822d48 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -0,0 +1,73 @@ +@@ -0,0 +1,88 @@ +package com.destroystokyo.paper; + +import java.util.List; @@ -503,6 +506,7 @@ index 0000000000000000000000000000000000000000..0f80a0d930bff8c19440ee33a4c8d56d + +import static com.destroystokyo.paper.PaperConfig.log; +import static com.destroystokyo.paper.PaperConfig.logError; ++import static com.destroystokyo.paper.PaperConfig.saveConfig; + +public class PaperWorldConfig { + @@ -531,6 +535,14 @@ index 0000000000000000000000000000000000000000..0f80a0d930bff8c19440ee33a4c8d56d + } + } + ++ public void removeOldValues() { ++ boolean needsSave = false; ++ ++ if (needsSave) { ++ saveConfig(); ++ } ++ } ++ + private boolean getBoolean(String path, boolean def) { + config.addDefault("world-settings.default." + path, def); + return config.getBoolean("world-settings." + worldName + "." + path, config.getBoolean("world-settings.default." + path)); @@ -542,8 +554,14 @@ index 0000000000000000000000000000000000000000..0f80a0d930bff8c19440ee33a4c8d56d + } + + private int getInt(String path, int def) { -+ config.addDefault("world-settings.default." + path, def); -+ return config.getInt("world-settings." + worldName + "." + path, config.getInt("world-settings.default." + path)); ++ return getInt(path, def, true); ++ } ++ ++ private int getInt(String path, int def, boolean setDefault) { ++ if (setDefault) { ++ config.addDefault("world-settings.default." + path, def); ++ } ++ return config.getInt("world-settings." + worldName + "." + path, config.getInt("world-settings.default." + path, def)); + } + + private long getLong(String path, long def) { @@ -567,7 +585,7 @@ index 0000000000000000000000000000000000000000..0f80a0d930bff8c19440ee33a4c8d56d + } +} diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index 1707449cbbfa5eab585657cdde811b34a92e1d17..c8385460701395cb5c65fba41335469ffb2d9b9a 100644 +index 21c0fe42af0239cf8d857fa9fddae8a5974930e2..39ca32e006a36991b9d948c709c1b9ce03bca018 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java @@ -101,6 +101,12 @@ public class Main { @@ -604,6 +622,18 @@ index 1707449cbbfa5eab585657cdde811b34a92e1d17..c8385460701395cb5c65fba41335469f public static void forceUpgrade(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, boolean eraseCache, BooleanSupplier booleansupplier, ImmutableSet> worlds) { // CraftBukkit Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, worlds, eraseCache); +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index 2f393503204cf219c60dbae868172a29a0d23d5f..9f3d7089d066bda13af8b4b714a0ebd0c3403e4f 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -609,6 +609,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); -@@ -964,6 +965,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop implements SnooperPopulator, CommandSource, AutoCloseable { -@@ -911,6 +911,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= 5000000000L) { -@@ -1233,14 +1254,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit @@ -861,7 +861,7 @@ index 54cd91eab5c3a6c4919844245e5bbce6b27ce687..7a553e63fb19a08a56c6342f23c515a6 } this.profiler.push("snooper"); -@@ -1254,6 +1273,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop softDespawnDistances = new Reference2IntOpenHashMap<>(MobCategory.values().length); ++ public final Reference2IntMap hardDespawnDistances = new Reference2IntOpenHashMap<>(MobCategory.values().length); + private void despawnDistances() { -+ softDespawnDistance = getInt("despawn-ranges.soft", 32); // 32^2 = 1024, Minecraft Default -+ hardDespawnDistance = getInt("despawn-ranges.hard", 128); // 128^2 = 16384, Minecraft Default -+ -+ if (softDespawnDistance > hardDespawnDistance) { -+ softDespawnDistance = hardDespawnDistance; ++ if (PaperConfig.version < 24) { ++ int softDistance = getInt("despawn-ranges.soft", 32, false); // 32^2 = 1024, Minecraft Default ++ int hardDistance = getInt("despawn-ranges.hard", 128, false); // 128^2 = 16384, Minecraft Default ++ for (MobCategory value : MobCategory.values()) { ++ if (softDistance != 32) { ++ softDespawnDistances.put(value, softDistance); ++ } ++ if (hardDistance != 128) { ++ hardDespawnDistances.put(value, hardDistance); ++ } ++ } ++ } ++ for (MobCategory category : MobCategory.values()) { ++ int softDistance = getInt("despawn-ranges." + category.getName() + ".soft", softDespawnDistances.getOrDefault(category, category.getNoDespawnDistance())); ++ int hardDistance = getInt("despawn-ranges." + category.getName() + ".hard", hardDespawnDistances.getOrDefault(category, category.getDespawnDistance())); ++ if (softDistance > hardDistance) { ++ softDistance = hardDistance; ++ } ++ log("Mobs in " + category.getName() + " Despawn Ranges: Soft" + softDistance + " Hard: " + hardDistance); ++ softDespawnDistances.put(category, softDistance); ++ hardDespawnDistances.put(category, hardDistance); + } -+ -+ log("Living Entity Despawn Ranges: Soft: " + softDespawnDistance + " Hard: " + hardDespawnDistance); -+ -+ softDespawnDistance = softDespawnDistance*softDespawnDistance; -+ hardDespawnDistance = hardDespawnDistance*hardDespawnDistance; + } } diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index abaa57d9a4d222753d28801c6ab86b11c71aca6b..c9a9a4c6ba930dedb227c1f1d4ca4bb520983854 100644 +index abaa57d9a4d222753d28801c6ab86b11c71aca6b..867ada6ba562d9d3db6bf97cb3fd2c5a281f915f 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -778,16 +778,16 @@ public abstract class Mob extends LivingEntity { - int i = this.getType().getCategory().getDespawnDistance(); +@@ -775,14 +775,14 @@ public abstract class Mob extends LivingEntity { + + if (entityhuman != null) { + double d0 = entityhuman.distanceToSqr((Entity) this); // CraftBukkit - decompile error +- int i = this.getType().getCategory().getDespawnDistance(); ++ int i = this.level.paperConfig.hardDespawnDistances.getInt(this.getType().getCategory()); // Paper - custom despawn distances int j = i * i; -- if (d0 > (double) j) { // CraftBukkit - remove isTypeNotPersistent() check -+ if (d0 > (double) level.paperConfig.hardDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances + if (d0 > (double) j) { // CraftBukkit - remove isTypeNotPersistent() check this.discard(); } - int k = this.getType().getCategory().getNoDespawnDistance(); +- int k = this.getType().getCategory().getNoDespawnDistance(); ++ int k = this.level.paperConfig.softDespawnDistances.getInt(this.getType().getCategory()); // Paper - custom despawn distances int l = k * k; -- if (this.noActionTime > 600 && this.random.nextInt(800) == 0 && d0 > (double) l) { // CraftBukkit - remove isTypeNotPersistent() check -+ if (this.noActionTime > 600 && this.random.nextInt(800) == 0 && d0 > level.paperConfig.softDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances - this.discard(); -- } else if (d0 < (double) l) { -+ } else if (d0 < level.paperConfig.softDespawnDistance) { // Paper - custom despawn distances - this.noActionTime = 0; - } - } + if (this.noActionTime > 600 && this.random.nextInt(800) == 0 && d0 > (double) l) { // CraftBukkit - remove isTypeNotPersistent() check diff --git a/patches/server/0017-Allow-for-toggling-of-spawn-chunks.patch b/patches/server/0017-Allow-for-toggling-of-spawn-chunks.patch index 20314ce8d..597d0ad05 100644 --- a/patches/server/0017-Allow-for-toggling-of-spawn-chunks.patch +++ b/patches/server/0017-Allow-for-toggling-of-spawn-chunks.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Allow for toggling of spawn chunks diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4634da27cde654e682ac4525df9850ea40afbb87..9eb44bd14a5fd351d1514f4de8bc7ba328b0253d 100644 +index 6d1a880737c90da743fd772426b4050036bdb926..8521772cf6cf9716093495cb8c41dfb7a649e741 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -123,4 +123,10 @@ public class PaperWorldConfig { - softDespawnDistance = softDespawnDistance*softDespawnDistance; - hardDespawnDistance = hardDespawnDistance*hardDespawnDistance; +@@ -159,4 +159,10 @@ public class PaperWorldConfig { + hardDespawnDistances.put(category, hardDistance); + } } + + public boolean keepSpawnInMemory; diff --git a/patches/server/0018-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/patches/server/0018-Drop-falling-block-and-tnt-entities-at-the-specified.patch index 7608f09e0..f311dfff3 100644 --- a/patches/server/0018-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/patches/server/0018-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Drop falling block and tnt entities at the specified height * Dec 2, 2020 Added tnt nerf for tnt minecarts - Machine_Maker diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9eb44bd14a5fd351d1514f4de8bc7ba328b0253d..128b7cb5ed01f31555b169a6132a39fe4bfb90c7 100644 +index 8521772cf6cf9716093495cb8c41dfb7a649e741..1cfa6ae0a2fc42cd83c1323d49151ec2bbbacf83 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -129,4 +129,14 @@ public class PaperWorldConfig { +@@ -165,4 +165,14 @@ public class PaperWorldConfig { keepSpawnInMemory = getBoolean("keep-spawn-loaded", true); log("Keep spawn chunk loaded: " + keepSpawnInMemory); } diff --git a/patches/server/0019-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/patches/server/0019-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 20fa742fc..423e9cb4e 100644 --- a/patches/server/0019-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/patches/server/0019-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -19,10 +19,10 @@ index 2c53a400611c78236c5a1c1270d27c02e94251bf..a1d5c0f8fe2adb2ee56f3217e089211e if (outputStream != null) { try { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5de0b15ee206ad01b1b4522b2d375fae08d2486f..daad04711adcaac9dc3868f20f7dc3c4a09fbac8 100644 +index e6afb76adc428dc1e919a1255a43b8d96aefd79b..e6be4991f07a9cd59946d501c002fd9113b46af0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1443,7 +1443,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { return worldserver + " " + worldserver.dimension().location(); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 5df7fe061fdfd7f1455cf283973be471d878ffb2..c2dc2ec29949074e71d0b4e5244ec71587f01178 100644 +index 75fa3f2392936d86d29fee73079507c642660b30..525cf19c9ecc5886720d0505f0554b667ef3267f 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -198,6 +198,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0073-Configurable-Chunk-Inhabited-Time.patch b/patches/server/0073-Configurable-Chunk-Inhabited-Time.patch index faf4293d0..2c00f8faf 100644 --- a/patches/server/0073-Configurable-Chunk-Inhabited-Time.patch +++ b/patches/server/0073-Configurable-Chunk-Inhabited-Time.patch @@ -11,10 +11,10 @@ For people who want all chunks to be treated equally, you can chose a fixed valu This allows to fine-tune vanilla gameplay. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index eae8a876b05c17d87b3971f8f2568ae5379feddb..8ccdae60f97c38f7a56b68e94a801c7ee3fa9079 100644 +index 7addb5c66c88da73a4d80da1e898d629d76074f0..a0688ef7eb38e7c156193db3d94c44a3c290d8f2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -243,4 +243,14 @@ public class PaperWorldConfig { +@@ -279,4 +279,14 @@ public class PaperWorldConfig { skeleHorseSpawnChance = 0.01D; // Vanilla value } } diff --git a/patches/server/0075-Sanitise-RegionFileCache-and-make-configurable.patch b/patches/server/0075-Sanitise-RegionFileCache-and-make-configurable.patch index 8e1d6117a..28d810a73 100644 --- a/patches/server/0075-Sanitise-RegionFileCache-and-make-configurable.patch +++ b/patches/server/0075-Sanitise-RegionFileCache-and-make-configurable.patch @@ -11,10 +11,10 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap). The maximum size of the RegionFileCache is also made configurable. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index acdbd21947093ed076c4668d3480a50f4e289b8d..a3a4ecabed1ec7511005affe610fc2ec8a87d67a 100644 +index 817d4572c9991992b720b3ba163188ac0e5b59b7..01da2246c70237676597b3e70e3e169ab1132071 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -236,4 +236,9 @@ public class PaperConfig { +@@ -239,4 +239,9 @@ public class PaperConfig { private static void loadPermsBeforePlugins() { loadPermsBeforePlugins = getBoolean("settings.load-permissions-yml-before-plugins", true); } diff --git a/patches/server/0079-Configurable-Grass-Spread-Tick-Rate.patch b/patches/server/0079-Configurable-Grass-Spread-Tick-Rate.patch index 509a1c4e4..23fe5593a 100644 --- a/patches/server/0079-Configurable-Grass-Spread-Tick-Rate.patch +++ b/patches/server/0079-Configurable-Grass-Spread-Tick-Rate.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable Grass Spread Tick Rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 8ccdae60f97c38f7a56b68e94a801c7ee3fa9079..2c3754c0bcebc33f88168136b519baef6927553b 100644 +index a0688ef7eb38e7c156193db3d94c44a3c290d8f2..53692c9a72a75cb5280165a99c95667928eec753 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -253,4 +253,10 @@ public class PaperWorldConfig { +@@ -289,4 +289,10 @@ public class PaperWorldConfig { } fixedInhabitedTime = getInt("fixed-chunk-inhabited-time", -1); } diff --git a/patches/server/0082-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/patches/server/0082-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index 6abe6e6d2..b1735679d 100644 --- a/patches/server/0082-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/patches/server/0082-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -12,10 +12,10 @@ for this on CB at one point but I can't find it. We may need to do this ourselves at some point in the future. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 2c3754c0bcebc33f88168136b519baef6927553b..d9590dbc3db4ec4d32d86906bb290fbe2ca81ccd 100644 +index 53692c9a72a75cb5280165a99c95667928eec753..91d9717c88d7a413a71cc0897402dac0013fea4d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -259,4 +259,9 @@ public class PaperWorldConfig { +@@ -295,4 +295,9 @@ public class PaperWorldConfig { grassUpdateRate = Math.max(0, getInt("grass-spread-tick-rate", grassUpdateRate)); log("Grass Spread Tick Rate: " + grassUpdateRate); } diff --git a/patches/server/0084-Configurable-Player-Collision.patch b/patches/server/0084-Configurable-Player-Collision.patch index 02c9e20bb..cdb330706 100644 --- a/patches/server/0084-Configurable-Player-Collision.patch +++ b/patches/server/0084-Configurable-Player-Collision.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/j index ad73dbb8e7112e2843c4104d367c98bf8b2b3370..f54096daee8c51a887b943ddd257ac2eae63952e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -241,4 +241,9 @@ public class PaperConfig { +@@ -244,4 +244,9 @@ public class PaperConfig { private static void regionFileCacheSize() { regionFileCacheSize = Math.max(getInt("settings.region-file-cache-size", 256), 4); } @@ -32,7 +32,7 @@ index 8885220e4813b34627b42523834bbec995d8950d..4c9660176e783999301565790b8cf6f4 buf.writeComponent(this.playerPrefix); buf.writeComponent(this.playerSuffix); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 46eaa77f33a375da80f8290883f6ed1f321be87e..ec73f52f7a82a9c1428979c562a9df5002261cd4 100644 +index d6195f7b0bac1bd1ababe8c4eec07654c323c014..4e7016c20a72271ff62fb676280d3880864919f1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -161,6 +161,7 @@ import net.minecraft.world.level.storage.loot.LootTables; @@ -43,7 +43,7 @@ index 46eaa77f33a375da80f8290883f6ed1f321be87e..ec73f52f7a82a9c1428979c562a9df50 import org.apache.commons.lang3.Validate; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -615,6 +616,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { -@@ -2258,7 +2260,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= 5000000000L) { this.lastServerStatus = i; this.status.setPlayers(new ServerStatus.Players(this.getMaxPlayers(), this.getPlayerCount())); diff --git a/patches/server/0188-Upstream-config-migrations.patch b/patches/server/0188-Upstream-config-migrations.patch index 0c85e12c0..973d563d1 100644 --- a/patches/server/0188-Upstream-config-migrations.patch +++ b/patches/server/0188-Upstream-config-migrations.patch @@ -7,10 +7,10 @@ This patch contains config migrations for when upstream adds options which Paper already had. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 5bb6f09d138f981329378edab707f8275cdfc5a0..3d5fd6be97bef7ec47893a85cae771f4a4451092 100644 +index f4735cc330822183e098a67f2c0f00f21db9e137..c5c82496524705a0ce85df5508ec730c19246ec7 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -288,4 +288,22 @@ public class PaperConfig { +@@ -291,4 +291,22 @@ public class PaperConfig { private static void authenticationServersDownKickMessage() { authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage)); } diff --git a/patches/server/0193-Configurable-sprint-interruption-on-attack.patch b/patches/server/0193-Configurable-sprint-interruption-on-attack.patch index c2d1d863e..a701f0e7e 100644 --- a/patches/server/0193-Configurable-sprint-interruption-on-attack.patch +++ b/patches/server/0193-Configurable-sprint-interruption-on-attack.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable sprint interruption on attack If the sprint interruption is disabled players continue sprinting when they attack entities. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0f1252ae47df5568b6844e76dceb3e8e4c8394c8..f3ce248c576643ec172ba42c4bea41a59cfe9ec6 100644 +index 0e08f6e566d1c93cc89a179583d0b0939127de8b..4e0f61179e3b2ae91811746d32b24998173a922c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -357,4 +357,9 @@ public class PaperWorldConfig { +@@ -393,4 +393,9 @@ public class PaperWorldConfig { private void squidMaxSpawnHeight() { squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D); } diff --git a/patches/server/0197-Block-Enderpearl-Travel-Exploit.patch b/patches/server/0197-Block-Enderpearl-Travel-Exploit.patch index 42b2d12bf..527e4cefc 100644 --- a/patches/server/0197-Block-Enderpearl-Travel-Exploit.patch +++ b/patches/server/0197-Block-Enderpearl-Travel-Exploit.patch @@ -12,10 +12,10 @@ This disables that by not saving the thrower when the chunk is unloaded. This is mainly useful for survival servers that do not allow freeform teleporting. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f3ce248c576643ec172ba42c4bea41a59cfe9ec6..10f7437d62bfa774309d6334ca791505254bcaf7 100644 +index 4e0f61179e3b2ae91811746d32b24998173a922c..a0937dd52e4a2aa1bfadcbd1ac0dc2cb26d59cf0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -362,4 +362,10 @@ public class PaperWorldConfig { +@@ -398,4 +398,10 @@ public class PaperWorldConfig { private void disableSprintInterruptionOnAttack() { disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); } diff --git a/patches/server/0209-Configurable-Alternative-LootPool-Luck-Formula.patch b/patches/server/0209-Configurable-Alternative-LootPool-Luck-Formula.patch index a97a39273..715883047 100644 --- a/patches/server/0209-Configurable-Alternative-LootPool-Luck-Formula.patch +++ b/patches/server/0209-Configurable-Alternative-LootPool-Luck-Formula.patch @@ -36,10 +36,10 @@ This change will result in some major changes to fishing formulas. I would love to see this change in Vanilla, so Mojang please pull :) diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 3d5fd6be97bef7ec47893a85cae771f4a4451092..ce4ab03a40fac6a840f4c4b78da0a96bb6fb6823 100644 +index c5c82496524705a0ce85df5508ec730c19246ec7..8ecd1e851cc2168c538947623e1c328e463b52d9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -306,4 +306,12 @@ public class PaperConfig { +@@ -309,4 +309,12 @@ public class PaperConfig { SpigotConfig.save(); } } diff --git a/patches/server/0211-Make-shield-blocking-delay-configurable.patch b/patches/server/0211-Make-shield-blocking-delay-configurable.patch index 8b200d777..eafea9909 100644 --- a/patches/server/0211-Make-shield-blocking-delay-configurable.patch +++ b/patches/server/0211-Make-shield-blocking-delay-configurable.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 10f7437d62bfa774309d6334ca791505254bcaf7..6d2d82c24c9f43fab2cddee03960325c15708a58 100644 +index a0937dd52e4a2aa1bfadcbd1ac0dc2cb26d59cf0..4dce401da0e0fdf985ecb90f37b92e16cf210d25 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -368,4 +368,9 @@ public class PaperWorldConfig { +@@ -404,4 +404,9 @@ public class PaperWorldConfig { disableEnderpearlExploit = getBoolean("game-mechanics.disable-unloaded-chunk-enderpearl-exploit", disableEnderpearlExploit); log("Disable Unloaded Chunk Enderpearl Exploit: " + (disableEnderpearlExploit ? "enabled" : "disabled")); } diff --git a/patches/server/0218-Add-config-to-disable-ender-dragon-legacy-check.patch b/patches/server/0218-Add-config-to-disable-ender-dragon-legacy-check.patch index 81ae2b4a5..a4a727ed1 100644 --- a/patches/server/0218-Add-config-to-disable-ender-dragon-legacy-check.patch +++ b/patches/server/0218-Add-config-to-disable-ender-dragon-legacy-check.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add config to disable ender dragon legacy check diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 6d2d82c24c9f43fab2cddee03960325c15708a58..cd2bf3596e2d1cb5bbffa727976a9bee9319dcf5 100644 +index 4dce401da0e0fdf985ecb90f37b92e16cf210d25..35c6978eaf25ed505f99e42a58d388c62fde8319 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -373,4 +373,9 @@ public class PaperWorldConfig { +@@ -409,4 +409,9 @@ public class PaperWorldConfig { private void shieldBlockingDelay() { shieldBlockingDelay = getInt("game-mechanics.shield-blocking-delay", 5); } diff --git a/patches/server/0232-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/patches/server/0232-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 19605265f..3b7dbf2c4 100644 --- a/patches/server/0232-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/patches/server/0232-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Option to prevent armor stands from doing entity lookups diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index cd2bf3596e2d1cb5bbffa727976a9bee9319dcf5..0edbd0bf3d7d71b73bcf5cb9da233e8dcfca346f 100644 +index 35c6978eaf25ed505f99e42a58d388c62fde8319..0fd29d5854d9d6155ea590f86d4492d86afab433 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -378,4 +378,9 @@ public class PaperWorldConfig { +@@ -414,4 +414,9 @@ public class PaperWorldConfig { private void scanForLegacyEnderDragon() { scanForLegacyEnderDragon = getBoolean("game-mechanics.scan-for-legacy-ender-dragon", true); } diff --git a/patches/server/0234-Allow-disabling-armour-stand-ticking.patch b/patches/server/0234-Allow-disabling-armour-stand-ticking.patch index 3b245c527..0c5a3b814 100644 --- a/patches/server/0234-Allow-disabling-armour-stand-ticking.patch +++ b/patches/server/0234-Allow-disabling-armour-stand-ticking.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow disabling armour stand ticking diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0edbd0bf3d7d71b73bcf5cb9da233e8dcfca346f..3c7af3c4dc864c1143451350861e64093a2f5a06 100644 +index 0fd29d5854d9d6155ea590f86d4492d86afab433..ff6cf94dec708c6d3cac837ca03be2fe12d5e05f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -383,4 +383,10 @@ public class PaperWorldConfig { +@@ -419,4 +419,10 @@ public class PaperWorldConfig { private void armorStandEntityLookups() { armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true); } diff --git a/patches/server/0241-Break-up-and-make-tab-spam-limits-configurable.patch b/patches/server/0241-Break-up-and-make-tab-spam-limits-configurable.patch index 6fb0983f7..1eda770e7 100644 --- a/patches/server/0241-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/patches/server/0241-Break-up-and-make-tab-spam-limits-configurable.patch @@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on plugins doing unsafe things. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index ce4ab03a40fac6a840f4c4b78da0a96bb6fb6823..a6d27dcdf954bc2682aba1d9efab42d2d626f8da 100644 +index 8ecd1e851cc2168c538947623e1c328e463b52d9..1508afe593a1b62e3a33455707e2552468786614 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -314,4 +314,18 @@ public class PaperConfig { +@@ -317,4 +317,18 @@ public class PaperConfig { Bukkit.getLogger().log(Level.INFO, "Using Aikar's Alternative Luck Formula to apply Luck attribute to all loot pool calculations. See https://luckformula.emc.gs"); } } diff --git a/patches/server/0245-Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/0245-Add-Early-Warning-Feature-to-WatchDog.patch index 6d44129f2..89e9f3490 100644 --- a/patches/server/0245-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/patches/server/0245-Add-Early-Warning-Feature-to-WatchDog.patch @@ -9,7 +9,7 @@ thread dumps at an interval until the point of crash. This will help diagnose what was going on in that time before the crash. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index a6d27dcdf954bc2682aba1d9efab42d2d626f8da..dd81701230133442186524e9cd65d70232b824f3 100644 +index 1508afe593a1b62e3a33455707e2552468786614..73b49d24cd428e2328d56f5f42333a25a1d6ebae 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -25,6 +25,7 @@ import org.bukkit.configuration.file.YamlConfiguration; @@ -20,7 +20,7 @@ index a6d27dcdf954bc2682aba1d9efab42d2d626f8da..dd81701230133442186524e9cd65d702 public class PaperConfig { -@@ -315,6 +316,14 @@ public class PaperConfig { +@@ -318,6 +319,14 @@ public class PaperConfig { } } @@ -36,10 +36,10 @@ index a6d27dcdf954bc2682aba1d9efab42d2d626f8da..dd81701230133442186524e9cd65d702 public static int tabSpamLimit = 500; private static void tabSpamLimiters() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1bffdc632a19318325b60ef737f9e8555ae40230..7b760a65cad1f7dd5adb3a05b8b5ed7d0f49c0a9 100644 +index d9fab29a066367a5cf4a3486989fa7f35451801e..13f94e196ffd9f37e8049a4a76bc83389ff58d84 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1100,6 +1100,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper diff --git a/patches/server/0365-Increase-Light-Queue-Size.patch b/patches/server/0365-Increase-Light-Queue-Size.patch index ca2acc93e..126f4f6a3 100644 --- a/patches/server/0365-Increase-Light-Queue-Size.patch +++ b/patches/server/0365-Increase-Light-Queue-Size.patch @@ -14,10 +14,10 @@ light engine on shutdown... The queue size only puts a cap on max loss, doesn't solve that problem. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index d01f5df4ec18a35fbf6222d76a2617a07f20a87b..27de7cdc4f3bb5604162f2cc114fcd27a6ed4a14 100644 +index 0705e04b395938fc7ef7b759813d979de3a899f4..5707befe1c64df3e01fe810459d716d550b7daa8 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -484,5 +484,10 @@ public class PaperWorldConfig { +@@ -520,5 +520,10 @@ public class PaperWorldConfig { disableHopperMoveEvents = getBoolean("hopper.disable-move-event", disableHopperMoveEvents); log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); } @@ -29,10 +29,10 @@ index d01f5df4ec18a35fbf6222d76a2617a07f20a87b..27de7cdc4f3bb5604162f2cc114fcd27 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8284c8690295cf9e57c47f198058c3e4ad39191b..026397cbedd2d1cd08ec8a82a3468f35cd8e4765 100644 +index bf08c45525cd898ad12d70bec5de3762063af2e0..28066e92531d2d8834686f075169007e25caa73d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -844,7 +844,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> getOrScheduleFuture(ChunkStatus targetStatus, ChunkMap chunkStorage) { diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 85a3ccce473604561b5550b2b2b1f4aa02a04415..72471db48a9c67ced8b1ef1ebb3381be4f773e06 100644 +index 5bbdf56179d2e5fd0b42c37c84c9d4bc5faaee24..f6ff29613d09b82185c2b2132d1ed34b0f71c222 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -169,21 +169,68 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -502,7 +502,7 @@ index 45c7ebe67019cdbe88b6617a95d5c40d3a68286c..38eebda226e007c8910e04f502ce218c if (withinViewDistance) { DistanceManager.this.ticketThrottlerInput.tell(ChunkTaskPriorityQueueSorter.message(() -> { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 363d86e4a35b87c3fabf7a0e4b6d9e6c2caaf3de..188b549fc56e1394c7119da99e4732065b256388 100644 +index e8cfc0856c33dab2d94bfebd0cc70823a2a4b69c..97d6963b6c7f0fb71324ac760df940fbf03e321f 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -242,6 +242,7 @@ public class ServerPlayer extends Player { diff --git a/patches/server/0369-Implement-alternative-item-despawn-rate.patch b/patches/server/0369-Implement-alternative-item-despawn-rate.patch index dd0e3eecd..75966b0de 100644 --- a/patches/server/0369-Implement-alternative-item-despawn-rate.patch +++ b/patches/server/0369-Implement-alternative-item-despawn-rate.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement alternative item-despawn-rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f3ba9d869179fb4dc86acf1f4d097fb0da701a09..c2601c8d0635e4150be622fc681c2f4adb55bc59 100644 +index 9d1f14274af2f9af4de9e914f7c4ed10b11d3782..bfcfe431548bf36d50b9bf12957fed59ed9c6984 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -497,6 +497,54 @@ public class PaperWorldConfig { +@@ -533,6 +533,54 @@ public class PaperWorldConfig { this.noTickViewDistance = this.getInt("viewdistances.no-tick-view-distance", -1); } diff --git a/patches/server/0372-implement-optional-per-player-mob-spawns.patch b/patches/server/0372-implement-optional-per-player-mob-spawns.patch index c97fc0ae4..786dc7b2b 100644 --- a/patches/server/0372-implement-optional-per-player-mob-spawns.patch +++ b/patches/server/0372-implement-optional-per-player-mob-spawns.patch @@ -25,10 +25,10 @@ index fe79c0add4f7cb18d487c5bb9415c40c5b551ea2..8d9ddad1879e7616d980ca70de8aecac poiUnload = Timings.ofSafe(name + "Chunk unload - POI"); chunkUnload = Timings.ofSafe(name + "Chunk unload - Chunk"); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index c2601c8d0635e4150be622fc681c2f4adb55bc59..9dfb35654df01cf8fea6cf1842786f8466419729 100644 +index bfcfe431548bf36d50b9bf12957fed59ed9c6984..705dcec93ab60f88bb407b7d75fbc0aca65fb7f8 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -579,5 +579,13 @@ public class PaperWorldConfig { +@@ -615,5 +615,13 @@ public class PaperWorldConfig { Bukkit.getLogger().warning("You have enabled permission-based Anti-Xray checking - depending on your permission plugin, this may cause performance issues"); } } @@ -548,7 +548,7 @@ index 0000000000000000000000000000000000000000..11de56afaf059b00fa5bec293516bcdc + } +} diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index e6ae3405995c4e472a731311695de7ef9b2d704b..f604fd1a4eb9ac5b7f43962a583183441a680319 100644 +index 15b514aa20370a010ff3ab891d875dc70e41d75a..be9ae4f0f19da069ae44e45a772096bb09918219 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -145,6 +145,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -617,7 +617,7 @@ index 5d920d7df52c12f5f1d1d8111340800cbddaac78..9f71dc37b0cef2284d6abc051b379cfa this.lastSpawnState = spawnercreature_d; diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 188b549fc56e1394c7119da99e4732065b256388..7adb5ba76810d39c61e25beeb781f384ce96396a 100644 +index 97d6963b6c7f0fb71324ac760df940fbf03e321f..4ca8f2f63e04da730a85a36d57058a481d1f9104 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -224,6 +224,11 @@ public class ServerPlayer extends Player { @@ -641,7 +641,7 @@ index 188b549fc56e1394c7119da99e4732065b256388..7adb5ba76810d39c61e25beeb781f384 // Yes, this doesn't match Vanilla, but it's the best we can do for now. diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index eeefd5b5d1cd4c1b38e706210fd0e56b17969b18..d69abf154f056883dcd6dc4d9d97d2b772b62368 100644 +index 461b64232c0f04e17e168f1e7f7857ee555200fc..4d8251a961a9c52456db997506dd9691beaec022 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java @@ -17,6 +17,7 @@ import net.minecraft.core.Registry; diff --git a/patches/server/0380-Add-option-to-nerf-pigmen-from-nether-portals.patch b/patches/server/0380-Add-option-to-nerf-pigmen-from-nether-portals.patch index 3eb04a89f..bed1de6d8 100644 --- a/patches/server/0380-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/patches/server/0380-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9dfb35654df01cf8fea6cf1842786f8466419729..6316597c52cb23f3cea81c95c0f7a7a289028537 100644 +index 705dcec93ab60f88bb407b7d75fbc0aca65fb7f8..1eea1d2b0747b904ff30f0c6debb8f04fcbb6923 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -487,6 +487,11 @@ public class PaperWorldConfig { +@@ -523,6 +523,11 @@ public class PaperWorldConfig { log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); } @@ -21,7 +21,7 @@ index 9dfb35654df01cf8fea6cf1842786f8466419729..6316597c52cb23f3cea81c95c0f7a7a2 private void lightQueueSize() { lightQueueSize = getInt("light-queue-size", lightQueueSize); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index eec286fd4607c1d9a68c9063535bb630f92b6f4a..f8c611a6a55dd56e5231834c9481c61727b628e9 100644 +index bcdf26151eef02f3e37692a71d579ddfe9d3ed59..e198a4b7f8b0db72855461c2741041e67a195f55 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -330,6 +330,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n diff --git a/patches/server/0385-Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/patches/server/0385-Add-option-to-allow-iron-golems-to-spawn-in-air.patch index 0b5280bda..25b2ec11c 100644 --- a/patches/server/0385-Add-option-to-allow-iron-golems-to-spawn-in-air.patch +++ b/patches/server/0385-Add-option-to-allow-iron-golems-to-spawn-in-air.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to allow iron golems to spawn in air diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 6316597c52cb23f3cea81c95c0f7a7a289028537..7dbd6fad3824bfe62c6c2a59804fb8723f8745d1 100644 +index 1eea1d2b0747b904ff30f0c6debb8f04fcbb6923..9ce95f6b6b53f6f30d3c9aeaee8938354fc0d3b5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -387,6 +387,11 @@ public class PaperWorldConfig { +@@ -423,6 +423,11 @@ public class PaperWorldConfig { scanForLegacyEnderDragon = getBoolean("game-mechanics.scan-for-legacy-ender-dragon", true); } diff --git a/patches/server/0386-Configurable-chance-of-villager-zombie-infection.patch b/patches/server/0386-Configurable-chance-of-villager-zombie-infection.patch index ea110d3d3..c489da11d 100644 --- a/patches/server/0386-Configurable-chance-of-villager-zombie-infection.patch +++ b/patches/server/0386-Configurable-chance-of-villager-zombie-infection.patch @@ -8,10 +8,10 @@ This allows you to solve an issue in vanilla behavior where: * On normal difficulty they will have a 50% of getting infected or dying. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7dbd6fad3824bfe62c6c2a59804fb8723f8745d1..1218411afe1e2e3c2ee54aec6287ff33b59afd01 100644 +index 9ce95f6b6b53f6f30d3c9aeaee8938354fc0d3b5..c6e721b19ddc9e01ffbed765aaf52bef50e80b1d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -497,6 +497,11 @@ public class PaperWorldConfig { +@@ -533,6 +533,11 @@ public class PaperWorldConfig { nerfNetherPortalPigmen = getBoolean("game-mechanics.nerf-pigmen-from-nether-portals", nerfNetherPortalPigmen); } @@ -24,7 +24,7 @@ index 7dbd6fad3824bfe62c6c2a59804fb8723f8745d1..1218411afe1e2e3c2ee54aec6287ff33 private void lightQueueSize() { lightQueueSize = getInt("light-queue-size", lightQueueSize); diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index 4f328c3281663a55eef879604d713ff38d797298..26200a9680d5fc95b04ba0c70ea20e145c4c220b 100644 +index c3fd3b354812dd690d68b45bc5a179778e4511e0..20d8e705ea432df64917b59f8290aa5400795f4b 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java @@ -452,10 +452,13 @@ public class Zombie extends Monster { diff --git a/patches/server/0388-Optimise-TickListServer-by-rewriting-it.patch b/patches/server/0388-Optimise-TickListServer-by-rewriting-it.patch index 9ec28b1fe..5796e956f 100644 --- a/patches/server/0388-Optimise-TickListServer-by-rewriting-it.patch +++ b/patches/server/0388-Optimise-TickListServer-by-rewriting-it.patch @@ -45,7 +45,7 @@ diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/j index 26c5ae72f63d930bf6de2ec18a964ddfeca16379..e9954fa75412a7077950e3813af4b201c084f68f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -372,6 +372,13 @@ public class PaperConfig { +@@ -375,6 +375,13 @@ public class PaperConfig { maxBookTotalSizeMultiplier = getDouble("settings.book-size.total-multiplier", maxBookTotalSizeMultiplier); } diff --git a/patches/server/0389-Pillager-patrol-spawn-settings-and-per-player-option.patch b/patches/server/0389-Pillager-patrol-spawn-settings-and-per-player-option.patch index 29e03ac93..79a0b65b0 100644 --- a/patches/server/0389-Pillager-patrol-spawn-settings-and-per-player-option.patch +++ b/patches/server/0389-Pillager-patrol-spawn-settings-and-per-player-option.patch @@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per world and the world age for the start day. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1218411afe1e2e3c2ee54aec6287ff33b59afd01..03c45d4fa891e9f00d4b6b24cfc144086294618b 100644 +index c6e721b19ddc9e01ffbed765aaf52bef50e80b1d..00d1ea2440aecd81fc0e23a06f53890c55424ab3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -474,10 +474,21 @@ public class PaperWorldConfig { +@@ -510,10 +510,21 @@ public class PaperWorldConfig { } public boolean disablePillagerPatrols = false; @@ -36,7 +36,7 @@ index 1218411afe1e2e3c2ee54aec6287ff33b59afd01..03c45d4fa891e9f00d4b6b24cfc14408 private void entitiesTargetWithFollowRange() { entitiesTargetWithFollowRange = getBoolean("entities-target-with-follow-range", entitiesTargetWithFollowRange); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 7adb5ba76810d39c61e25beeb781f384ce96396a..bbc8f7909b6ae8452a8f3c697bfba92d0170dbe1 100644 +index 4ca8f2f63e04da730a85a36d57058a481d1f9104..f515ef16ef0c92c6cf59301d2818ad714554030a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -220,6 +220,7 @@ public class ServerPlayer extends Player { diff --git a/patches/server/0397-Add-tick-times-API-and-mspt-command.patch b/patches/server/0397-Add-tick-times-API-and-mspt-command.patch index 2e30607ad..a9131c8ce 100644 --- a/patches/server/0397-Add-tick-times-API-and-mspt-command.patch +++ b/patches/server/0397-Add-tick-times-API-and-mspt-command.patch @@ -75,7 +75,7 @@ index 0000000000000000000000000000000000000000..d0211d4f39f9d6af1d751ac66342b42c + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index e9954fa75412a7077950e3813af4b201c084f68f..f4b1eb512defda8523ddaba054bde744a4aaeb32 100644 +index 217779a280b70ba5b3bbe1f5412dd149c12b40fa..4bdc154ce5b91c3d5c4b5dc63ff32a7fe094bd37 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -69,6 +69,7 @@ public class PaperConfig { @@ -84,10 +84,10 @@ index e9954fa75412a7077950e3813af4b201c084f68f..f4b1eb512defda8523ddaba054bde744 commands.put("paper", new PaperCommand("paper")); + commands.put("mspt", new MSPTCommand("mspt")); - version = getInt("config-version", 23); - set("config-version", 23); + version = getInt("config-version", 24); + set("config-version", 24); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 026397cbedd2d1cd08ec8a82a3468f35cd8e4765..74051c9b620516dc2f302b1595e74faf91519962 100644 +index 9683c29c583e8b7e4f41d088160455714033a135..5edbb9132d2895da2b693fe35d4a25000982b636 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -248,6 +248,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); Thread thread = new Thread(() -> { -@@ -932,6 +935,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 100) { // Spigot diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index c6c4d2fd3205dfcaff9e0f1a6b92b74903275991..fe8e6d66665dc8c38e74c0b264cf507f99f83091 100644 +index b9e9bfb6c73cfb309c5d9399817546399b333a12..467449049359c721c27b7cd249b03acc5fb8f3cc 100644 --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java @@ -111,6 +111,8 @@ public class ChunkHolder { @@ -139,7 +139,7 @@ index c6c4d2fd3205dfcaff9e0f1a6b92b74903275991..fe8e6d66665dc8c38e74c0b264cf507f for (int i = 0; i < this.futures.length(); ++i) { CompletableFuture> completablefuture = (CompletableFuture) this.futures.get(i); diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index cec1906adc4d2953b50d262abb1c2cb61cb3ba41..c3b927e612806b3de4ec57bd6f926af35ad1146a 100644 +index d372fb640e34cd451cf79f5b4e03b47c5cb034ab..d70d977290b07fca61fea965a907c9f60a393ba7 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -97,6 +97,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana @@ -260,7 +260,7 @@ index 0ce86c72cb829b816ec7bfb8f0d19396e1b12eb6..e5317a994cb9b30293ad54b8fc537f70 public void close() throws IOException { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 35ba86f0104b39903804de86dc5dff81050003bc..86d060691405401fe8ae8ae8ef59322ee841b196 100644 +index 320cd209ab725a9ad4d5dff70987d7efabae5798..012ac1089205411a56576b26c90ff9122146725e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1050,6 +1050,37 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0458-Fix-piston-physics-inconsistency-MC-188840.patch b/patches/server/0458-Fix-piston-physics-inconsistency-MC-188840.patch index 43c48c357..98980618d 100644 --- a/patches/server/0458-Fix-piston-physics-inconsistency-MC-188840.patch +++ b/patches/server/0458-Fix-piston-physics-inconsistency-MC-188840.patch @@ -32,10 +32,10 @@ This patch fixes https://bugs.mojang.com/browse/MC-188840 This patch also fixes rail duping and carpet duping. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index ddf9b5592e2203315d239ab28a338633600c69fc..0ff0a71fe5dc53fa5fb81edffabc69790e3bcd1e 100644 +index 31e127151d2a046bf1652a909bc3ea64f95f2d1f..db2aa6998ab7d2786bb455401f653eec724d53ba 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -454,4 +454,12 @@ public class PaperConfig { +@@ -457,4 +457,12 @@ public class PaperConfig { private static void consoleHasAllPermissions() { consoleHasAllPermissions = getBoolean("settings.console-has-all-permissions", consoleHasAllPermissions); } diff --git a/patches/server/0468-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0468-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index c9b0de9b9..30ad03414 100644 --- a/patches/server/0468-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0468-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -8,10 +8,10 @@ makes it so that the server keeps the last difficulty used instead of restoring the server.properties every single load. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b4ca88f9285fb5a55ed5b03355a77fd564ebaa80..58652325de8c3978359a9864bb68da9347990774 100644 +index 4f630156a597f2b8ebe16856d0db2c1723e958cd..335d42592d99d91ae1d99fe1b99122a3bac97a49 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -856,7 +856,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit // Paper - move down // MinecraftServer.LOGGER.debug("Autosave started"); // Paper serverAutoSave = (autosavePeriod > 0 && this.tickCount % autosavePeriod == 0); // Paper diff --git a/patches/server/0510-Prevent-headless-pistons-from-being-created.patch b/patches/server/0510-Prevent-headless-pistons-from-being-created.patch index 105b070cd..694f4bcdf 100644 --- a/patches/server/0510-Prevent-headless-pistons-from-being-created.patch +++ b/patches/server/0510-Prevent-headless-pistons-from-being-created.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Prevent headless pistons from being created Prevent headless pistons from being created by explosions or tree/mushroom growth. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index d74f0bdabd64976bf8608f2a5d8f2dc6118a35f2..c59a881632810da1408e74493bafcd4e6b01d975 100644 +index 64ccc906fef2c0988c30d289c392b13221b9b4c1..6b725dc2217e68255286caad6a0820bcccffb6da 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -462,6 +462,12 @@ public class PaperConfig { +@@ -465,6 +465,12 @@ public class PaperConfig { set("settings.unsupported-settings.allow-tnt-duplication", null); } diff --git a/patches/server/0512-Add-zombie-targets-turtle-egg-config.patch b/patches/server/0512-Add-zombie-targets-turtle-egg-config.patch index 97e0eba69..826551f5e 100644 --- a/patches/server/0512-Add-zombie-targets-turtle-egg-config.patch +++ b/patches/server/0512-Add-zombie-targets-turtle-egg-config.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add zombie targets turtle egg config diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 144a8d424cd4f953b1471f20d1521ed1b7639f1a..ee8a1be2fa90f4503f90a2690713de234479de9d 100644 +index f9caed53ffc10300511b576cf822864b101df83d..483f7f790173f1fc30f2b2b98e543098114c4cab 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -38,6 +38,11 @@ public class PaperWorldConfig { +@@ -57,6 +57,11 @@ public class PaperWorldConfig { } } @@ -21,7 +21,7 @@ index 144a8d424cd4f953b1471f20d1521ed1b7639f1a..ee8a1be2fa90f4503f90a2690713de23 private void keepLoadedRange() { keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index 26200a9680d5fc95b04ba0c70ea20e145c4c220b..c4bbec1573d304a4d1bf20a8d16681ad828b5a51 100644 +index 20d8e705ea432df64917b59f8290aa5400795f4b..c210f83044ec2cddbfb776094da3d7f5f21df23b 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java @@ -109,7 +109,7 @@ public class Zombie extends Monster { diff --git a/patches/server/0513-Buffer-joins-to-world.patch b/patches/server/0513-Buffer-joins-to-world.patch index f7d606bc3..6c7060c6c 100644 --- a/patches/server/0513-Buffer-joins-to-world.patch +++ b/patches/server/0513-Buffer-joins-to-world.patch @@ -8,10 +8,10 @@ the world per tick, this attempts to reduce the impact that join floods has on the server diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index c59a881632810da1408e74493bafcd4e6b01d975..07eeb01c95a04299fab2daddfdaf5d1a96495ef0 100644 +index 6b725dc2217e68255286caad6a0820bcccffb6da..6733e78ba6bf2993bb2adde4cf9f1f6ca366679c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -478,4 +478,9 @@ public class PaperConfig { +@@ -481,4 +481,9 @@ public class PaperConfig { maxPlayerAutoSavePerTick = (playerAutoSaveRate == -1 || playerAutoSaveRate > 100) ? 10 : 20; } } diff --git a/patches/server/0514-Optimize-redstone-algorithm.patch b/patches/server/0514-Optimize-redstone-algorithm.patch index 141b2ee1b..e83f454d6 100644 --- a/patches/server/0514-Optimize-redstone-algorithm.patch +++ b/patches/server/0514-Optimize-redstone-algorithm.patch @@ -19,10 +19,10 @@ Aside from making the obvious class/function renames and obfhelpers I didn't nee Just added Bukkit's event system and took a few liberties with dead code and comment misspellings. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index ee8a1be2fa90f4503f90a2690713de234479de9d..b114b60266f4f29f243d09fe9ea3df2082fd0d6c 100644 +index 483f7f790173f1fc30f2b2b98e543098114c4cab..b70be9eea934aa88a9597581dbd1fd5662876c2d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -43,6 +43,16 @@ public class PaperWorldConfig { +@@ -62,6 +62,16 @@ public class PaperWorldConfig { zombiesTargetTurtleEggs = getBoolean("zombies-target-turtle-eggs", zombiesTargetTurtleEggs); } diff --git a/patches/server/0521-Cache-block-data-strings.patch b/patches/server/0521-Cache-block-data-strings.patch index 701a942b6..64953f18a 100644 --- a/patches/server/0521-Cache-block-data-strings.patch +++ b/patches/server/0521-Cache-block-data-strings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4af56ca699d456eb23794673861323ab06cf6de8..bb18848f2b91b80ab5099c00b423738bbb2560e8 100644 +index 968476493bcea8b4d961e838b142912d3eac91cd..b9c628b2786df4b85329b4d1da55452f61d80dfd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2042,6 +2042,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop completablefuture = CompletableFuture.supplyAsync(() -> { Stream stream = datapacks.stream(); // CraftBukkit - decompile error PackRepository resourcepackrepository = this.packRepository; -@@ -2037,6 +2043,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper @@ -17,7 +17,7 @@ index 1a3158738bf4c506f3868a43cadc30c854532238..c8b68b5a996491dcd668f929badf2943 this.profiler.push(() -> { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index aedb1d7a0b60fba72a952fa140569b72795660e4..d5c7180376562cd576d832d44ab11c9cc323ba12 100644 +index 073dbf69b5b58c4351110d28491e7feb2e47081c..c58b0de1cf1c51ceb0a0ecc145f4a98929521934 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -197,6 +197,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0616-added-option-to-disable-pathfinding-updates-on-block.patch b/patches/server/0616-added-option-to-disable-pathfinding-updates-on-block.patch index 860daa758..217fe8628 100644 --- a/patches/server/0616-added-option-to-disable-pathfinding-updates-on-block.patch +++ b/patches/server/0616-added-option-to-disable-pathfinding-updates-on-block.patch @@ -5,10 +5,10 @@ Subject: [PATCH] added option to disable pathfinding updates on block changes diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index c17747e226dd5c4ec1c4142d4fa60b7def21e90e..5e45ad4638d94b4602c660aab72ee8bb7ead9de6 100644 +index e996b5a8559d731accb6f09eb46437c33b088d3e..9cea705b59e198ca5bcf89be74e310d686901173 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -767,5 +767,10 @@ public class PaperWorldConfig { +@@ -804,5 +804,10 @@ public class PaperWorldConfig { private void enderDragonsDeathAlwaysPlacesDragonEgg() { enderDragonsDeathAlwaysPlacesDragonEgg = getBoolean("ender-dragons-death-always-places-dragon-egg", enderDragonsDeathAlwaysPlacesDragonEgg); } @@ -20,7 +20,7 @@ index c17747e226dd5c4ec1c4142d4fa60b7def21e90e..5e45ad4638d94b4602c660aab72ee8bb } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index d5c7180376562cd576d832d44ab11c9cc323ba12..044aa3df0c26b7a64eefcacf0b6b5c2d9224938c 100644 +index b8495c2240795a14eaf4c230355c23c7090f39a1..614d9b5865e9cf5e939db8b3840e9dc4b72fe7e0 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1386,6 +1386,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0626-MC-29274-Fix-Wither-hostility-towards-players.patch b/patches/server/0626-MC-29274-Fix-Wither-hostility-towards-players.patch index 7ca949d66..3ed0991e6 100644 --- a/patches/server/0626-MC-29274-Fix-Wither-hostility-towards-players.patch +++ b/patches/server/0626-MC-29274-Fix-Wither-hostility-towards-players.patch @@ -5,10 +5,10 @@ Subject: [PATCH] MC-29274: Fix Wither hostility towards players diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 5e45ad4638d94b4602c660aab72ee8bb7ead9de6..e53b6515ca427b90f21441cf142ecde6e986058d 100644 +index 9cea705b59e198ca5bcf89be74e310d686901173..81c78a33e76451879eb9b6f946bc04a28cca72bc 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -772,5 +772,11 @@ public class PaperWorldConfig { +@@ -809,5 +809,11 @@ public class PaperWorldConfig { private void setUpdatePathfindingOnBlockUpdate() { updatePathfindingOnBlockUpdate = getBoolean("update-pathfinding-on-block-update", this.updatePathfindingOnBlockUpdate); } diff --git a/patches/server/0636-Allow-using-signs-inside-spawn-protection.patch b/patches/server/0636-Allow-using-signs-inside-spawn-protection.patch index ae79e64a0..7f59d2869 100644 --- a/patches/server/0636-Allow-using-signs-inside-spawn-protection.patch +++ b/patches/server/0636-Allow-using-signs-inside-spawn-protection.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow using signs inside spawn protection diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index e53b6515ca427b90f21441cf142ecde6e986058d..1da69d56f0b58708d4c85e76307b725221f9caed 100644 +index 81c78a33e76451879eb9b6f946bc04a28cca72bc..723bf8c37494a11b5e6cccc22a2c125c5cba3c01 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -778,5 +778,10 @@ public class PaperWorldConfig { +@@ -815,5 +815,10 @@ public class PaperWorldConfig { fixWitherTargetingBug = getBoolean("fix-wither-targeting-bug", false); log("Withers properly target players: " + fixWitherTargetingBug); } @@ -20,7 +20,7 @@ index e53b6515ca427b90f21441cf142ecde6e986058d..1da69d56f0b58708d4c85e76307b7252 } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2ee8097e2a3e6bf4fb02ded2d2499487eaf7c142..8424884bcd36e3daff47725ef343d9b99030bdc6 100644 +index 6de62cbd8475d04c765d532731336638225525bc..2d459cf7899461fbacaa22b0b2d68a73578bc95f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1723,7 +1723,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser diff --git a/patches/server/0643-forced-whitelist-use-configurable-kick-message.patch b/patches/server/0643-forced-whitelist-use-configurable-kick-message.patch index 4710e758e..6d32877ea 100644 --- a/patches/server/0643-forced-whitelist-use-configurable-kick-message.patch +++ b/patches/server/0643-forced-whitelist-use-configurable-kick-message.patch @@ -5,7 +5,7 @@ Subject: [PATCH] forced whitelist: use configurable kick message diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cfcc29ed3b1396b1429af14195f420c550653aa5..84afe36963178aa0319e219244ddbe6f0b91260b 100644 +index f3976a53514249e64d91075ec2e620e4c7cef37f..fca8d2100b48be9698afa7f3e8cf20212ca37974 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -74,7 +74,6 @@ import net.minecraft.nbt.NbtOps; @@ -16,7 +16,7 @@ index cfcc29ed3b1396b1429af14195f420c550653aa5..84afe36963178aa0319e219244ddbe6f import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.game.ClientboundChangeDifficultyPacket; import net.minecraft.network.protocol.game.ClientboundSetTimePacket; -@@ -2124,7 +2123,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { diff --git a/patches/server/0649-Enhance-console-tab-completions-for-brigadier-comman.patch b/patches/server/0649-Enhance-console-tab-completions-for-brigadier-comman.patch index b7c4610db..7b7a51d6c 100644 --- a/patches/server/0649-Enhance-console-tab-completions-for-brigadier-comman.patch +++ b/patches/server/0649-Enhance-console-tab-completions-for-brigadier-comman.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/j index 4e824a87b463a417c204a9ee188450bdd9f4fbc2..ef1e6e898b3cb9d012b2cf24aedffea4afce8a38 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -500,4 +500,11 @@ public class PaperConfig { +@@ -503,4 +503,11 @@ public class PaperConfig { private static void fixEntityPositionDesync() { fixEntityPositionDesync = getBoolean("settings.fix-entity-position-desync", fixEntityPositionDesync); } diff --git a/patches/server/0690-Limit-item-frame-cursors-on-maps.patch b/patches/server/0690-Limit-item-frame-cursors-on-maps.patch index d3427fb00..f5ec39469 100644 --- a/patches/server/0690-Limit-item-frame-cursors-on-maps.patch +++ b/patches/server/0690-Limit-item-frame-cursors-on-maps.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Limit item frame cursors on maps diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 5eeb09c7cbc743c4273a6d02d9f0c357c2724ba2..436362e1325284278484c7fd10f533041cad89dd 100644 +index 0938b38aaca2bfaf3a70c392849222fc0128c60c..81c3a4a2c7e95e92566030ab48f534285d185cf5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -818,5 +818,10 @@ public class PaperWorldConfig { +@@ -855,5 +855,10 @@ public class PaperWorldConfig { private void allowUsingSignsInsideSpawnProtection() { allowUsingSignsInsideSpawnProtection = getBoolean("allow-using-signs-inside-spawn-protection", allowUsingSignsInsideSpawnProtection); } @@ -20,7 +20,7 @@ index 5eeb09c7cbc743c4273a6d02d9f0c357c2724ba2..436362e1325284278484c7fd10f53304 } diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java -index 2e5155fe541ed7040a6be9fdec98b23e8c45bfb0..60d7496966b22e0553372a93e3c0e7ed9e166cba 100644 +index ad6c3459712d08de248b8ef299ddbedfda6c7ac2..6f64d1ce0f5b20e1579f8af64c08ef8fc4e4444b 100644 --- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java @@ -296,8 +296,12 @@ public class MapItemSavedData extends SavedData { diff --git a/patches/server/0692-Add-PlayerKickEvent-causes.patch b/patches/server/0692-Add-PlayerKickEvent-causes.patch index a25028e2b..8cc31b43d 100644 --- a/patches/server/0692-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0692-Add-PlayerKickEvent-causes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerKickEvent causes diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index be6b19b587ae2bbc708d712fc4327e4c56b7197c..a2a012d69a7f5e2d623ad93c3b6e3aece2cbf1a3 100644 +index 18a9d84c9508318132bb9b1dcb01ea11ea018916..71181012314d20e3505543a6d2abe88cb8e17a27 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2125,7 +2125,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop perWorldSpawnLimits = new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length); + private void perWorldSpawnLimits() { -+ spawnLimitMonsters = getInt("spawn-limits.monsters", spawnLimitMonsters); -+ spawnLimitAnimals = getInt("spawn-limits.animals", spawnLimitAnimals); -+ spawnLimitWaterAnimals = getInt("spawn-limits.water-animals", spawnLimitWaterAnimals); -+ spawnLimitWaterAmbient = getInt("spawn-limits.water-ambient", spawnLimitWaterAmbient); -+ spawnLimitAmbient = getInt("spawn-limits.ambient", spawnLimitAmbient); ++ perWorldSpawnLimits.defaultReturnValue(-1); ++ if (PaperConfig.version < 24) { ++ // ambient category already had correct name ++ perWorldSpawnLimits.put(MobCategory.MONSTER, getInt("spawn-limits.monsters", -1, false)); ++ perWorldSpawnLimits.put(MobCategory.CREATURE, getInt("spawn-limits.animals", -1, false)); ++ perWorldSpawnLimits.put(MobCategory.WATER_CREATURE, getInt("spawn-limits.water-animals", -1, false)); ++ perWorldSpawnLimits.put(MobCategory.WATER_AMBIENT, getInt("spawn-limits.water-ambient", -1, false)); ++ } ++ for (MobCategory value : NaturalSpawner.SPAWNING_CATEGORIES) { ++ perWorldSpawnLimits.put(value, getInt("spawn-limits." + value.getName(), perWorldSpawnLimits.getInt(value))); ++ } + } + public int lightQueueSize = 20; private void lightQueueSize() { lightQueueSize = getInt("light-queue-size", lightQueueSize); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 6a4c379a2905455b14c3cbd4a46a0f95c5f78aac..a1f26413e30c80162738595427837c7177357a1b 100644 +index 6a4c379a2905455b14c3cbd4a46a0f95c5f78aac..4430385a758906239b8573c59b18d19470339ec5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -210,6 +210,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -210,6 +210,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { this.biomeProvider = biomeProvider; this.environment = env; + // Paper start - per world spawn limits -+ this.monsterSpawn = this.world.paperConfig.spawnLimitMonsters; -+ this.animalSpawn = this.world.paperConfig.spawnLimitAnimals; -+ this.waterAnimalSpawn = this.world.paperConfig.spawnLimitWaterAnimals; -+ this.waterAmbientSpawn = this.world.paperConfig.spawnLimitWaterAmbient; -+ this.ambientSpawn = this.world.paperConfig.spawnLimitAmbient; ++ this.monsterSpawn = this.world.paperConfig.perWorldSpawnLimits.getInt(net.minecraft.world.entity.MobCategory.MONSTER); ++ this.animalSpawn = this.world.paperConfig.perWorldSpawnLimits.getInt(net.minecraft.world.entity.MobCategory.CREATURE); ++ this.waterAnimalSpawn = this.world.paperConfig.perWorldSpawnLimits.getInt(net.minecraft.world.entity.MobCategory.WATER_CREATURE); ++ this.waterAmbientSpawn = this.world.paperConfig.perWorldSpawnLimits.getInt(net.minecraft.world.entity.MobCategory.WATER_AMBIENT); ++ this.ambientSpawn = this.world.paperConfig.perWorldSpawnLimits.getInt(net.minecraft.world.entity.MobCategory.AMBIENT); ++ this.waterUndergroundCreatureSpawn = this.world.paperConfig.perWorldSpawnLimits.getInt(net.minecraft.world.entity.MobCategory.UNDERGROUND_WATER_CREATURE); + // Paper end } diff --git a/patches/server/0713-Fix-commands-from-signs-not-firing-command-events.patch b/patches/server/0713-Fix-commands-from-signs-not-firing-command-events.patch index 28d0aebb0..ef283f608 100644 --- a/patches/server/0713-Fix-commands-from-signs-not-firing-command-events.patch +++ b/patches/server/0713-Fix-commands-from-signs-not-firing-command-events.patch @@ -10,10 +10,10 @@ This patch changes sign command logic so that `run_command` click events: - sends failure messages to the player who clicked the sign diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index fc9b69d87364b578327dffb657746c08ab505be3..04b27d96d7a6396989c6a9d67b92af259dc0cc26 100644 +index 3de0e744415887a408b8c97e15caa85af5f1051f..ff7766553743172cb83049ed89532eba596f39b6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -846,5 +846,10 @@ public class PaperWorldConfig { +@@ -891,5 +891,10 @@ public class PaperWorldConfig { private void fixInvulnerableEndCrystalExploit() { fixInvulnerableEndCrystalExploit = getBoolean("unsupported-settings.fix-invulnerable-end-crystal-exploit", fixInvulnerableEndCrystalExploit); } diff --git a/patches/server/0716-Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/0716-Add-config-for-mobs-immune-to-default-effects.patch index 797372017..feea132a5 100644 --- a/patches/server/0716-Add-config-for-mobs-immune-to-default-effects.patch +++ b/patches/server/0716-Add-config-for-mobs-immune-to-default-effects.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add config for mobs immune to default effects diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 04b27d96d7a6396989c6a9d67b92af259dc0cc26..2bfadd245b5d08c1b77805ee049456cc786c093e 100644 +index ff7766553743172cb83049ed89532eba596f39b6..d16e3be9e64db9cba4bb90cccd170aa92534b76a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -671,6 +671,21 @@ public class PaperWorldConfig { +@@ -714,6 +714,21 @@ public class PaperWorldConfig { log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); } @@ -31,7 +31,7 @@ index 04b27d96d7a6396989c6a9d67b92af259dc0cc26..2bfadd245b5d08c1b77805ee049456cc private void nerfNetherPortalPigmen() { nerfNetherPortalPigmen = getBoolean("game-mechanics.nerf-pigmen-from-nether-portals", nerfNetherPortalPigmen); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index a60d289f3cf3826ac5368f3de77584fb63bf5e64..38e8d8c7d37fc824323dac372c56550480360515 100644 +index bd2e2eece61fd7fa6ab63d8926308044ceaa4012..2a16984f417967cf11838b1a05d60b9d49af91c3 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1133,7 +1133,7 @@ public abstract class LivingEntity extends Entity { diff --git a/patches/server/0719-Don-t-apply-cramming-damage-to-players.patch b/patches/server/0719-Don-t-apply-cramming-damage-to-players.patch index 8e80cecd0..3029b1fd5 100644 --- a/patches/server/0719-Don-t-apply-cramming-damage-to-players.patch +++ b/patches/server/0719-Don-t-apply-cramming-damage-to-players.patch @@ -11,10 +11,10 @@ It does not make a lot of sense to damage players if they get crammed, For those who really want it a config option is provided. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 2bfadd245b5d08c1b77805ee049456cc786c093e..88abb1dfd994e5bc51aa181121407f3d84f85f5b 100644 +index d16e3be9e64db9cba4bb90cccd170aa92534b76a..35e6a18dea889db8bd497ac029fda653ef3926ab 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -866,5 +866,10 @@ public class PaperWorldConfig { +@@ -911,5 +911,10 @@ public class PaperWorldConfig { private void showSignClickCommandFailureMessagesToPlayer() { showSignClickCommandFailureMessagesToPlayer = getBoolean("show-sign-click-command-failure-msgs-to-player", showSignClickCommandFailureMessagesToPlayer); } @@ -26,7 +26,7 @@ index 2bfadd245b5d08c1b77805ee049456cc786c093e..88abb1dfd994e5bc51aa181121407f3d } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 3833c0c863c49c2ff5552030e7a0799cf2ec0614..822c38033e9134d631b031e3571b05951a4625b1 100644 +index 9fcf6019423a84baa6ee91e3a10957f092f023b6..e809fd6616e2b7a602be10f0a62d0261b4b3b0da 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -1419,7 +1419,7 @@ public class ServerPlayer extends Player { diff --git a/patches/server/0720-Rate-options-and-timings-for-sensors-and-behaviors.patch b/patches/server/0720-Rate-options-and-timings-for-sensors-and-behaviors.patch index b01633553..9a39fb12b 100644 --- a/patches/server/0720-Rate-options-and-timings-for-sensors-and-behaviors.patch +++ b/patches/server/0720-Rate-options-and-timings-for-sensors-and-behaviors.patch @@ -28,13 +28,13 @@ index b47b7dce26805badd422c1867733ff4bfd00e9f4..b27021a42cbed3f0648a8d0903d00d03 * Get a named timer for the specified tile entity type to track type specific timings. * @param entity diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 88abb1dfd994e5bc51aa181121407f3d84f85f5b..34d3ca57acd3aa37a37d44cd81bdd10967f12aaa 100644 +index 35e6a18dea889db8bd497ac029fda653ef3926ab..ef569d01165d7953c5802342e00da7d655811ff7 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -3,14 +3,19 @@ package com.destroystokyo.paper; - import java.util.Arrays; +@@ -7,8 +7,12 @@ import it.unimi.dsi.fastutil.objects.Reference2IntMap; + import it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap; + import net.minecraft.world.entity.MobCategory; import java.util.HashMap; - import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.stream.Collectors; @@ -44,14 +44,15 @@ index 88abb1dfd994e5bc51aa181121407f3d84f85f5b..34d3ca57acd3aa37a37d44cd81bdd109 import net.minecraft.world.Difficulty; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.monster.Vindicator; - import net.minecraft.world.entity.monster.Zombie; +@@ -16,6 +20,7 @@ import net.minecraft.world.entity.monster.Zombie; import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode; + import net.minecraft.world.level.NaturalSpawner; import org.bukkit.Bukkit; +import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -871,5 +876,58 @@ public class PaperWorldConfig { +@@ -916,5 +921,58 @@ public class PaperWorldConfig { private void playerCrammingDamage() { allowPlayerCrammingDamage = getBoolean("allow-player-cramming-damage", allowPlayerCrammingDamage); } diff --git a/patches/server/0733-Config-option-for-Piglins-guarding-chests.patch b/patches/server/0733-Config-option-for-Piglins-guarding-chests.patch index 7a4195634..9042e5a3f 100644 --- a/patches/server/0733-Config-option-for-Piglins-guarding-chests.patch +++ b/patches/server/0733-Config-option-for-Piglins-guarding-chests.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Config option for Piglins guarding chests diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 34d3ca57acd3aa37a37d44cd81bdd10967f12aaa..eac8ebb2538144d584eb02152a8d1366526150fe 100644 +index ef569d01165d7953c5802342e00da7d655811ff7..7bc5ba3514d2f091f745b33f96fe86bd839b04c2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -54,6 +54,11 @@ public class PaperWorldConfig { +@@ -80,6 +80,11 @@ public class PaperWorldConfig { zombiesTargetTurtleEggs = getBoolean("zombies-target-turtle-eggs", zombiesTargetTurtleEggs); } diff --git a/patches/server/0737-Configurable-item-frame-map-cursor-update-interval.patch b/patches/server/0737-Configurable-item-frame-map-cursor-update-interval.patch index 5bb473a9e..3c39e0420 100644 --- a/patches/server/0737-Configurable-item-frame-map-cursor-update-interval.patch +++ b/patches/server/0737-Configurable-item-frame-map-cursor-update-interval.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable item frame map cursor update interval diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index eac8ebb2538144d584eb02152a8d1366526150fe..fd7ac4be153538dcee60fade6e7a00f57770e97f 100644 +index 7bc5ba3514d2f091f745b33f96fe86bd839b04c2..410e1e67ca625fc01553d61c2b0eaeec10317e5e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -862,6 +862,11 @@ public class PaperWorldConfig { +@@ -907,6 +907,11 @@ public class PaperWorldConfig { mapItemFrameCursorLimit = getInt("map-item-frame-cursor-limit", mapItemFrameCursorLimit); } @@ -21,7 +21,7 @@ index eac8ebb2538144d584eb02152a8d1366526150fe..fd7ac4be153538dcee60fade6e7a00f5 private void fixItemsMergingThroughWalls() { fixItemsMergingThroughWalls = getBoolean("fix-items-merging-through-walls", fixItemsMergingThroughWalls); diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index e5cae2fb67541785072324e5434820ee4b169556..9950541e0432240207458274b76b1c5d402ac704 100644 +index 69a671a2cd068d7665fdcd455c2710ee2890f564..764d449aa63af88029f80918884a0c942d630113 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java @@ -99,7 +99,7 @@ public class ServerEntity { diff --git a/patches/server/0766-Execute-chunk-tasks-mid-tick.patch b/patches/server/0766-Execute-chunk-tasks-mid-tick.patch index ee13c36c5..91de9519f 100644 --- a/patches/server/0766-Execute-chunk-tasks-mid-tick.patch +++ b/patches/server/0766-Execute-chunk-tasks-mid-tick.patch @@ -31,7 +31,7 @@ index 5fdaefc128956581be4bb9b34199fd6410563991..b7edc1121797bc1c57e25f540ed0124f // start copy from TickListServer // TODO check on update CrashReport crashreport = CrashReport.forThrowable(thr, "Exception while ticking"); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ecb167f6a114a7e3bfac05db2e87631ec88a0ba2..fe6d5051b139cd6079e288ffdf20e30fdd46fdda 100644 +index 71181012314d20e3505543a6d2abe88cb8e17a27..4778d45d14317d78ae1988de18f675d997d28c98 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -330,6 +330,76 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entry = (Entry) objectbidirectionaliterator.next(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index a1f26413e30c80162738595427837c7177357a1b..072c2bbd8dd94bf3b687cee2eb7c09c79190231c 100644 +index 4430385a758906239b8573c59b18d19470339ec5..b4cf0d44bda13625cfa8264043a49c1a0daf1054 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -149,7 +149,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -177,7 +177,7 @@ index a1f26413e30c80162738595427837c7177357a1b..072c2bbd8dd94bf3b687cee2eb7c09c7 if (chunkHolder.getTickingChunk() != null) { ++ret; } -@@ -343,7 +343,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -344,7 +344,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public Chunk[] getLoadedChunks() { diff --git a/patches/server/0769-Replace-player-chunk-loader-system.patch b/patches/server/0769-Replace-player-chunk-loader-system.patch index 5fdb5d0ca..82bcaa322 100644 --- a/patches/server/0769-Replace-player-chunk-loader-system.patch +++ b/patches/server/0769-Replace-player-chunk-loader-system.patch @@ -80,10 +80,10 @@ index cfe293881f68c8db337c3a48948362bb7b3e3522..7d44abcb4fff9717a1af55879deb7eb9 })); diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index efe964caada458a34c58a0396cc7e3321c58e404..98288f83d1276a47ad3335153aee5c7ea9a5e451 100644 +index 939744ef6850d4e59e5c94bc4781d045041b977d..a72f15c10410508ff344caf3ca376fd3d7317518 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -522,4 +522,29 @@ public class PaperConfig { +@@ -525,4 +525,29 @@ public class PaperConfig { itemValidationBookAuthorLength = getInt("settings.item-validation.book.author", itemValidationBookAuthorLength); itemValidationBookPageLength = getInt("settings.item-validation.book.page", itemValidationBookPageLength); } @@ -1695,10 +1695,10 @@ index f0c43f9f636a5dd1f0dfbae604dfa1f4ff9ebd4e..9e75ee7f43722f05dd5df4ef00f7d3e2 /* * If it's a new world, the first few chunks are generated inside diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 072c2bbd8dd94bf3b687cee2eb7c09c79190231c..8c238a445b327e24d8152b36ebc2b1b57e73d0e1 100644 +index b4cf0d44bda13625cfa8264043a49c1a0daf1054..e5e23c907d49ee64218f3302e2a2323d6937a8a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2066,14 +2066,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2067,14 +2067,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { throw new IllegalArgumentException("View distance " + viewDistance + " is out of range of [2, 32]"); } net.minecraft.server.level.ChunkMap chunkMap = getHandle().getChunkSource().chunkMap; @@ -1715,7 +1715,7 @@ index 072c2bbd8dd94bf3b687cee2eb7c09c79190231c..8c238a445b327e24d8152b36ebc2b1b5 } @Override -@@ -2082,11 +2082,22 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2083,11 +2083,22 @@ public class CraftWorld extends CraftRegionAccessor implements World { throw new IllegalArgumentException("View distance " + viewDistance + " is out of range of [2, 32]"); } net.minecraft.server.level.ChunkMap chunkMap = getHandle().getChunkSource().chunkMap; diff --git a/patches/server/0779-Add-packet-limiter-config.patch b/patches/server/0779-Add-packet-limiter-config.patch index 60cfd0e37..a273c156d 100644 --- a/patches/server/0779-Add-packet-limiter-config.patch +++ b/patches/server/0779-Add-packet-limiter-config.patch @@ -24,10 +24,10 @@ and an action can be defined: DROP or KICK If interval or rate are less-than 0, the limit is ignored diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 98288f83d1276a47ad3335153aee5c7ea9a5e451..448def89819e8263fda5902be508dcf9789dbf3c 100644 +index a72f15c10410508ff344caf3ca376fd3d7317518..5ccc86d714d5e6e40df853bb30be11662cd53809 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -547,4 +547,102 @@ public class PaperConfig { +@@ -550,4 +550,102 @@ public class PaperConfig { playerMaxConcurrentChunkLoads = getDouble("settings.chunk-loading.player-max-concurrent-loads", 4.0); globalMaxConcurrentChunkLoads = getDouble("settings.chunk-loading.global-max-concurrent-loads", 500.0); } diff --git a/patches/server/0780-Lag-compensate-block-breaking.patch b/patches/server/0780-Lag-compensate-block-breaking.patch index ba57ca665..18f58cdde 100644 --- a/patches/server/0780-Lag-compensate-block-breaking.patch +++ b/patches/server/0780-Lag-compensate-block-breaking.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Lag compensate block breaking Use time instead of ticks if ticks fall behind diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 448def89819e8263fda5902be508dcf9789dbf3c..31662010b1c3d3fb9f667afd13e33e0a35005867 100644 +index 5ccc86d714d5e6e40df853bb30be11662cd53809..cf9a72b7fe0b41e1ca68bbae2164162447405fc5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -645,4 +645,10 @@ public class PaperConfig { +@@ -648,4 +648,10 @@ public class PaperConfig { } } } diff --git a/patches/server/0785-Send-full-pos-packets-for-hard-colliding-entities.patch b/patches/server/0785-Send-full-pos-packets-for-hard-colliding-entities.patch index 13ca0265b..79c80daac 100644 --- a/patches/server/0785-Send-full-pos-packets-for-hard-colliding-entities.patch +++ b/patches/server/0785-Send-full-pos-packets-for-hard-colliding-entities.patch @@ -9,10 +9,10 @@ Configurable under `send-full-pos-for-hard-colliding-entities` diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 31662010b1c3d3fb9f667afd13e33e0a35005867..b3f4ac2ce6f515e406d2f31b1d2429729c9e2b60 100644 +index cf9a72b7fe0b41e1ca68bbae2164162447405fc5..0940655792402ed29a1ec80a2a6fb2f100de4659 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -651,4 +651,10 @@ public class PaperConfig { +@@ -654,4 +654,10 @@ public class PaperConfig { private static void lagCompensateBlockBreaking() { lagCompensateBlockBreaking = getBoolean("settings.lag-compensate-block-breaking", true); } diff --git a/patches/server/0792-Optimise-nearby-player-lookups.patch b/patches/server/0792-Optimise-nearby-player-lookups.patch index ebf0282c0..7ac99c624 100644 --- a/patches/server/0792-Optimise-nearby-player-lookups.patch +++ b/patches/server/0792-Optimise-nearby-player-lookups.patch @@ -26,7 +26,7 @@ index 4588ae8037407b81c99135863eb0c4e97c564c24..2a33071c4b69cb7b5a7e296e8fd903e3 // Paper end - optimise isOutsideOfRange long lastAutoSaveTime; // Paper - incremental autosave diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 87172ee94f5796a23c22c58bbb591dede2b2dc3c..955c42be5c5ed5c3a1a76e868da2087ced436e49 100644 +index 6522eb4b72c50be3ff7d1b094066a1cbec88634d..10d1e1f728519ad49379895c7fd3668badcbfd5a 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -217,6 +217,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -114,7 +114,7 @@ index 87172ee94f5796a23c22c58bbb591dede2b2dc3c..955c42be5c5ed5c3a1a76e868da2087c holder = new ChunkHolder(new ChunkPos(pos), level, this.level, this.lightEngine, this.queueSorter, this); // Paper start diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index f512d68cbeb243fbef8fad73472ea6587112f889..796ae447fcc305335fe943fc6d97e21422f406b1 100644 +index ed696ed93251e644c2b71e468e2556d24b273933..3afb8b91dceb86e88b848462a5b8dbd5c8365239 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -392,6 +392,83 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -217,7 +217,7 @@ index f512d68cbeb243fbef8fad73472ea6587112f889..796ae447fcc305335fe943fc6d97e214 this.handlingTick = true; diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index bada11542390b7575466f0e7062470665b8266c4..8a864238e154e2131834d013652746b7e7a78c97 100644 +index 5f4556505d831ea45e576a4c4e10f99e1353684e..55d07e70a67e08bab3a7a66076c980986736e5b8 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -789,7 +789,12 @@ public abstract class Mob extends LivingEntity { @@ -226,7 +226,7 @@ index bada11542390b7575466f0e7062470665b8266c4..8a864238e154e2131834d013652746b7 } else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) { - Player entityhuman = this.level.findNearbyPlayer(this, -1.0D, EntitySelector.affectsSpawning); // Paper + // Paper start - optimise checkDespawn -+ Player entityhuman = this.level.findNearbyPlayer(this, level.paperConfig.hardDespawnDistance + 1, EntitySelector.affectsSpawning); // Paper ++ Player entityhuman = this.level.findNearbyPlayer(this, level.paperConfig.hardDespawnDistances.getInt(this.getType().getCategory()) + 1, EntitySelector.affectsSpawning); // Paper + if (entityhuman == null) { + entityhuman = ((ServerLevel)this.level).playersAffectingSpawning.isEmpty() ? null : ((ServerLevel)this.level).playersAffectingSpawning.get(0); + } @@ -309,7 +309,7 @@ index 64d5e71a8a26116385cee195d86fce1ef1574a8c..f936e9f9a9fa655fa997d6862b5ed54c protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, final DimensionType dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { // Paper - Anti-Xray - Pass executor this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index d69abf154f056883dcd6dc4d9d97d2b772b62368..e588ac628ac855ec13004ae4a212e01637e524fa 100644 +index 4d8251a961a9c52456db997506dd9691beaec022..55dd04816886d27a62856ac952d2fc5d15bf40e6 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java @@ -267,7 +267,7 @@ public final class NaturalSpawner { diff --git a/patches/server/0800-Configurable-feature-seeds.patch b/patches/server/0800-Configurable-feature-seeds.patch index d05e3f8e1..b6cc639df 100644 --- a/patches/server/0800-Configurable-feature-seeds.patch +++ b/patches/server/0800-Configurable-feature-seeds.patch @@ -19,10 +19,10 @@ index 7d44abcb4fff9717a1af55879deb7eb9c2d9e7e9..e29b0a90019b12bd6586ad0f7b5314f3 } final Object val = config.get(key); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index fd7ac4be153538dcee60fade6e7a00f57770e97f..beab9b5701a32a34bcb739920ff3c0106ede7530 100644 +index 410e1e67ca625fc01553d61c2b0eaeec10317e5e..0a611df010c9c5e621f10ae55a0ce66fd0cae0e2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -927,6 +927,55 @@ public class PaperWorldConfig { +@@ -972,6 +972,55 @@ public class PaperWorldConfig { return table; } diff --git a/patches/server/0803-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0803-Add-paper-mobcaps-and-paper-playermobcaps.patch index 7a00e3678..b03a1ed14 100644 --- a/patches/server/0803-Add-paper-mobcaps-and-paper-playermobcaps.patch +++ b/patches/server/0803-Add-paper-mobcaps-and-paper-playermobcaps.patch @@ -270,7 +270,7 @@ index 2ef4b4c2ff81d0fa33d4630593266066d8e6a6f3..34bc24403a83ae578d2fc3956b488389 List worlds; if (args.length < 2 || args[1].equals("*")) { diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index e588ac628ac855ec13004ae4a212e01637e524fa..0c857fce997d918d1552f7d1e8695e7908df8b3c 100644 +index 55dd04816886d27a62856ac952d2fc5d15bf40e6..790999fea74e4d03a80a4c0c9665af87bd683577 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java @@ -145,32 +145,16 @@ public final class NaturalSpawner { diff --git a/patches/server/0811-Preserve-overstacked-loot.patch b/patches/server/0811-Preserve-overstacked-loot.patch index 61051a5ad..abfc26f1d 100644 --- a/patches/server/0811-Preserve-overstacked-loot.patch +++ b/patches/server/0811-Preserve-overstacked-loot.patch @@ -10,10 +10,10 @@ chunk bans via the large amount of NBT created by unstacking the items. Fixes GH-5140 and GH-4748. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9a3f75288b1d743a7ec4bfd663c1c2988678d3e6..416ecbdf244716c2fb1277d7d1df697fe6f77756 100644 +index 0a611df010c9c5e621f10ae55a0ce66fd0cae0e2..0906a2d410e11cb352b13e5c0390560085b8f254 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -887,6 +887,11 @@ public class PaperWorldConfig { +@@ -932,6 +932,11 @@ public class PaperWorldConfig { allowPlayerCrammingDamage = getBoolean("allow-player-cramming-damage", allowPlayerCrammingDamage); } diff --git a/patches/server/0815-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch b/patches/server/0815-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch index 69b618359..351633a78 100644 --- a/patches/server/0815-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch +++ b/patches/server/0815-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Dont count named piglins and hoglins towards mob cap diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index 0c857fce997d918d1552f7d1e8695e7908df8b3c..bacd75f67f783f49208a74501cc7e6e7485010a4 100644 +index 0b228b8bcae5ed2840ab244b6de35732f737504d..f316585ccf6baf5e7e514ba3a68b4344e781a82d 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java @@ -83,7 +83,7 @@ public final class NaturalSpawner { diff --git a/patches/server/0819-Add-config-option-for-logging-player-ip-addresses.patch b/patches/server/0819-Add-config-option-for-logging-player-ip-addresses.patch index dfc59ef97..e4c7591bd 100644 --- a/patches/server/0819-Add-config-option-for-logging-player-ip-addresses.patch +++ b/patches/server/0819-Add-config-option-for-logging-player-ip-addresses.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/j index b3f4ac2ce6f515e406d2f31b1d2429729c9e2b60..0277627e97b51e20470ccf578cee48470e06a34b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -486,6 +486,11 @@ public class PaperConfig { +@@ -489,6 +489,11 @@ public class PaperConfig { } } diff --git a/patches/server/0820-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/server/0820-Add-methods-to-find-targets-for-lightning-strikes.patch index 19fded74b..37fb35866 100644 --- a/patches/server/0820-Add-methods-to-find-targets-for-lightning-strikes.patch +++ b/patches/server/0820-Add-methods-to-find-targets-for-lightning-strikes.patch @@ -29,10 +29,10 @@ index 08c6ea9f19fa9218af089ed3bd2dcda1e83591ed..710a1064cec9c7ec93e1258b0786e74a blockposition1 = blockposition1.above(2); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8c238a445b327e24d8152b36ebc2b1b57e73d0e1..00d8b61c04ac91770b0ff3b846d3ff70bef2e8e7 100644 +index e5e23c907d49ee64218f3302e2a2323d6937a8a1..858e29ad77aee8a1b7797c2d82902abbfd662da2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -700,6 +700,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -701,6 +701,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (LightningStrike) lightning.getBukkitEntity(); }