diff --git a/gradle.properties b/gradle.properties index 6fef6465..7eef5a90 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,5 +4,5 @@ version=1.20.2-R0.1-SNAPSHOT mcVersion=1.20.2 packageVersion=1_20_R2 org.gradle.jvmargs=-Xmx2G -paperRef=0f69290f07f16e7423f82dc2d3f4d258af0e2f44 +paperRef=cfe311d7a51eeb9e14c526f57efab9837f30c5d0 preVersion=true diff --git a/patches/server/0001-Build-changes.patch b/patches/server/0001-Build-changes.patch index 3216698c..772c9070 100644 --- a/patches/server/0001-Build-changes.patch +++ b/patches/server/0001-Build-changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Build changes diff --git a/build.gradle.kts b/build.gradle.kts -index 683159586641dd9aa42ae96fa51602469755723f..a0fbd152b6933e198b47abb13acec9004c91d27f 100644 +index c187641f0ec6444a10e0e1583e1697d07e8f0267..b54e07850c3eb8120a8d70d7b4192db7e5ac24a7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,8 +13,12 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { @@ -64,15 +64,6 @@ index 683159586641dd9aa42ae96fa51602469755723f..a0fbd152b6933e198b47abb13acec900 mainClass.set("org.bukkit.craftbukkit.Main") standardInput = System.`in` workingDir = rootProject.layout.projectDirectory -@@ -212,7 +226,6 @@ val runtimeClasspathForRunDev = sourceSets.main.flatMap { src -> - } - tasks.registerRunTask("runDev") { - description = "Spin up a non-relocated Mojang-mapped test server" -- classpath(tasks.filterProjectDir.flatMap { it.outputJar }) -- classpath(runtimeClasspathForRunDev) -+ classpath(sourceSets.main.map { it.runtimeClasspath }) // Leaves - fix it for windows - jvmArgs("-DPaper.isRunDev=true") - } diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java index 4b002e8b75d117b726b0de274a76d3596fce015b..9ce4d3d96d2d5fbde1f0af599209c6c55038fb58 100644 --- a/src/main/java/com/destroystokyo/paper/Metrics.java @@ -193,7 +184,7 @@ index dbccbcb9b44e4efacdf53c2d161115cc20b36cff..81e3d3dbc74e238c76ead4a0b6efaa2a this.setFlightAllowed(dedicatedserverproperties.allowFlight); this.setMotd(dedicatedserverproperties.motd); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index fcd5096d64edfaf6bce3ecce8c9b9afb84462786..fab14ca6965d903df220e0f7d0e73e20cfb5f2b1 100644 +index b7e7e6ed60f55d2ab5e4fcefb3638ad1768c3b7f..47b05f315a744b0ad0daa9d354ac1229be5374ce 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -267,7 +267,7 @@ import javax.annotation.Nullable; // Paper diff --git a/patches/server/0002-Delete-Timings.patch b/patches/server/0002-Delete-Timings.patch index c9a96802..0fc9fc23 100644 --- a/patches/server/0002-Delete-Timings.patch +++ b/patches/server/0002-Delete-Timings.patch @@ -784,20 +784,20 @@ index b66a7d4aab887309579154815a0d4abf9de506b0..e4d3f280b35d977f28233b1db1dc855c } diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java -index 97a9ce438afc9094dca4a44cb25b37d5f88dcf43..330413408d8e3c69ca6f0725f810de2f4b00824c 100644 +index a6f58b3457b7477015c5c6d969e7d83017dd3fa1..52ad7912737f5e9affa3bfef2af55e52da67c778 100644 --- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java +++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java @@ -1,6 +1,5 @@ package io.papermc.paper.configuration; -import co.aikar.timings.MinecraftTimings; - import io.papermc.paper.configuration.constraint.Constraint; + import com.mojang.logging.LogUtils; import io.papermc.paper.configuration.constraint.Constraints; - import io.papermc.paper.configuration.type.IntOr; -@@ -104,7 +103,6 @@ public class GlobalConfiguration extends ConfigurationPart { + import io.papermc.paper.configuration.type.number.IntOr; +@@ -109,7 +108,6 @@ public class GlobalConfiguration extends ConfigurationPart { - @Override - public void postProcess() { + @PostProcess + private void postProcess() { - MinecraftTimings.processConfig(this); } } @@ -1400,7 +1400,7 @@ index 17b6925b46f8386dcfc561483693de516465ec12..950b9d4ef4a9cb0e3f2ff083d84f1ebb gameprofilerfiller.pop(); this.chunkMap.tick(); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 868951dc21aff541765b1f58f08cdf3c47446d25..8d4d9af86f0d6e479607d69d6acfcc3dc04e7af9 100644 +index 51d282b524b5249438f7744f7f0b1cc27b76470e..bcf652a6ea6d3d2c9d092d726a0e22b8cfc28646 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1,7 +1,6 @@ diff --git a/patches/server/0005-Leaves-Server-Config-And-Command.patch b/patches/server/0005-Leaves-Server-Config-And-Command.patch index ef39500e..36f83fa7 100644 --- a/patches/server/0005-Leaves-Server-Config-And-Command.patch +++ b/patches/server/0005-Leaves-Server-Config-And-Command.patch @@ -68,7 +68,7 @@ index 0cd2163fcca1908f4b0a1dea952afc968cf16a3b..219f4c7368ce6b805f3f4cffd8e3f65b this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index fab14ca6965d903df220e0f7d0e73e20cfb5f2b1..c7120a96ae8277dceecb3f7953423f40ab6b8e9c 100644 +index 47b05f315a744b0ad0daa9d354ac1229be5374ce..3b5d0a2cdeb014be13bb92c7674cc9f84d86f335 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1039,6 +1039,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0006-Leaves-Protocol-Core.patch b/patches/server/0006-Leaves-Protocol-Core.patch index f89a9a28..77bb001c 100644 --- a/patches/server/0006-Leaves-Protocol-Core.patch +++ b/patches/server/0006-Leaves-Protocol-Core.patch @@ -77,7 +77,7 @@ index 699ad5ac3c0428c9f41626e43c16c211aec5d409..b58dea1fd418fa3199b403df079f8799 ServerLevel worldserver = entityplayer.serverLevel(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c7120a96ae8277dceecb3f7953423f40ab6b8e9c..f4f11103674860b676f11a867feadaf8c285d5c6 100644 +index 3b5d0a2cdeb014be13bb92c7674cc9f84d86f335..57696b8fe6eec4c0431ef873c980d37f31ff805b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -470,6 +470,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0008-Fix-trading-with-the-void.patch b/patches/server/0008-Fix-trading-with-the-void.patch index 3514bf92..b9560ee5 100644 --- a/patches/server/0008-Fix-trading-with-the-void.patch +++ b/patches/server/0008-Fix-trading-with-the-void.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix trading with the void diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 8d4d9af86f0d6e479607d69d6acfcc3dc04e7af9..32c5001be0e4be1d571d444c8fe6a88e3cd05bfe 100644 +index bcf652a6ea6d3d2c9d092d726a0e22b8cfc28646..bb75a3d6b57c6523a95b11436ebc7577218264a0 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2753,11 +2753,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0010-Fakeplayer-support.patch b/patches/server/0010-Fakeplayer-support.patch index c67cf183..ca36abab 100644 --- a/patches/server/0010-Fakeplayer-support.patch +++ b/patches/server/0010-Fakeplayer-support.patch @@ -364,7 +364,7 @@ index dfeb3e336e06ef01f5401a362755030db942bb07..c51413bf02b3572a05f09d2f0d02493d if (randomsource.nextInt(j) >= world.paperConfig().entities.behavior.playerInsomniaStartTicks) { // Paper BlockPos blockposition1 = blockposition.above(20 + randomsource.nextInt(15)).east(-10 + randomsource.nextInt(21)).south(-10 + randomsource.nextInt(21)); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f4f11103674860b676f11a867feadaf8c285d5c6..8d74a6b34ae4abefaa4ad5c4387bea6236e7f97c 100644 +index 57696b8fe6eec4c0431ef873c980d37f31ff805b..c2909d4c275714e0751210847798da70dfd9ab70 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -262,6 +262,7 @@ import org.yaml.snakeyaml.constructor.SafeConstructor; @@ -383,7 +383,7 @@ index f4f11103674860b676f11a867feadaf8c285d5c6..8d74a6b34ae4abefaa4ad5c4387bea62 // Paper start - Folia region threading API private final io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler regionizedScheduler = new io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler(); -@@ -3140,4 +3142,11 @@ public final class CraftServer implements Server { +@@ -3145,4 +3147,11 @@ public final class CraftServer implements Server { } // Paper end @@ -396,7 +396,7 @@ index f4f11103674860b676f11a867feadaf8c285d5c6..8d74a6b34ae4abefaa4ad5c4387bea62 + // Leaves end - Bot API } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index e932cfac619c30b8c7444a9fa41e0403a6eadf6a..8818daa3e89fd5a5b0a0ea4069ccbf0f15aed9aa 100644 +index 315d8260e196709ed9084272aa640f11e327c0a8..e7b7e1f670ec90b130f6388a5c9ded271b18fb01 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -194,6 +194,8 @@ import org.bukkit.plugin.Plugin; diff --git a/patches/server/0026-Move-ThreadUnsafeRandom-Initialization.patch b/patches/server/0026-Move-ThreadUnsafeRandom-Initialization.patch index 4e26d5a2..b06d4242 100644 --- a/patches/server/0026-Move-ThreadUnsafeRandom-Initialization.patch +++ b/patches/server/0026-Move-ThreadUnsafeRandom-Initialization.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Move ThreadUnsafeRandom Initialization This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 32c5001be0e4be1d571d444c8fe6a88e3cd05bfe..2db76acc04cf784efde422c000bccd766abeff27 100644 +index bb75a3d6b57c6523a95b11436ebc7577218264a0..244cf1e0b1f767a41f0a863e77b58c66ee3ff71f 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -945,7 +945,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0027-Optimize-random-calls-in-chunk-ticking.patch b/patches/server/0027-Optimize-random-calls-in-chunk-ticking.patch index 6d0f6bdc..c0001ca6 100644 --- a/patches/server/0027-Optimize-random-calls-in-chunk-ticking.patch +++ b/patches/server/0027-Optimize-random-calls-in-chunk-ticking.patch @@ -22,7 +22,7 @@ index 950b9d4ef4a9cb0e3f2ff083d84f1ebb2c642ebd..45cac95d44509ec8fcc46177a47c3073 boolean flag1 = level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 2db76acc04cf784efde422c000bccd766abeff27..7d1188efd22cef02acfae2354de55e71fdad6fe4 100644 +index 244cf1e0b1f767a41f0a863e77b58c66ee3ff71f..897d7f9abacfea2aae2f6e067065c55333a0b391 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -948,6 +948,13 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0033-Remove-lambda-from-ticking-guard.patch b/patches/server/0033-Remove-lambda-from-ticking-guard.patch index 7ef307b9..89115708 100644 --- a/patches/server/0033-Remove-lambda-from-ticking-guard.patch +++ b/patches/server/0033-Remove-lambda-from-ticking-guard.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Remove lambda from ticking guard This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 7d1188efd22cef02acfae2354de55e71fdad6fe4..54d380e5c454891c76f31112c94e8bb87a4bee3b 100644 +index 897d7f9abacfea2aae2f6e067065c55333a0b391..dd3e223c40ff2514df5e2ca1ff5d27f42f3a0cf8 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -882,7 +882,24 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0051-MC-Technical-Survival-Mode.patch b/patches/server/0051-MC-Technical-Survival-Mode.patch index b064d43c..4f091aa4 100644 --- a/patches/server/0051-MC-Technical-Survival-Mode.patch +++ b/patches/server/0051-MC-Technical-Survival-Mode.patch @@ -19,10 +19,10 @@ index 8e52ebe8d12f5da3d877b0e4ff3723229fb47db1..b9a45dfd024c966ac93eaa15a42f4e2c final long timeout; if (type == RegionizedPlayerChunkLoader.REGION_PLAYER_TICKET && delayTimeout > 0) { diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java -index 9b5c2abaa28fa60cedd9f0111e5eb018f93a0561..630549fd00a939dddf5b5a5ea63004c657a5ceab 100644 +index 9e8b8de907654050c51400286af971caca87d6bd..e39ecb625f13ebc37cb4c7e0da7077e054bb39f6 100644 --- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java +++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java -@@ -303,6 +303,7 @@ public class PaperConfigurations extends Configurations { diff --git a/patches/server/0091-Disable-packet-limit.patch b/patches/server/0091-Disable-packet-limit.patch index 31465ea4..e6cc8985 100644 --- a/patches/server/0091-Disable-packet-limit.patch +++ b/patches/server/0091-Disable-packet-limit.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable packet limit diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java -index 330413408d8e3c69ca6f0725f810de2f4b00824c..421321d41efc71c1a6e1f7943031c0c039c000ce 100644 +index 52ad7912737f5e9affa3bfef2af55e52da67c778..f11fb68e0657e0178d559ffcbcf69e114cddba44 100644 --- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java +++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java -@@ -249,7 +249,7 @@ public class GlobalConfiguration extends ConfigurationPart { +@@ -262,7 +262,7 @@ public class GlobalConfiguration extends ConfigurationPart { } public boolean isEnabled() { diff --git a/patches/server/0092-Reduce-array-allocations.patch b/patches/server/0092-Reduce-array-allocations.patch index 8b251837..11f652c6 100644 --- a/patches/server/0092-Reduce-array-allocations.patch +++ b/patches/server/0092-Reduce-array-allocations.patch @@ -227,7 +227,7 @@ index b0517b9483a8cfd74997f89efdc0d8559b80ae4a..e7cfc98aa6dc19c5adad4c797ae7292a for (int j = 0; j < i; ++j) { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 66b95197df737fac490a1b22949ab3855a7fce59..6e30d82b3216f8b7303b4c76d76f57a76f0e6c45 100644 +index 43ecfa535416e50d74f182b0571f5cd3279c47dc..8d7af30d229038c0c83bee2d9e5c6d562152a34e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -172,6 +172,7 @@ import org.bukkit.event.weather.LightningStrikeEvent; diff --git a/patches/server/0110-Replay-Mod-API.patch b/patches/server/0110-Replay-Mod-API.patch index 9df594d3..0ec81939 100644 --- a/patches/server/0110-Replay-Mod-API.patch +++ b/patches/server/0110-Replay-Mod-API.patch @@ -334,7 +334,7 @@ index 234abc2192339c3e28a53561b05578fb0847d5d9..ca079dcd63d076e30a20c9bf09d53df3 this.server.getCustomBossEvents().onPlayerDisconnect(entityplayer); UUID uuid = entityplayer.getUUID(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8d74a6b34ae4abefaa4ad5c4387bea6236e7f97c..affd74c2f612b87bba94c71fe7afc6be8516b848 100644 +index c2909d4c275714e0751210847798da70dfd9ab70..2046f43b1a4108cee1d7cd59a0d20426c25b03cb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -263,6 +263,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; @@ -362,7 +362,7 @@ index 8d74a6b34ae4abefaa4ad5c4387bea6236e7f97c..affd74c2f612b87bba94c71fe7afc6be @Override public CraftPlayer apply(ServerPlayer player) { return player.getBukkitEntity(); -@@ -3149,4 +3151,11 @@ public final class CraftServer implements Server { +@@ -3154,4 +3156,11 @@ public final class CraftServer implements Server { return botManager; } // Leaves end - Bot API @@ -375,7 +375,7 @@ index 8d74a6b34ae4abefaa4ad5c4387bea6236e7f97c..affd74c2f612b87bba94c71fe7afc6be + // Leaves end - replay mod api } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 8818daa3e89fd5a5b0a0ea4069ccbf0f15aed9aa..1bfc34aed8795d45437596e8152e965c4550c328 100644 +index e7b7e1f670ec90b130f6388a5c9ded271b18fb01..1056b7dc2462248877cbe47e130c2d9c86766126 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -198,6 +198,8 @@ import top.leavesmc.leaves.bot.ServerBot; diff --git a/patches/server/0116-Loot-world-random.patch b/patches/server/0116-Loot-world-random.patch index 3c3bcf7e..faf34ef0 100644 --- a/patches/server/0116-Loot-world-random.patch +++ b/patches/server/0116-Loot-world-random.patch @@ -48,10 +48,10 @@ index d042b04108c3fe244caa6b9fc293c83ac7200a57..dd63d7893d12c9378192f5415231d7ec return randomId.map(serverLevel::getRandomSequence); }).orElseGet(serverLevel::getRandom); diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java b/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java -index 5373070034cefbbfa797c675ce698637b526a2c8..806d1528ae1c6070ebd81b34b01d0d836af0ab6a 100644 +index 05af6fa0585406c4922d2eb174f7e53f4269acd6..3fcbb53f1244adc46e1bdf681f72598b10fb6fb1 100644 --- a/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java +++ b/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java -@@ -131,6 +131,12 @@ public class LootTable { +@@ -132,6 +132,12 @@ public class LootTable { return this.getRandomItems((new LootContext.Builder(parameters)).create(this.randomSequence)); }