diff --git a/build.gradle.kts b/build.gradle.kts index d34dfa3..54fcc41 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ plugins { java `maven-publish` id("com.github.johnrengelman.shadow") version "8.1.1" apply false - id("io.papermc.paperweight.patcher") version "1.5.10" + id("io.papermc.paperweight.patcher") version "1.5.11" } allprojects { diff --git a/gradle.properties b/gradle.properties index 07556f5..2e6af49 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ group=org.galemc.gale -version=1.20.2-R0.1-SNAPSHOT +version=1.20.4-R0.1-SNAPSHOT -mcVersion=1.20.2 -paperRef=931781c220b98dde0159c9a3c8dce06c3b2b1e13 +mcVersion=1.20.4 +paperRef=7e15d977ecce23ee72b059e9be292d983a336c50 org.gradle.caching=true org.gradle.parallel=true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7f93135..d64cd49 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3fa8f86..1af9e09 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/patches/api/0001-Hide-irrelevant-compilation-warnings.patch b/patches/api/0001-Hide-irrelevant-compilation-warnings.patch index 6ca9a93..75b63fe 100644 --- a/patches/api/0001-Hide-irrelevant-compilation-warnings.patch +++ b/patches/api/0001-Hide-irrelevant-compilation-warnings.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/build.gradle.kts b/build.gradle.kts -index e827ee211e3c65dc68ac5867fd8476639df63645..d48dade97bbae435fafbd5508664c9b66308cad7 100644 +index 9d817bf3f26ffd484945a00a6538970eca22ee20..4f979f05a05448d46f866779729fc57c98e46dd5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -106,6 +106,15 @@ val generateApiVersioningFile by tasks.registering { +@@ -109,6 +109,15 @@ val generateApiVersioningFile by tasks.registering { } } @@ -26,7 +26,7 @@ index e827ee211e3c65dc68ac5867fd8476639df63645..d48dade97bbae435fafbd5508664c9b6 tasks.jar { from(generateApiVersioningFile.map { it.outputs.files.singleFile }) { into("META-INF/maven/${project.group}/${project.name}") -@@ -163,6 +172,8 @@ tasks.withType { +@@ -166,6 +175,8 @@ tasks.withType { into("build/docs/javadoc") } } diff --git a/patches/api/0002-Gale-branding-changes.patch b/patches/api/0002-Gale-branding-changes.patch index fb541e6..0294b9c 100644 --- a/patches/api/0002-Gale-branding-changes.patch +++ b/patches/api/0002-Gale-branding-changes.patch @@ -46,10 +46,10 @@ index 94a9ed024d3859793618152ea559a168bbcbb5e2..e60008693e017bec1b4eb49c84be3898 -. +. diff --git a/build.gradle.kts b/build.gradle.kts -index d48dade97bbae435fafbd5508664c9b66308cad7..8ca9d7dfdad93c5d162c75399816d704c5184ca8 100644 +index 4f979f05a05448d46f866779729fc57c98e46dd5..2ae5fc85ed538da29af0faa68421175942fcbeb6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -124,6 +124,12 @@ tasks.jar { +@@ -127,6 +127,12 @@ tasks.jar { "Automatic-Module-Name" to "org.bukkit" ) } diff --git a/patches/api/0005-SIMD-support.patch b/patches/api/0005-SIMD-support.patch index cf0d9c4..e564f9d 100644 --- a/patches/api/0005-SIMD-support.patch +++ b/patches/api/0005-SIMD-support.patch @@ -13,10 +13,10 @@ As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/build.gradle.kts b/build.gradle.kts -index 8ca9d7dfdad93c5d162c75399816d704c5184ca8..6be021dcdef8283db51baa25e74570473afb9063 100644 +index 2ae5fc85ed538da29af0faa68421175942fcbeb6..2149d23d695e0dd8ebab9f049ee6c3a164b5918b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -112,6 +112,7 @@ tasks.withType { +@@ -115,6 +115,7 @@ tasks.withType { compilerArgs.add("-Xlint:-module") compilerArgs.add("-Xlint:-removal") compilerArgs.add("-Xlint:-dep-ann") @@ -24,7 +24,7 @@ index 8ca9d7dfdad93c5d162c75399816d704c5184ca8..6be021dcdef8283db51baa25e7457047 } // Gale end - hide irrelevant compilation warnings -@@ -180,6 +181,7 @@ tasks.withType { +@@ -183,6 +184,7 @@ tasks.withType { } options.addStringOption("Xdoclint:none", "-quiet") // Gale - hide irrelevant compilation warnings diff --git a/patches/api/0008-Player-canSee-by-entity-UUID.patch b/patches/api/0008-Player-canSee-by-entity-UUID.patch index 0baa2c9..53dd498 100644 --- a/patches/api/0008-Player-canSee-by-entity-UUID.patch +++ b/patches/api/0008-Player-canSee-by-entity-UUID.patch @@ -37,19 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 47fcfa2a3358766dfda2efc9bbcf5b50e3f2f7c1..a47be0fb0220e46cc360729fdf6cc113cdd05a39 100644 +index a8d3451ccfcd21a9e80adc2feab8fc9c2926c753..d323109ef01bcd31970a749854eeaf8805e8de6b 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -7,6 +7,8 @@ import java.time.Instant; - import java.util.Collection; - import java.util.Date; - import java.util.Map; -+import java.util.UUID; -+ - import org.bukkit.BanEntry; - import org.bukkit.DyeColor; - import org.bukkit.Effect; -@@ -1927,6 +1929,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1928,6 +1928,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM boolean listPlayer(@NotNull Player other); // Paper end diff --git a/patches/server/0001-Gale-project-setup.patch b/patches/server/0001-Gale-project-setup.patch index ac99d82..a8d9abc 100644 --- a/patches/server/0001-Gale-project-setup.patch +++ b/patches/server/0001-Gale-project-setup.patch @@ -7,20 +7,20 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/build.gradle.kts b/build.gradle.kts -index 57f2c414dbfe127c193002fbc8eeb22e94e9cb55..f84011f83ebf238023ae6900873b0dfc9dfd0bd4 100644 +index 170a915098f09ace226648da342a04c5c7583d11..7d3a506ed7c4e966baf5c17fba76fd08ac218e3b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -13,8 +13,14 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { - val alsoShade: Configuration by configurations.creating +@@ -27,8 +27,14 @@ repositories { dependencies { + extraRuntime(platform("net.kyori:adventure-bom:4.15.0-SNAPSHOT")) - implementation(project(":paper-api")) - implementation(project(":paper-mojangapi")) + // Gale start - project setup + // Depend on own API + implementation(project(":gale-api")) + // Depend on Paper MojangAPI -+ implementation("io.papermc.paper:paper-mojangapi:1.20.1-R0.1-SNAPSHOT") { ++ implementation("io.papermc.paper:paper-mojangapi:${project.version}") { + exclude("io.papermc.paper", "paper-api") + } + // Gale end - project setup diff --git a/patches/server/0002-Dev-import-deobfuscation-fixes.patch b/patches/server/0002-Dev-import-deobfuscation-fixes.patch index a95ab19..934dcfa 100644 --- a/patches/server/0002-Dev-import-deobfuscation-fixes.patch +++ b/patches/server/0002-Dev-import-deobfuscation-fixes.patch @@ -93,10 +93,10 @@ index 50a9f33aa31e9273c7c52d4bb2b02f0f884f7ba5..19779298b2b2ecbe30f9308dad1d8037 }); return Collections.unmodifiableCollection(list); diff --git a/src/main/java/net/minecraft/util/ExtraCodecs.java b/src/main/java/net/minecraft/util/ExtraCodecs.java -index 607f32b856c6c1fb81d3f1604f3bf3fb240d713f..251f94885bd7758d8804def5ae9d3acd62cfd7ac 100644 +index fc10422e91d01615db15c750ae5d9f83d1bec94e..eafd1acdca9d34804b1894694f1856d5af6c1e51 100644 --- a/src/main/java/net/minecraft/util/ExtraCodecs.java +++ b/src/main/java/net/minecraft/util/ExtraCodecs.java -@@ -223,7 +223,7 @@ public class ExtraCodecs { +@@ -219,7 +219,7 @@ public class ExtraCodecs { }) : DataResult.success(is[0]); }, Character::toString); public static Codec RESOURCE_PATH_CODEC = validate(Codec.STRING, (path) -> { @@ -105,7 +105,7 @@ index 607f32b856c6c1fb81d3f1604f3bf3fb240d713f..251f94885bd7758d8804def5ae9d3acd return "Invalid string to use as a resource path element: " + path; }) : DataResult.success(path); }); -@@ -261,7 +261,7 @@ public class ExtraCodecs { +@@ -247,7 +247,7 @@ public class ExtraCodecs { return ImmutableList.of(leftFunction.apply(pair), rightFunction.apply(pair)); }); Codec codec3 = RecordCodecBuilder.create((instance) -> { @@ -114,7 +114,7 @@ index 607f32b856c6c1fb81d3f1604f3bf3fb240d713f..251f94885bd7758d8804def5ae9d3acd }).comapFlatMap((pair) -> { return combineFunction.apply((P)pair.getFirst(), (P)pair.getSecond()); }, (pair) -> { -@@ -286,7 +286,7 @@ public class ExtraCodecs { +@@ -272,7 +272,7 @@ public class ExtraCodecs { Optional> optional = dataResult.resultOrPartial(mutableObject::setValue); return optional.isPresent() ? dataResult : DataResult.error(() -> { return "(" + (String)mutableObject.getValue() + " -> using default)"; @@ -123,6 +123,28 @@ index 607f32b856c6c1fb81d3f1604f3bf3fb240d713f..251f94885bd7758d8804def5ae9d3acd } public DataResult coApply(DynamicOps dynamicOps, A objectx, DataResult dataResult) { +@@ -574,8 +574,10 @@ public class ExtraCodecs { + return object == null ? DataResult.error(() -> { + return "Missing \"" + typeKey + "\" in: " + mapLike; + }) : typeCodec.decode(dynamicOps, object).flatMap((pair) -> { +- T object = Objects.requireNonNullElseGet(mapLike.get(parametersKey), dynamicOps::emptyMap); +- return parametersCodecGetter.apply(pair.getFirst()).decode(dynamicOps, object).map(Pair::getFirst); ++ // Gale start - dev import deobfuscation fixes ++ T object2 = Objects.requireNonNullElseGet(mapLike.get(parametersKey), dynamicOps::emptyMap); ++ return parametersCodecGetter.apply(pair.getFirst()).decode(dynamicOps, object2).map(Pair::getFirst); ++ // Gale end - dev import deobfuscation fixes + }); + } + +@@ -591,7 +593,7 @@ public class ExtraCodecs { + } + + private DataResult encode(Codec codec, V value, DynamicOps ops) { +- return codec.encodeStart(ops, value); ++ return codec.encodeStart(ops, (V2) value); // Gale - dev import deobfuscation fixes + } + }; + } diff --git a/src/main/java/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java b/src/main/java/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java index 2e650637afede22d314bbe4dd4e91806ce88dcc3..8081a24eb5a533a55cdca3c882ccc61255b8a76c 100644 --- a/src/main/java/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java @@ -222,10 +244,10 @@ index d02ee11066fc4f07ccb110b09b86d895ff90d4f2..5d1a30e09870a5a535c71a2e44b8e693 @Override diff --git a/src/main/java/net/minecraft/world/item/BrushItem.java b/src/main/java/net/minecraft/world/item/BrushItem.java -index d2ae20ec96a51c5d217c3695d53eda492f9090bc..e111bbbba63ec53d709f23ad12b96c2d3766a146 100644 +index 1482f3c93be0768098eccd286971e5945f6456d7..f46c16dd6ff9cd09ea579eecf99ce78c7eb39d49 100644 --- a/src/main/java/net/minecraft/world/item/BrushItem.java +++ b/src/main/java/net/minecraft/world/item/BrushItem.java -@@ -86,8 +86,10 @@ public class BrushItem extends Item { +@@ -84,8 +84,10 @@ public class BrushItem extends Item { BlockEntity var18 = world.getBlockEntity(blockPos); if (var18 instanceof BrushableBlockEntity) { BrushableBlockEntity brushableBlockEntity = (BrushableBlockEntity)var18; diff --git a/patches/server/0003-Hide-irrelevant-compilation-warnings.patch b/patches/server/0003-Hide-irrelevant-compilation-warnings.patch index 796e036..409c75f 100644 --- a/patches/server/0003-Hide-irrelevant-compilation-warnings.patch +++ b/patches/server/0003-Hide-irrelevant-compilation-warnings.patch @@ -7,13 +7,13 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/build.gradle.kts b/build.gradle.kts -index 35f03651dfced13ff8bcfa79097f75324e7b4f51..ecd65a51efc9a43426e880ef85e13d71c8cc9537 100644 +index 7d3a506ed7c4e966baf5c17fba76fd08ac218e3b..a7291ed327c46cab88cdee0c889534986271463c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -64,6 +64,16 @@ dependencies { +@@ -78,6 +78,16 @@ dependencies { } - val craftbukkitPackageVersion = "1_20_R2" // Paper + val craftbukkitPackageVersion = "1_20_R3" // Paper + +// Gale start - hide irrelevant compilation warnings +tasks.withType { diff --git a/patches/server/0004-Enable-preview-features-for-development-runs.patch b/patches/server/0004-Enable-preview-features-for-development-runs.patch index a2f5f59..5eed4cd 100644 --- a/patches/server/0004-Enable-preview-features-for-development-runs.patch +++ b/patches/server/0004-Enable-preview-features-for-development-runs.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/build.gradle.kts b/build.gradle.kts -index ecd65a51efc9a43426e880ef85e13d71c8cc9537..9f224f18f9f31a9d890b4af4de990b017a126ffd 100644 +index a7291ed327c46cab88cdee0c889534986271463c..b66410965e6c18af9d1ad88496742816f37c402c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -194,6 +194,7 @@ fun TaskContainer.registerRunTask( +@@ -208,6 +208,7 @@ fun TaskContainer.registerRunTask( val memoryGb = providers.gradleProperty("paper.runMemoryGb").getOrElse("2") minHeapSize = "${memoryGb}G" maxHeapSize = "${memoryGb}G" diff --git a/patches/server/0005-Gale-branding-changes.patch b/patches/server/0005-Gale-branding-changes.patch index 6c2838d..42c8986 100644 --- a/patches/server/0005-Gale-branding-changes.patch +++ b/patches/server/0005-Gale-branding-changes.patch @@ -221,10 +221,10 @@ index 94a9ed024d3859793618152ea559a168bbcbb5e2..e60008693e017bec1b4eb49c84be3898 -. +. diff --git a/build.gradle.kts b/build.gradle.kts -index 9f224f18f9f31a9d890b4af4de990b017a126ffd..266e5e177b23b48eb880565dcafdc16419e516db 100644 +index b66410965e6c18af9d1ad88496742816f37c402c..c26c71c8613012c142be24711cb637717e07b6b8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -86,7 +86,7 @@ tasks.jar { +@@ -100,7 +100,7 @@ tasks.jar { attributes( "Main-Class" to "org.bukkit.craftbukkit.Main", "Implementation-Title" to "CraftBukkit", @@ -233,7 +233,7 @@ index 9f224f18f9f31a9d890b4af4de990b017a126ffd..266e5e177b23b48eb880565dcafdc164 "Implementation-Vendor" to date, // Paper "Specification-Title" to "Bukkit", "Specification-Version" to project.version, -@@ -231,3 +231,22 @@ tasks.registerRunTask("runDev") { +@@ -245,3 +245,22 @@ tasks.registerRunTask("runDev") { classpath(runtimeClasspathForRunDev) jvmArgs("-DPaper.isRunDev=true") } @@ -427,10 +427,10 @@ index c5d5648f4ca603ef2b1df723b58f9caf4dd3c722..e45e6b44b2a8f2cdae6e0048a812b921 .completer(new ConsoleCommandCompleter(this.server)) .option(LineReader.Option.COMPLETE_IN_WORD, true); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8f31413c939cc2b0454ad3d9a1b618dbae449d00..d3b16342a44dabb9e14451f68af65d2d6407ef85 100644 +index 34f19ac897a30c0c4e3ab406013fcca1c8b7db93..90a06994220979be88ce54c487809e1e7c1b5cdd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -908,7 +908,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLooppatch version is incremented for small changes that do not affect the goal of any feature, + * such as bug fixes, performance improvements or changes in wording. + */ -+ public static final @NotNull String version = "0.6.14"; ++ public static final @NotNull String version = "0.6.15"; + + /** + * The "major.minor" portion of the {@link #version}. diff --git a/patches/server/0008-Gale-configuration.patch b/patches/server/0008-Gale-configuration.patch index 9bbeed6..7c36cd3 100644 --- a/patches/server/0008-Gale-configuration.patch +++ b/patches/server/0008-Gale-configuration.patch @@ -188,7 +188,7 @@ index 8f23276796037d048eb114952891a01a40971b3e..ac9ceb54b894119cb30a22d37e035e2c } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d3b16342a44dabb9e14451f68af65d2d6407ef85..9d89b38ad6a0df62c920512c8873e4cb95210571 100644 +index 90a06994220979be88ce54c487809e1e7c1b5cdd..6bcfcc5bf869d63618b8df0d9382a0a37193fff1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -3,9 +3,6 @@ package net.minecraft.server; @@ -201,7 +201,7 @@ index d3b16342a44dabb9e14451f68af65d2d6407ef85..9d89b38ad6a0df62c920512c8873e4cb import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -86,7 +83,6 @@ import net.minecraft.server.level.ServerChunkCache; +@@ -85,7 +82,6 @@ import net.minecraft.server.level.ServerChunkCache; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.ServerPlayerGameMode; @@ -209,16 +209,16 @@ index d3b16342a44dabb9e14451f68af65d2d6407ef85..9d89b38ad6a0df62c920512c8873e4cb import net.minecraft.server.level.progress.ChunkProgressListener; import net.minecraft.server.level.progress.ChunkProgressListenerFactory; import net.minecraft.server.network.ServerConnectionListener; -@@ -109,7 +105,6 @@ import net.minecraft.util.NativeModuleLister; - import net.minecraft.util.ProgressListener; +@@ -109,7 +105,6 @@ import net.minecraft.util.ProgressListener; import net.minecraft.util.RandomSource; import net.minecraft.util.SignatureValidator; + import net.minecraft.util.TimeUtil; -import net.minecraft.util.Unit; import net.minecraft.util.datafix.DataFixers; import net.minecraft.util.profiling.EmptyProfileResults; import net.minecraft.util.profiling.ProfileResults; -@@ -160,6 +155,9 @@ import net.minecraft.world.level.storage.PrimaryLevelData; - import net.minecraft.world.level.storage.ServerLevelData; +@@ -152,6 +147,9 @@ import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; + import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager; import net.minecraft.world.level.storage.WorldData; import net.minecraft.world.level.storage.loot.LootDataManager; +import net.minecraft.world.phys.Vec2; @@ -227,7 +227,7 @@ index d3b16342a44dabb9e14451f68af65d2d6407ef85..9d89b38ad6a0df62c920512c8873e4cb import org.slf4j.Logger; // CraftBukkit start -@@ -300,6 +298,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop getTypeKey(); @@ -427,10 +427,10 @@ index 2354a0e5d15e9be633d9fe3a1a9feefe7b9b7782..e9ea666a09c9f04e37621bf38e61f698 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 d948e78fcd2d8e9af2a9c0057e9a52384b3b0951..8abeb9dc5c0e2fe95ea408fbaab9c359cb7cd69f 100644 +index 0929290650e17f08adfcb93b37554f22562f8a10..efebe795001058270ec92fdd8e86fd84589e8563 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1041,6 +1041,7 @@ public final class CraftServer implements Server { +@@ -1036,6 +1036,7 @@ public final class CraftServer implements Server { org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot this.console.paperConfigurations.reloadConfigs(this.console); @@ -438,7 +438,7 @@ index d948e78fcd2d8e9af2a9c0057e9a52384b3b0951..8abeb9dc5c0e2fe95ea408fbaab9c359 for (ServerLevel world : this.console.getAllLevels()) { // world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean)) -@@ -2978,6 +2979,14 @@ public final class CraftServer implements Server { +@@ -3010,6 +3011,14 @@ public final class CraftServer implements Server { return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console); } diff --git a/patches/server/0012-Include-server.properties-in-timings.patch b/patches/server/0012-Include-server.properties-in-timings.patch index 27cb83a..92910df 100644 --- a/patches/server/0012-Include-server.properties-in-timings.patch +++ b/patches/server/0012-Include-server.properties-in-timings.patch @@ -27,10 +27,10 @@ index 1b9d997c31ab281ce9f4719f53b0ad78a430789d..758cb80e64520ff085c4ef5ca8b2ed77 pair("bukkit", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)), // Gale start - Gale configuration - include in timings diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java -index c5598adb8cbcbcf7277c2fd4dd72c243d44d9700..4cd514fd09689c0d1527a53dfe8cb6acb280c1ee 100644 +index 1643186bcb2caf5d29fd551afd35830726dbb80a..96c79afbdc824257b4225a85ff9b2fe2d8310f57 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java -@@ -68,6 +68,7 @@ public class DedicatedServerProperties extends Settings { return s1.toLowerCase(Locale.ROOT); }, WorldPresets.NORMAL.location().toString())); -- this.serverResourcePackInfo = DedicatedServerProperties.getServerPackInfo(this.get("resource-pack", ""), this.get("resource-pack-sha1", ""), this.getLegacyString("resource-pack-hash"), this.get("require-resource-pack", false), this.get("resource-pack-prompt", "")); +- this.serverResourcePackInfo = DedicatedServerProperties.getServerPackInfo(this.get("resource-pack-id", ""), this.get("resource-pack", ""), this.get("resource-pack-sha1", ""), this.getLegacyString("resource-pack-hash"), this.get("require-resource-pack", false), this.get("resource-pack-prompt", "")); + // Gale start - include server.properties in timings + this.resourcePackPrompt = this.get("resource-pack-prompt", ""); -+ this.serverResourcePackInfo = DedicatedServerProperties.getServerPackInfo(this.get("resource-pack", ""), this.get("resource-pack-sha1", ""), this.getLegacyString("resource-pack-hash"), this.get("require-resource-pack", false), this.resourcePackPrompt); ++ this.serverResourcePackInfo = DedicatedServerProperties.getServerPackInfo(this.get("resource-pack-id", ""), this.get("resource-pack", ""), this.get("resource-pack-sha1", ""), this.getLegacyString("resource-pack-hash"), this.get("require-resource-pack", false), this.resourcePackPrompt); + // Gale end - include server.properties in timings this.initialDataPackConfiguration = DedicatedServerProperties.getDatapackConfig(this.get("initial-enabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getEnabled())), this.get("initial-disabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getDisabled()))); // Paper start - Configurable rcon ip diff --git a/patches/server/0016-Make-timings-calls-final.patch b/patches/server/0016-Make-timings-calls-final.patch index 906fc15..ec36ce3 100644 --- a/patches/server/0016-Make-timings-calls-final.patch +++ b/patches/server/0016-Make-timings-calls-final.patch @@ -7,11 +7,11 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7306cf0be43ad8673dc5aa28cfe26d1911127d30..2cf29a74159c9ed9fc2c92a3bbac07b0748e15ec 100644 +index 6bcfcc5bf869d63618b8df0d9382a0a37193fff1..fea67d65f4eed87d26086294b198f21bee4491df 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1369,7 +1369,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop parseresults, String s, String label) { // CraftBukkit +@@ -335,9 +333,6 @@ public class Commands { + public void performCommand(ParseResults parseresults, String s, String label) { // CraftBukkit CommandSourceStack commandlistenerwrapper = (CommandSourceStack) parseresults.getContext().getSource(); - commandlistenerwrapper.getServer().getProfiler().push(() -> { - return "/" + s; - }); -- - byte b0; + ContextChain contextchain = this.finishParsing(parseresults, s, commandlistenerwrapper, label); // CraftBukkit // Paper - make finishParsing not static -- try { -+ { // Gale - Purpur - remove vanilla profiler - byte b1; - - try { -@@ -401,8 +396,6 @@ public class Commands { - - b0 = 0; + try { +@@ -365,8 +360,6 @@ public class Commands { + commandlistenerwrapper.sendFailure(Component.literal(Util.describeError(exception))); + Commands.LOGGER.error("'/{}' threw an exception", s, exception); } - } finally { - commandlistenerwrapper.getServer().getProfiler().pop(); } - return b0; + } +@@ -436,7 +429,7 @@ public class Commands { + int j = minecraftserver.getGameRules().getInt(GameRules.RULE_MAX_COMMAND_FORK_COUNT); + + try { +- ExecutionContext executioncontext1 = new ExecutionContext<>(i, j, minecraftserver.getProfiler()); ++ ExecutionContext executioncontext1 = new ExecutionContext<>(i, j); // Gale - Purpur - remove vanilla profiler + + try { + Commands.CURRENT_EXECUTION_CONTEXT.set(executioncontext1); +diff --git a/src/main/java/net/minecraft/commands/execution/ExecutionContext.java b/src/main/java/net/minecraft/commands/execution/ExecutionContext.java +index 38854a047c6da7e2551f206478d17628e765168d..cc827443a812735336e18ff3c7b7f15a448e02d0 100644 +--- a/src/main/java/net/minecraft/commands/execution/ExecutionContext.java ++++ b/src/main/java/net/minecraft/commands/execution/ExecutionContext.java +@@ -20,7 +20,6 @@ public class ExecutionContext implements AutoCloseable { + private static final Logger LOGGER = LogUtils.getLogger(); + private final int commandLimit; + private final int forkLimit; +- private final ProfilerFiller profiler; + @Nullable + private TraceCallbacks tracer; + private int commandQuota; +@@ -29,10 +28,9 @@ public class ExecutionContext implements AutoCloseable { + private final List> newTopCommands = new ObjectArrayList<>(); + private int currentFrameDepth; + +- public ExecutionContext(int maxCommandChainLength, int maxCommandForkCount, ProfilerFiller profiler) { ++ public ExecutionContext(int maxCommandChainLength, int maxCommandForkCount) { // Gale - Purpur - remove vanilla profiler + this.commandLimit = maxCommandChainLength; + this.forkLimit = maxCommandForkCount; +- this.profiler = profiler; + this.commandQuota = maxCommandChainLength; + } + +@@ -128,7 +126,7 @@ public class ExecutionContext implements AutoCloseable { + } + + public ProfilerFiller profiler() { +- return this.profiler; ++ return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Gale - Purpur - remove vanilla profiler + } + + public int forkLimit() { +diff --git a/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java b/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java +index 821dc4aeaf48460000682604fba51b340b9738e7..4f4540ed9b3e603eec0d46fb5b58de24f27e734b 100644 +--- a/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java ++++ b/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java +@@ -23,9 +23,6 @@ public class ExecuteCommand> implements Unbo + + @Override + public void execute(T executionCommandSource, ExecutionContext executionContext, Frame frame) { +- executionContext.profiler().push(() -> { +- return "execute " + this.commandInput; +- }); + + try { + executionContext.incrementCost(); +@@ -36,8 +33,6 @@ public class ExecuteCommand> implements Unbo + } + } catch (CommandSyntaxException var9) { + executionCommandSource.handleError(var9, this.modifiers.isForked(), executionContext.tracer()); +- } finally { +- executionContext.profiler().pop(); + } + + } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 358330b182544fdeb9d9334c0c57d6ea84cc3776..3810c8e431258c030fcbe9788d24307a24872677 100644 +index fea67d65f4eed87d26086294b198f21bee4491df..557bfd1405603d1cd7e5210e406e63283947179b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -106,18 +106,9 @@ import net.minecraft.util.ProgressListener; - import net.minecraft.util.RandomSource; +@@ -106,18 +106,9 @@ import net.minecraft.util.RandomSource; import net.minecraft.util.SignatureValidator; + import net.minecraft.util.TimeUtil; import net.minecraft.util.datafix.DataFixers; -import net.minecraft.util.profiling.EmptyProfileResults; -import net.minecraft.util.profiling.ProfileResults; @@ -95,7 +163,7 @@ index 358330b182544fdeb9d9334c0c57d6ea84cc3776..3810c8e431258c030fcbe9788d24307a import net.minecraft.util.thread.ReentrantBlockableEventLoop; import net.minecraft.world.Difficulty; import net.minecraft.world.RandomSequences; -@@ -212,14 +203,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop tickables = Lists.newArrayList(); @@ -110,7 +178,7 @@ index 358330b182544fdeb9d9334c0c57d6ea84cc3776..3810c8e431258c030fcbe9788d24307a private ServerConnectionListener connection; public final ChunkProgressListenerFactory progressListenerFactory; @Nullable -@@ -332,13 +315,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { + return false; + } : this::haveTime); - this.profiler.popPush("nextTickWait"); this.mayHaveDelayedTasks = true; - this.delayedTasksMaxNextTickTime = Math.max(Util.getMillis() + 50L, this.nextTickTime); + this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos); this.waitUntilNextTick(); +@@ -1228,8 +1193,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && this.tickCount % autosavePeriod == 0; try { this.isSaving = true; -@@ -1408,7 +1369,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper @@ -230,7 +304,7 @@ index 358330b182544fdeb9d9334c0c57d6ea84cc3776..3810c8e431258c030fcbe9788d24307a try { worldserver.timings.doTick.startTiming(); // Spigot worldserver.tick(shouldKeepTicking); -@@ -1573,17 +1522,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { return reloadableServerResources; diff --git a/src/main/java/net/minecraft/server/ServerFunctionManager.java b/src/main/java/net/minecraft/server/ServerFunctionManager.java -index d10abd28c522612934aada8124e5bb67a9b4e9da..0d1d4d2b1ed46a9f4ee383112ea20ac68295f026 100644 +index df0c15f6b5b2224d53e4f8fad42b9a1e5f33dc25..caa6dcfec13728863dcf21f9f778665b2bcd3d50 100644 --- a/src/main/java/net/minecraft/server/ServerFunctionManager.java +++ b/src/main/java/net/minecraft/server/ServerFunctionManager.java -@@ -19,7 +19,6 @@ import net.minecraft.commands.FunctionInstantiationException; +@@ -16,7 +16,6 @@ import net.minecraft.commands.functions.CommandFunction; + import net.minecraft.commands.functions.InstantiatedFunction; import net.minecraft.nbt.CompoundTag; - import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; -import net.minecraft.util.profiling.ProfilerFiller; - import net.minecraft.world.level.GameRules; + import org.slf4j.Logger; public class ServerFunctionManager { -@@ -60,10 +59,7 @@ public class ServerFunctionManager { +@@ -53,10 +52,7 @@ public class ServerFunctionManager { } - private void executeTagFunctions(Collection functions, ResourceLocation label) { + private void executeTagFunctions(Collection> functions, ResourceLocation label) { - ProfilerFiller gameprofilerfiller = this.server.getProfiler(); - Objects.requireNonNull(label); @@ -471,38 +545,33 @@ index d10abd28c522612934aada8124e5bb67a9b4e9da..0d1d4d2b1ed46a9f4ee383112ea20ac6 Iterator iterator = functions.iterator(); while (iterator.hasNext()) { -@@ -71,8 +67,6 @@ public class ServerFunctionManager { +@@ -64,17 +60,9 @@ public class ServerFunctionManager { - this.execute(customfunction, this.getGameLoopSender()); + this.execute(commandfunction, this.getGameLoopSender()); } - - this.server.getProfiler().pop(); } - public int execute(CommandFunction function, CommandSourceStack source) { -@@ -193,12 +187,10 @@ public class ServerFunctionManager { - return j; - } + public void execute(CommandFunction function, CommandSourceStack source) { +- ProfilerFiller gameprofilerfiller = this.server.getProfiler(); +- +- gameprofilerfiller.push(() -> { +- return "function " + function.id(); +- }); +- + try { + InstantiatedFunction instantiatedfunction = function.instantiate((CompoundTag) null, this.getDispatcher(), source); -- try { -+ { // Gale - Purpur - remove vanilla profiler - ServerFunctionManager.QueuedCommand customfunctiondata_queuedcommand = (ServerFunctionManager.QueuedCommand) this.commandQueue.removeFirst(); -- ProfilerFiller gameprofilerfiller = ServerFunctionManager.this.server.getProfiler(); +@@ -85,8 +73,6 @@ public class ServerFunctionManager { + ; + } catch (Exception exception) { + ServerFunctionManager.LOGGER.warn("Failed to execute function {}", function.id(), exception); +- } finally { +- gameprofilerfiller.pop(); + } - Objects.requireNonNull(customfunctiondata_queuedcommand); -- gameprofilerfiller.push(customfunctiondata_queuedcommand::toString); - this.depth = customfunctiondata_queuedcommand.depth; - customfunctiondata_queuedcommand.execute(ServerFunctionManager.this, this.commandQueue, i, this.tracer); - if (this.abortCurrentDepth) { -@@ -216,8 +208,6 @@ public class ServerFunctionManager { - } - - this.nestedCalls.clear(); -- } finally { -- ServerFunctionManager.this.server.getProfiler().pop(); - } - - ++j; + } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java index caa73632aee15583c6b6ed12a668c8f49b794708..5853b5e31a62b353f38ab47ec7455526534aba12 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -537,10 +606,10 @@ index caa73632aee15583c6b6ed12a668c8f49b794708..5853b5e31a62b353f38ab47ec7455526 public boolean hasWork() { diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 8c33a12ca879c46893150d6adfb8aa4d397c6b4c..75f706d580c84deb2faf778552f8129a98bf32c6 100644 +index 6e212f672579a3e08dc362c287be59ca5170d717..19625d104b19e02101ee7685a1df5bfd0c905296 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -24,7 +24,6 @@ import net.minecraft.core.SectionPos; +@@ -23,7 +23,6 @@ import net.minecraft.core.SectionPos; import net.minecraft.network.protocol.Packet; import net.minecraft.server.level.progress.ChunkProgressListener; import net.minecraft.util.VisibleForDebug; @@ -548,7 +617,7 @@ index 8c33a12ca879c46893150d6adfb8aa4d397c6b4c..75f706d580c84deb2faf778552f8129a import net.minecraft.util.thread.BlockableEventLoop; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.ai.village.poi.PoiManager; -@@ -276,16 +275,12 @@ public class ServerChunkCache extends ChunkSource { +@@ -274,16 +273,12 @@ public class ServerChunkCache extends ChunkSource { return ifLoaded; } // Paper end @@ -565,7 +634,7 @@ index 8c33a12ca879c46893150d6adfb8aa4d397c6b4c..75f706d580c84deb2faf778552f8129a CompletableFuture> completablefuture = this.getChunkFutureMainThread(x, z, leastStatus, create, true); // Paper ServerChunkCache.MainThreadExecutor chunkproviderserver_b = this.mainThreadProcessor; -@@ -474,24 +469,19 @@ public class ServerChunkCache extends ChunkSource { +@@ -472,24 +467,19 @@ public class ServerChunkCache extends ChunkSource { // CraftBukkit start - modelled on below public void purgeUnload() { if (true) return; // Paper - tickets will be removed later, this behavior isn't really well accounted for by the chunk system @@ -590,7 +659,7 @@ index 8c33a12ca879c46893150d6adfb8aa4d397c6b4c..75f706d580c84deb2faf778552f8129a if (tickChunks) { this.level.timings.chunks.startTiming(); // Paper - timings this.chunkMap.level.playerChunkLoader.tick(); // Paper - replace player chunk loader - this is mostly required to account for view distance changes -@@ -500,10 +490,8 @@ public class ServerChunkCache extends ChunkSource { +@@ -499,10 +489,8 @@ public class ServerChunkCache extends ChunkSource { } this.level.timings.doChunkUnload.startTiming(); // Spigot @@ -601,60 +670,59 @@ index 8c33a12ca879c46893150d6adfb8aa4d397c6b4c..75f706d580c84deb2faf778552f8129a this.clearCache(); } -@@ -518,13 +506,10 @@ public class ServerChunkCache extends ChunkSource { - this.chunkMap.tick(); - } else { - LevelData worlddata = this.level.getLevelData(); +@@ -512,10 +500,6 @@ public class ServerChunkCache extends ChunkSource { + + this.lastInhabitedUpdate = i; + if (!this.level.isDebug()) { - ProfilerFiller gameprofilerfiller = this.level.getProfiler(); - +- - gameprofilerfiller.push("pollingChunks"); - int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING); - boolean flag1 = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit - -- gameprofilerfiller.push("naturalSpawnCount"); - this.level.timings.countNaturalMobs.startTiming(); // Paper - timings - int l = this.distanceManager.getNaturalSpawnChunkCount(); - // Paper start - per player mob spawning -@@ -552,14 +537,12 @@ public class ServerChunkCache extends ChunkSource { - this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings - - this.lastSpawnState = spawnercreature_d; -- gameprofilerfiller.popPush("filteringLoadedChunks"); - // Paper - optimise chunk tick iteration - // Paper - optimise chunk tick iteration - this.level.timings.chunkTicks.startTiming(); // Paper - - // Paper - optimise chunk tick iteration - -- gameprofilerfiller.popPush("spawnAndTick"); - boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit +- gameprofilerfiller.push("filteringLoadedChunks"); + if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper // Paper start - optimise chunk tick iteration -@@ -662,14 +645,12 @@ public class ServerChunkCache extends ChunkSource { - } +@@ -555,7 +539,6 @@ public class ServerChunkCache extends ChunkSource { // Paper end - optimise chunk tick iteration - this.level.timings.chunkTicks.stopTiming(); // Paper -- gameprofilerfiller.popPush("customSpawners"); - if (flag2) { - try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings - this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies); - } // Paper - timings + + if (this.level.getServer().tickRateManager().runsNormally()) { +- gameprofilerfiller.popPush("naturalSpawnCount"); + this.level.timings.countNaturalMobs.startTiming(); // Paper - timings + int k = this.distanceManager.getNaturalSpawnChunkCount(); + // Paper start - per player mob spawning +@@ -584,7 +567,6 @@ public class ServerChunkCache extends ChunkSource { + this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings + + this.lastSpawnState = spawnercreature_d; +- gameprofilerfiller.popPush("spawnAndTick"); + boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit + + // Paper start - optimise chunk tick iteration +@@ -690,7 +672,6 @@ public class ServerChunkCache extends ChunkSource { + // Paper end - optimise chunk tick iteration + this.level.timings.chunkTicks.stopTiming(); // Paper + +- gameprofilerfiller.popPush("customSpawners"); + if (flag) { + try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings + this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies); +@@ -698,7 +679,6 @@ public class ServerChunkCache extends ChunkSource { + } } - gameprofilerfiller.popPush("broadcast"); // Paper - optimise chunk tick iteration this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing // Paper start - optimise chunk tick iteration -@@ -687,8 +668,6 @@ public class ServerChunkCache extends ChunkSource { +@@ -716,8 +696,6 @@ public class ServerChunkCache extends ChunkSource { // Paper end - optimise chunk tick iteration this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing // Paper - optimise chunk tick iteration - gameprofilerfiller.pop(); - gameprofilerfiller.pop(); - this.chunkMap.tick(); } } -@@ -861,7 +840,6 @@ public class ServerChunkCache extends ChunkSource { + +@@ -889,7 +867,6 @@ public class ServerChunkCache extends ChunkSource { @Override protected void doRunTask(Runnable task) { @@ -663,10 +731,10 @@ index 8c33a12ca879c46893150d6adfb8aa4d397c6b4c..75f706d580c84deb2faf778552f8129a } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 6421edda569ae8953f23ccd78996ab3ab811264a..faac60fc85e70619a22a53594c14b19805f96773 100644 +index 5a2e9043c671a7274baa9f9944c7db4883844026..7ec3570c1759f9c7f857fcb74cd397fea14dcd91 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -77,7 +77,6 @@ import net.minecraft.util.Mth; +@@ -78,7 +78,6 @@ import net.minecraft.util.Mth; import net.minecraft.util.ProgressListener; import net.minecraft.util.RandomSource; import net.minecraft.util.Unit; @@ -674,7 +742,7 @@ index 6421edda569ae8953f23ccd78996ab3ab811264a..faac60fc85e70619a22a53594c14b198 import net.minecraft.util.valueproviders.IntProvider; import net.minecraft.util.valueproviders.UniformInt; import net.minecraft.world.DifficultyInstance; -@@ -689,15 +688,17 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -691,15 +690,17 @@ public class ServerLevel extends Level implements WorldGenLevel { // Holder holder = worlddimension.type(); // CraftBukkit - decompile error // Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error @@ -695,26 +763,30 @@ index 6421edda569ae8953f23ccd78996ab3ab811264a..faac60fc85e70619a22a53594c14b198 this.navigatingMobs = new ObjectOpenHashSet(); this.blockEvents = new ObjectLinkedOpenHashSet(); this.blockEventsToReschedule = new ArrayList(64); -@@ -800,12 +801,8 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -802,16 +803,12 @@ public class ServerLevel extends Level implements WorldGenLevel { } public void tick(BooleanSupplier shouldKeepTicking) { - ProfilerFiller gameprofilerfiller = this.getProfiler(); - this.handlingTick = true; -- gameprofilerfiller.push("world border"); - this.getWorldBorder().tick(); -- gameprofilerfiller.popPush("weather"); - this.advanceWeatherCycle(); - int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE); - long j; -@@ -832,32 +829,24 @@ public class ServerLevel extends Level implements WorldGenLevel { + TickRateManager tickratemanager = this.tickRateManager(); + boolean flag = tickratemanager.runsNormally(); + + if (flag) { +- gameprofilerfiller.push("world border"); + this.getWorldBorder().tick(); +- gameprofilerfiller.popPush("weather"); + this.advanceWeatherCycle(); + } + +@@ -843,30 +840,23 @@ public class ServerLevel extends Level implements WorldGenLevel { + this.tickTime(); + } - this.updateSkyBrightness(); - this.tickTime(); - gameprofilerfiller.popPush("tickPending"); this.timings.scheduledBlocks.startTiming(); // Paper - if (!this.isDebug()) { + if (!this.isDebug() && flag) { j = this.getGameTime(); - gameprofilerfiller.push("blockTicks"); this.blockTicks.tick(j, 65536, this::tickBlock); @@ -725,46 +797,52 @@ index 6421edda569ae8953f23ccd78996ab3ab811264a..faac60fc85e70619a22a53594c14b198 this.timings.scheduledBlocks.stopTiming(); // Paper - gameprofilerfiller.popPush("raid"); - this.timings.raids.startTiming(); // Paper - timings - this.raids.tick(); - this.timings.raids.stopTiming(); // Paper - timings + if (flag) { + this.timings.raids.startTiming(); // Paper - timings + this.raids.tick(); + this.timings.raids.stopTiming(); // Paper - timings + } + - gameprofilerfiller.popPush("chunkSource"); this.timings.chunkProviderTick.startTiming(); // Paper - timings this.getChunkSource().tick(shouldKeepTicking, true); this.timings.chunkProviderTick.stopTiming(); // Paper - timings - gameprofilerfiller.popPush("blockEvents"); - this.timings.doSounds.startTiming(); // Spigot - this.runBlockEvents(); - this.timings.doSounds.stopTiming(); // Spigot - this.handlingTick = false; -- gameprofilerfiller.pop(); - boolean flag = true || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players - if (flag) { -@@ -865,12 +854,9 @@ public class ServerLevel extends Level implements WorldGenLevel { + this.timings.doSounds.startTiming(); // Spigot + this.runBlockEvents(); +@@ -874,7 +864,6 @@ public class ServerLevel extends Level implements WorldGenLevel { } - if (flag || this.emptyTime++ < 300) { + this.handlingTick = false; +- gameprofilerfiller.pop(); + boolean flag1 = true || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players + + if (flag1) { +@@ -882,12 +871,9 @@ public class ServerLevel extends Level implements WorldGenLevel { + } + + if (flag1 || this.emptyTime++ < 300) { - gameprofilerfiller.push("entities"); this.timings.tickEntities.startTiming(); // Spigot - if (this.dragonFight != null) { + if (this.dragonFight != null && flag) { - gameprofilerfiller.push("dragonFight"); this.dragonFight.tick(); - gameprofilerfiller.pop(); } org.spigotmc.ActivationRange.activateEntities(this); // Spigot -@@ -880,9 +866,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -897,9 +883,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed entity.discard(); - } else { + } else if (!tickratemanager.isEntityFrozen(entity)) { - gameprofilerfiller.push("checkDespawn"); entity.checkDespawn(); - gameprofilerfiller.pop(); if (true || this.chunkSource.chunkMap.getDistanceManager().inEntityTickingRange(entity.chunkPosition().toLong())) { // Paper - now always true if in the ticking list Entity entity1 = entity.getVehicle(); -@@ -894,22 +878,17 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -911,22 +895,17 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.stopRiding(); } @@ -787,7 +865,7 @@ index 6421edda569ae8953f23ccd78996ab3ab811264a..faac60fc85e70619a22a53594c14b198 } @Override -@@ -968,9 +947,6 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -985,9 +964,6 @@ public class ServerLevel extends Level implements WorldGenLevel { boolean flag = this.isRaining(); int j = chunkcoordintpair.getMinBlockX(); int k = chunkcoordintpair.getMinBlockZ(); @@ -797,7 +875,7 @@ index 6421edda569ae8953f23ccd78996ab3ab811264a..faac60fc85e70619a22a53594c14b198 final BlockPos.MutableBlockPos blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - disable thunder -@@ -1001,8 +977,6 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1018,8 +994,6 @@ public class ServerLevel extends Level implements WorldGenLevel { } } @@ -806,23 +884,23 @@ index 6421edda569ae8953f23ccd78996ab3ab811264a..faac60fc85e70619a22a53594c14b198 if (!this.paperConfig().environment.disableIceAndSnow) { // Paper for (int l = 0; l < randomTickSpeed; ++l) { if (this.random.nextInt(48) == 0) { -@@ -1013,7 +987,6 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1031,7 +1005,6 @@ public class ServerLevel extends Level implements WorldGenLevel { + } } // Paper - // Paper start - optimise random block ticking - gameprofilerfiller.popPush("tickBlocks"); timings.chunkTicksBlocks.startTiming(); // Paper if (randomTickSpeed > 0) { - LevelChunkSection[] sections = chunk.getSections(); -@@ -1048,7 +1021,6 @@ public class ServerLevel extends Level implements WorldGenLevel { + // Paper start - optimize random block ticking +@@ -1067,7 +1040,6 @@ public class ServerLevel extends Level implements WorldGenLevel { // Paper end - optimise random block ticking timings.chunkTicksBlocks.stopTiming(); // Paper - gameprofilerfiller.pop(); } - private void tickIceAndSnow(boolean raining, BlockPos.MutableBlockPos blockposition1, final LevelChunk chunk) { // Paper - optimise chunk ticking -@@ -1372,19 +1344,13 @@ public class ServerLevel extends Level implements WorldGenLevel { + @VisibleForTesting +@@ -1396,19 +1368,13 @@ public class ServerLevel extends Level implements WorldGenLevel { try { // Paper end - timings entity.setOldPosAndRot(); @@ -842,7 +920,7 @@ index 6421edda569ae8953f23ccd78996ab3ab811264a..faac60fc85e70619a22a53594c14b198 } finally { timer.stopTiming(); } // Paper - timings Iterator iterator = entity.getPassengers().iterator(); -@@ -1413,12 +1379,6 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1437,12 +1403,6 @@ public class ServerLevel extends Level implements WorldGenLevel { // Paper end passenger.setOldPosAndRot(); ++passenger.tickCount; @@ -855,7 +933,7 @@ index 6421edda569ae8953f23ccd78996ab3ab811264a..faac60fc85e70619a22a53594c14b198 // Paper start - EAR 2 if (isActive) { passenger.rideTick(); -@@ -1430,7 +1390,6 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1454,7 +1414,6 @@ public class ServerLevel extends Level implements WorldGenLevel { vehicle.positionRider(passenger); } // Paper end - EAR 2 @@ -864,10 +942,10 @@ index 6421edda569ae8953f23ccd78996ab3ab811264a..faac60fc85e70619a22a53594c14b198 while (iterator.hasNext()) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 907c8f15f5247f9972c6677ff0f9e1aa22764a04..0915a357207a445e9e89ee4de576e61cadbe246c 100644 +index 8efbbd379244e3ed54d4aba199037cc20ccd096a..5ed738854aebc3ca56dfba72e91971593c7a0db9 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1208,7 +1208,6 @@ public class ServerPlayer extends Player { +@@ -1212,7 +1212,6 @@ public class ServerPlayer extends Player { PortalInfo shapedetectorshape = this.findDimensionEntryPoint(worldserver); if (shapedetectorshape != null) { @@ -875,7 +953,7 @@ index 907c8f15f5247f9972c6677ff0f9e1aa22764a04..0915a357207a445e9e89ee4de576e61c worldserver = shapedetectorshape.world; // CraftBukkit if (worldserver == null) { } else // CraftBukkit - empty to fall through to null to event if (resourcekey == LevelStem.OVERWORLD && worldserver.getTypeKey() == LevelStem.NETHER) { // CraftBukkit -@@ -1231,8 +1230,6 @@ public class ServerPlayer extends Player { +@@ -1235,8 +1234,6 @@ public class ServerPlayer extends Player { worldserver = ((CraftWorld) exit.getWorld()).getHandle(); // CraftBukkit end @@ -884,7 +962,7 @@ index 907c8f15f5247f9972c6677ff0f9e1aa22764a04..0915a357207a445e9e89ee4de576e61c if (true) { // CraftBukkit this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds -@@ -1249,7 +1246,6 @@ public class ServerPlayer extends Player { +@@ -1253,7 +1250,6 @@ public class ServerPlayer extends Player { this.connection.teleport(exit); // CraftBukkit - use internal teleport without event this.connection.resetPosition(); worldserver.addDuringPortalTeleport(this); @@ -893,7 +971,7 @@ index 907c8f15f5247f9972c6677ff0f9e1aa22764a04..0915a357207a445e9e89ee4de576e61c this.connection.send(new ClientboundPlayerAbilitiesPacket(this.getAbilities())); playerlist.sendLevelInfo(this, worldserver); diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 598f807f0d0caac98b81e0e2991f1bd497c4534e..09595e58058e9c91b181c212bb629de463cc48b9 100644 +index 4a712f5fc4f0b4a4434ae808c989113bee8d8634..f5d81da99a47fc1237a670d0000f19f1d61a5160 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java @@ -190,7 +190,6 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack @@ -945,10 +1023,14 @@ index c83c6fe5f7e2dc00a36cdd76c23317f232a2336b..47091691ca667e8ee58fa96ee9a2a827 @Override diff --git a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java -index 9ddbfcf80d9a381dace78a62880f85a4d767e0eb..46695c08d4c84a5df964dbe0706ff0f8ba124364 100644 +index 9ddbfcf80d9a381dace78a62880f85a4d767e0eb..61a7c5e253e790b1e966c704af2f9645322a026e 100644 --- a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java +++ b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java -@@ -7,13 +7,9 @@ import net.minecraft.util.profiling.ProfilerFiller; +@@ -3,17 +3,12 @@ package net.minecraft.server.packs.resources; + import java.util.concurrent.CompletableFuture; + import java.util.concurrent.Executor; + import net.minecraft.util.Unit; +-import net.minecraft.util.profiling.ProfilerFiller; public interface ResourceManagerReloadListener extends PreparableReloadListener { @Override @@ -989,10 +1071,10 @@ index 7ab57748b2f2aea1003d9b7e70e76c372aa1e432..47e75ec4a01f8a456ec6ebc13031c1f0 } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index fece91254b10b59474056aa730fd420f90cd7bec..26d1189bd3ff5537dee1c12a54dcfd530c1047dd 100644 +index 9abe817ae202edaa2d88cd59ae5c7db0b1c634be..58d608a04183041e9b0cfabb1ef4a57b57642236 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -811,7 +811,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -816,7 +816,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S // CraftBukkit end public void baseTick() { @@ -1000,7 +1082,7 @@ index fece91254b10b59474056aa730fd420f90cd7bec..26d1189bd3ff5537dee1c12a54dcfd53 if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking this.feetBlockState = null; if (this.isPassenger() && this.getVehicle().isRemoved()) { -@@ -872,7 +871,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -877,7 +876,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } this.firstTick = false; @@ -1008,7 +1090,7 @@ index fece91254b10b59474056aa730fd420f90cd7bec..26d1189bd3ff5537dee1c12a54dcfd53 } public void setSharedFlagOnFire(boolean onFire) { -@@ -1091,7 +1089,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1096,7 +1094,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } } @@ -1016,7 +1098,7 @@ index fece91254b10b59474056aa730fd420f90cd7bec..26d1189bd3ff5537dee1c12a54dcfd53 if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) { movement = movement.multiply(this.stuckSpeedMultiplier); this.stuckSpeedMultiplier = Vec3.ZERO; -@@ -1100,7 +1097,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1105,7 +1102,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S // Paper start - ignore movement changes while inactive. if (isTemporarilyActive && !(this instanceof ItemEntity || this instanceof net.minecraft.world.entity.vehicle.AbstractMinecart) && movement == getDeltaMovement() && movementType == MoverType.SELF) { setDeltaMovement(Vec3.ZERO); @@ -1024,7 +1106,7 @@ index fece91254b10b59474056aa730fd420f90cd7bec..26d1189bd3ff5537dee1c12a54dcfd53 return; } // Paper end -@@ -1121,8 +1117,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1126,8 +1122,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z); } @@ -1033,7 +1115,7 @@ index fece91254b10b59474056aa730fd420f90cd7bec..26d1189bd3ff5537dee1c12a54dcfd53 boolean flag = !Mth.equal(movement.x, vec3d1.x); boolean flag1 = !Mth.equal(movement.z, vec3d1.z); -@@ -1140,9 +1134,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1145,9 +1139,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S BlockState iblockdata = this.level().getBlockState(blockposition); this.checkFallDamage(vec3d1.y, this.onGround(), iblockdata, blockposition); @@ -1044,7 +1126,7 @@ index fece91254b10b59474056aa730fd420f90cd7bec..26d1189bd3ff5537dee1c12a54dcfd53 if (this.horizontalCollision) { Vec3 vec3d2 = this.getDeltaMovement(); -@@ -1278,8 +1270,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1283,8 +1275,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S if (this.isOnFire() && (this.isInPowderSnow || this.isInWaterRainOrBubble())) { this.setRemainingFireTicks(-this.getFireImmuneTicks()); } @@ -1053,7 +1135,7 @@ index fece91254b10b59474056aa730fd420f90cd7bec..26d1189bd3ff5537dee1c12a54dcfd53 } } // Paper start - detailed watchdog information -@@ -3114,7 +3104,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3143,7 +3133,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S ServerLevel worldserver1 = minecraftserver.getLevel(resourcekey); if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit @@ -1061,7 +1143,7 @@ index fece91254b10b59474056aa730fd420f90cd7bec..26d1189bd3ff5537dee1c12a54dcfd53 this.portalTime = i; // Paper start io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER); -@@ -3132,7 +3121,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3161,7 +3150,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } } // Paper // CraftBukkit end @@ -1069,7 +1151,7 @@ index fece91254b10b59474056aa730fd420f90cd7bec..26d1189bd3ff5537dee1c12a54dcfd53 } this.isInsidePortal = false; -@@ -3607,14 +3595,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3636,14 +3624,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } // Paper end if (this.level() instanceof ServerLevel && !this.isRemoved()) { @@ -1084,7 +1166,7 @@ index fece91254b10b59474056aa730fd420f90cd7bec..26d1189bd3ff5537dee1c12a54dcfd53 PortalInfo shapedetectorshape = (location == null) ? this.findDimensionEntryPoint(worldserver) : new PortalInfo(new Vec3(location.x(), location.y(), location.z()), Vec3.ZERO, this.yRot, this.xRot, worldserver, null); // CraftBukkit if (shapedetectorshape == null) { -@@ -3653,7 +3639,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3682,7 +3668,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S this.unRide(); // CraftBukkit end @@ -1092,7 +1174,7 @@ index fece91254b10b59474056aa730fd420f90cd7bec..26d1189bd3ff5537dee1c12a54dcfd53 // Paper start - Change lead drop timing to prevent dupe if (this instanceof Mob) { ((Mob) this).dropLeash(true, true); // Paper drop lead -@@ -3676,10 +3661,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3709,10 +3694,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } this.removeAfterChangingDimensions(); @@ -1104,10 +1186,10 @@ index fece91254b10b59474056aa730fd420f90cd7bec..26d1189bd3ff5537dee1c12a54dcfd53 } } else { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 15e1d8c09fad181406a6acb8b3f177cd5e6c0f52..4fc32bb632d2c6e7bcaae11c3c7fee4baeb26fa9 100644 +index 45b1a182acf6b2aef40b714d31ca125d8f74619a..f0cc2a0ce82071cf04fa5e885943cc72c44e1eab 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -405,7 +405,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -404,7 +404,6 @@ public abstract class LivingEntity extends Entity implements Attackable { } super.baseTick(); @@ -1115,7 +1197,7 @@ index 15e1d8c09fad181406a6acb8b3f177cd5e6c0f52..4fc32bb632d2c6e7bcaae11c3c7fee4b if (this.fireImmune() || this.level().isClientSide) { this.clearFire(); } -@@ -507,7 +506,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -506,7 +505,6 @@ public abstract class LivingEntity extends Entity implements Attackable { this.yHeadRotO = this.yHeadRot; this.yRotO = this.getYRot(); this.xRotO = this.getXRot(); @@ -1123,7 +1205,7 @@ index 15e1d8c09fad181406a6acb8b3f177cd5e6c0f52..4fc32bb632d2c6e7bcaae11c3c7fee4b } public boolean canSpawnSoulSpeedParticle() { -@@ -3077,10 +3075,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3074,10 +3072,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.run += (f3 - this.run) * 0.3F; @@ -1134,7 +1216,7 @@ index 15e1d8c09fad181406a6acb8b3f177cd5e6c0f52..4fc32bb632d2c6e7bcaae11c3c7fee4b // Paper start - stop large pitch and yaw changes from crashing the server this.yRotO += Math.round((this.getYRot() - this.yRotO) / 360.0F) * 360.0F; -@@ -3092,7 +3087,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3089,7 +3084,6 @@ public abstract class LivingEntity extends Entity implements Attackable { this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F; // Paper end @@ -1142,7 +1224,7 @@ index 15e1d8c09fad181406a6acb8b3f177cd5e6c0f52..4fc32bb632d2c6e7bcaae11c3c7fee4b this.animStep += f2; if (this.isFallFlying()) { ++this.fallFlyTicks; -@@ -3382,19 +3376,14 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3384,19 +3378,14 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.setDeltaMovement(d0, d1, d2); @@ -1162,7 +1244,7 @@ index 15e1d8c09fad181406a6acb8b3f177cd5e6c0f52..4fc32bb632d2c6e7bcaae11c3c7fee4b if (this.jumping && this.isAffectedByFluids()) { double d3; -@@ -3421,8 +3410,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3423,8 +3412,6 @@ public abstract class LivingEntity extends Entity implements Attackable { this.noJumpDelay = 0; } @@ -1171,16 +1253,16 @@ index 15e1d8c09fad181406a6acb8b3f177cd5e6c0f52..4fc32bb632d2c6e7bcaae11c3c7fee4b this.xxa *= 0.98F; this.zza *= 0.98F; this.updateFallFlying(); -@@ -3449,8 +3436,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3451,8 +3438,6 @@ public abstract class LivingEntity extends Entity implements Attackable { this.travel(vec3d1); } - this.level().getProfiler().pop(); - this.level().getProfiler().push("freezing"); - if (!this.level().isClientSide && !this.isDeadOrDying() && !freezeLocked) { // Paper - Freeze Tick Lock API + if (!this.level().isClientSide && !this.isDeadOrDying() && !this.freezeLocked) { // Paper - Freeze Tick Lock API int i = this.getTicksFrozen(); -@@ -3467,15 +3452,12 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3469,15 +3454,12 @@ public abstract class LivingEntity extends Entity implements Attackable { this.hurt(this.damageSources().freeze(), 1.0F); } @@ -1197,10 +1279,10 @@ index 15e1d8c09fad181406a6acb8b3f177cd5e6c0f52..4fc32bb632d2c6e7bcaae11c3c7fee4b if (((ServerLevel) this.level()).hasEntityMoveEvent && !(this instanceof net.minecraft.world.entity.player.Player)) { if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) { diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 956d05e2ae59978ea9623ca0e167c0afe0b87306..8dafe3126ef152d44b4ae6d84dd1a3b908332a1e 100644 +index 5af48151159135b869ec4753bbcf79dd257c1570..5fa46974539fcfe3b344788c49e0be94228b1a6d 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -145,8 +145,10 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -146,8 +146,10 @@ public abstract class Mob extends LivingEntity implements Targeting { this.pathfindingMalus = Maps.newEnumMap(BlockPathTypes.class); this.restrictCenter = BlockPos.ZERO; this.restrictRadius = -1.0F; @@ -1213,7 +1295,7 @@ index 956d05e2ae59978ea9623ca0e167c0afe0b87306..8dafe3126ef152d44b4ae6d84dd1a3b9 this.lookControl = new LookControl(this); this.moveControl = new MoveControl(this); this.jumpControl = new JumpControl(this); -@@ -361,13 +363,10 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -362,13 +364,10 @@ public abstract class Mob extends LivingEntity implements Targeting { @Override public void baseTick() { super.baseTick(); @@ -1227,7 +1309,7 @@ index 956d05e2ae59978ea9623ca0e167c0afe0b87306..8dafe3126ef152d44b4ae6d84dd1a3b9 } @Override -@@ -672,7 +671,6 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -673,7 +672,6 @@ public abstract class Mob extends LivingEntity implements Targeting { @Override public void aiStep() { super.aiStep(); @@ -1235,7 +1317,7 @@ index 956d05e2ae59978ea9623ca0e167c0afe0b87306..8dafe3126ef152d44b4ae6d84dd1a3b9 if (!this.level().isClientSide && this.canPickUpLoot() && this.isAlive() && !this.dead && this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { Vec3i baseblockposition = this.getPickupReach(); List list = this.level().getEntitiesOfClass(ItemEntity.class, this.getBoundingBox().inflate((double) baseblockposition.getX(), (double) baseblockposition.getY(), (double) baseblockposition.getZ())); -@@ -691,8 +689,6 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -692,8 +690,6 @@ public abstract class Mob extends LivingEntity implements Targeting { } } } @@ -1244,7 +1326,7 @@ index 956d05e2ae59978ea9623ca0e167c0afe0b87306..8dafe3126ef152d44b4ae6d84dd1a3b9 } protected Vec3i getPickupReach() { -@@ -903,43 +899,23 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -904,43 +900,23 @@ public abstract class Mob extends LivingEntity implements Targeting { } return; } @@ -1411,10 +1493,10 @@ index 5ad5f22e5aa26445e5eb229958e7bf356bdd460e..26731a659fe3c40fc20135d473bacf10 } diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java -index d5b97d4316390028f54aa9bb9fa52b0b003e32a0..120fc4e35eb6eedb401b2741a5617bb90d0ee533 100644 +index 387006271c246362b0df1bfcadca7b7096660003..91bde1774cc9e7a323ffd2c943b6656101b232a1 100644 --- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java +++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java -@@ -282,12 +282,8 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder { +@@ -161,12 +161,8 @@ public class Frog extends Animal implements VariantHolder { @Override protected void customServerAiStep() { @@ -1569,10 +1651,10 @@ index 5d1a30e09870a5a535c71a2e44b8e6933de0c1e8..5aab051998b67b7ba95cbf568de60e32 PiglinBruteAi.maybePlayActivitySound(this); super.customServerAiStep(); diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java -index b2bc3a832c310448046ccde37a04918aa6d63197..db09d5c6b709f746e69111cedebd29f82c1f9e32 100644 +index 9f1b7c629644931074293151ed58a523ca6d488c..206701dd16f0e5850bc2384388a0a3a746a1b74e 100644 --- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java +++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java -@@ -276,9 +276,7 @@ public class Warden extends Monster implements VibrationSystem { +@@ -277,9 +277,7 @@ public class Warden extends Monster implements VibrationSystem { protected void customServerAiStep() { ServerLevel worldserver = (ServerLevel) this.level(); @@ -1583,7 +1665,7 @@ index b2bc3a832c310448046ccde37a04918aa6d63197..db09d5c6b709f746e69111cedebd29f8 if ((this.tickCount + this.getId()) % 120 == 0) { Warden.applyDarknessAround(worldserver, this.position(), this, 20); diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index cbe2a37f74f4fb2abd0b3297699e54335aaed64f..bbd4fadc353d2975a6ff026f78028f4fbb6bef07 100644 +index 11935e5b16324af572b07c5b173708f5a91f8289..e02560e9d4c3a1503862e357fe501b05103052b9 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java @@ -253,9 +253,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -1597,30 +1679,30 @@ index cbe2a37f74f4fb2abd0b3297699e54335aaed64f..bbd4fadc353d2975a6ff026f78028f4f this.assignProfessionWhenSpawned = false; } diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 45243249a561440512ef2a620c60b02e159c80e2..1fbdae6690176c61143f08ff96b5255248c4d4c9 100644 +index 9442f58dff89ec843c321533965fbee2727d02f8..3fde433edfd8835bf162cf39dd9999aa6dc5832d 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java -@@ -706,7 +706,6 @@ public class Explosion { - if (!iblockdata.isAir() && iblockdata.isDestroyable()) { // Paper - BlockPos blockposition1 = blockposition.immutable(); +@@ -659,7 +659,6 @@ public class Explosion { + } -- this.level.getProfiler().push("explosion_blocks"); - if (block.dropFromExplosion(this)) { - Level world = this.level; + if (flag1) { +- this.level.getProfiler().push("explosion_blocks"); + List> list = new ArrayList(); -@@ -728,7 +727,6 @@ public class Explosion { - - this.level.setBlock(blockposition, Blocks.AIR.defaultBlockState(), 3); - block.wasExploded(this.level, blockposition, this); -- this.level.getProfiler().pop(); - } + Util.shuffle(this.toBlow, this.level.random); +@@ -735,7 +734,6 @@ public class Explosion { + Block.popResource(this.level, (BlockPos) pair.getSecond(), (ItemStack) pair.getFirst()); } +- this.level.getProfiler().pop(); + } + + if (this.fire) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index e9ea666a09c9f04e37621bf38e61f698f3aaa43a..72a385929f900a2ef03ec349a24e4bf4b2c899ad 100644 +index d58865422bc63a55cb42acc7ec59d4310d34bfed..8c3c92e2a666bcfb88aaff4ca36507e6ea20afc5 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -129,7 +129,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -132,7 +132,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { private final ResourceKey dimensionTypeId; private final Holder dimensionTypeRegistration; public final WritableLevelData levelData; @@ -1628,7 +1710,7 @@ index e9ea666a09c9f04e37621bf38e61f698f3aaa43a..72a385929f900a2ef03ec349a24e4bf4 public final boolean isClientSide; private final WorldBorder worldBorder; private final BiomeManager biomeManager; -@@ -208,7 +207,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -211,7 +210,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public abstract ResourceKey getTypeKey(); @@ -1637,7 +1719,7 @@ index e9ea666a09c9f04e37621bf38e61f698f3aaa43a..72a385929f900a2ef03ec349a24e4bf4 this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper this.galeConfig = galeWorldConfigCreator.apply(this.spigotConfig); // Gale - Gale configuration -@@ -223,7 +222,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -226,7 +225,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } // CraftBukkit end @@ -1645,7 +1727,7 @@ index e9ea666a09c9f04e37621bf38e61f698f3aaa43a..72a385929f900a2ef03ec349a24e4bf4 this.levelData = worlddatamutable; this.dimensionTypeRegistration = holder; this.dimensionTypeId = (ResourceKey) holder.unwrapKey().orElseThrow(() -> { -@@ -1252,9 +1250,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1261,9 +1259,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } protected void tickBlockEntities() { @@ -1655,7 +1737,7 @@ index e9ea666a09c9f04e37621bf38e61f698f3aaa43a..72a385929f900a2ef03ec349a24e4bf4 this.timings.tileEntityPending.startTiming(); // Spigot this.tickingBlockEntities = true; if (!this.pendingBlockEntityTickers.isEmpty()) { -@@ -1299,7 +1294,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1310,7 +1305,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { this.timings.tileEntityTick.stopTiming(); // Spigot this.tickingBlockEntities = false; co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper @@ -1663,7 +1745,7 @@ index e9ea666a09c9f04e37621bf38e61f698f3aaa43a..72a385929f900a2ef03ec349a24e4bf4 this.spigotConfig.currentPrimedTnt = 0; // Spigot } -@@ -1502,7 +1496,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1520,7 +1514,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @Override public List getEntities(@Nullable Entity except, AABB box, Predicate predicate) { @@ -1671,7 +1753,7 @@ index e9ea666a09c9f04e37621bf38e61f698f3aaa43a..72a385929f900a2ef03ec349a24e4bf4 List list = Lists.newArrayList(); ((ServerLevel)this).getEntityLookup().getEntities(except, box, list, predicate); // Paper - optimise this call return list; -@@ -1521,7 +1514,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1539,7 +1532,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } public void getEntities(EntityTypeTest filter, AABB box, Predicate predicate, List result, int limit) { @@ -1679,7 +1761,7 @@ index e9ea666a09c9f04e37621bf38e61f698f3aaa43a..72a385929f900a2ef03ec349a24e4bf4 // Paper start - optimise this call //TODO use limit if (filter instanceof net.minecraft.world.entity.EntityType entityTypeTest) { -@@ -1778,11 +1770,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1798,11 +1790,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } public ProfilerFiller getProfiler() { @@ -1714,10 +1796,18 @@ index 3cdddda9c0618e95288b81b975d499c8dd30c05f..d3ea44e41c2e332bf06f7c6e2935adcd // Paper start diff --git a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java -index 0f1025495237aebe30132ace0832aa5718d6f9bb..efe922810507c96183a56a5e81a7b14214d8747b 100644 +index 0f1025495237aebe30132ace0832aa5718d6f9bb..9c2321ebb1237b4ecd3e7f7053e5039b800d89ff 100644 --- a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java +++ b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java -@@ -154,8 +154,4 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter { +@@ -8,7 +8,6 @@ import net.minecraft.core.BlockPos; + import net.minecraft.core.Holder; + import net.minecraft.core.SectionPos; + import net.minecraft.core.registries.Registries; +-import net.minecraft.util.profiling.ProfilerFiller; + import net.minecraft.server.level.ServerLevel; + import net.minecraft.world.entity.Entity; + import net.minecraft.world.level.biome.Biome; +@@ -154,8 +153,4 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter { public int getHeight() { return this.level.getHeight(); } @@ -1804,10 +1894,18 @@ index d23481453717f715124156b5d83f6448f720d049..c4052d1a7c2903564a8a6226c1b019d2 startNode.g = 0.0F; startNode.h = this.getBestH(startNode, positions); // Paper - optimize collection diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java b/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java -index 08f5239d5eea9133340ec9e1a3a7d8d5e792ced0..ecc398c4535dc395aa0108355ef50c98a69a285c 100644 +index 3b740b1fcada96a6fac18a22ea77d1d3ad2a9cce..afc77618e1ceaeec35247294e90d86785226315f 100644 --- a/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java +++ b/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java -@@ -36,7 +36,7 @@ public class LootDataManager implements PreparableReloadListener, LootDataResolv +@@ -20,7 +20,6 @@ import net.minecraft.server.packs.resources.PreparableReloadListener; + import net.minecraft.server.packs.resources.ResourceManager; + import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener; + import net.minecraft.util.ProblemReporter; +-import net.minecraft.util.profiling.ProfilerFiller; + import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; + import org.bukkit.craftbukkit.CraftLootTable; + import org.bukkit.craftbukkit.util.CraftNamespacedKey; +@@ -37,7 +36,7 @@ public class LootDataManager implements PreparableReloadListener, LootDataResolv public LootDataManager() {} @Override diff --git a/patches/server/0018-Use-platform-math-functions.patch b/patches/server/0018-Use-platform-math-functions.patch index 45fb38c..334703d 100644 --- a/patches/server/0018-Use-platform-math-functions.patch +++ b/patches/server/0018-Use-platform-math-functions.patch @@ -99,10 +99,10 @@ public class Main { ``` diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java -index d02546b18cb689724887b4e85e8d32a18828a4ad..3bf983d4c51d517db613a00cb31dea5440cec300 100644 +index 200ed770b57e1a9240abf0473968d4b85cbefe3c..adfb793ba2ca4552e0b800d37f166ea55562a57a 100644 --- a/src/main/java/io/papermc/paper/util/MCUtil.java +++ b/src/main/java/io/papermc/paper/util/MCUtil.java -@@ -166,13 +166,11 @@ public final class MCUtil { +@@ -165,13 +165,11 @@ public final class MCUtil { } public static int fastFloor(double x) { @@ -118,7 +118,7 @@ index d02546b18cb689724887b4e85e8d32a18828a4ad..3bf983d4c51d517db613a00cb31dea54 } public static float normalizeYaw(float f) { -@@ -233,11 +231,11 @@ public final class MCUtil { +@@ -232,11 +230,11 @@ public final class MCUtil { } public static int getChunkCoordinate(final double coordinate) { @@ -133,10 +133,10 @@ index d02546b18cb689724887b4e85e8d32a18828a4ad..3bf983d4c51d517db613a00cb31dea54 public static long getBlockKey(final int x, final int y, final int z) { diff --git a/src/main/java/net/minecraft/util/Mth.java b/src/main/java/net/minecraft/util/Mth.java -index 33ace08d15bbcad66c09c7bd65dd03e784246e8f..d04586223a9b2a30efb17da01fb7f3e8f2a6af7b 100644 +index 03854a2d26a3cfc1817acfdc28cbf151ba59e05b..d9e0224dc108a99c194d4947d18f2d855a341534 100644 --- a/src/main/java/net/minecraft/util/Mth.java +++ b/src/main/java/net/minecraft/util/Mth.java -@@ -51,13 +51,11 @@ public class Mth { +@@ -56,13 +56,11 @@ public class Mth { } public static int floor(float value) { @@ -152,7 +152,7 @@ index 33ace08d15bbcad66c09c7bd65dd03e784246e8f..d04586223a9b2a30efb17da01fb7f3e8 } public static long lfloor(double value) { -@@ -74,13 +72,11 @@ public class Mth { +@@ -79,13 +77,11 @@ public class Mth { } public static int ceil(float value) { @@ -168,7 +168,7 @@ index 33ace08d15bbcad66c09c7bd65dd03e784246e8f..d04586223a9b2a30efb17da01fb7f3e8 } public static int clamp(int value, int min, int max) { -@@ -116,15 +112,7 @@ public class Mth { +@@ -121,15 +117,7 @@ public class Mth { } public static double absMax(double a, double b) { diff --git a/patches/server/0019-Faster-floating-point-positive-modulo.patch b/patches/server/0019-Faster-floating-point-positive-modulo.patch index a640cb0..a6e5feb 100644 --- a/patches/server/0019-Faster-floating-point-positive-modulo.patch +++ b/patches/server/0019-Faster-floating-point-positive-modulo.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/util/Mth.java b/src/main/java/net/minecraft/util/Mth.java -index d04586223a9b2a30efb17da01fb7f3e8f2a6af7b..bae83b708cafb867f43d5378fa78818fc382e2fa 100644 +index d9e0224dc108a99c194d4947d18f2d855a341534..79419f6e1ba900c1686fa9b43866fc43649123a1 100644 --- a/src/main/java/net/minecraft/util/Mth.java +++ b/src/main/java/net/minecraft/util/Mth.java -@@ -143,14 +143,26 @@ public class Mth { +@@ -148,14 +148,26 @@ public class Mth { return Math.floorMod(dividend, divisor); } diff --git a/patches/server/0021-Reduce-projectile-chunk-loading.patch b/patches/server/0021-Reduce-projectile-chunk-loading.patch index 166f63b..35d4986 100644 --- a/patches/server/0021-Reduce-projectile-chunk-loading.patch +++ b/patches/server/0021-Reduce-projectile-chunk-loading.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index a90317100d32974e481e14476843f66997a2cf3a..e799b199bee08bfaf5575eb0c0d2194af495d43e 100644 +index 2f058cec80c6ef7a5a5ca065dc6c9fe353c521de..f2854247ceff3d99f29ced43daa9537aa2ce7549 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -44,6 +44,45 @@ public abstract class Projectile extends Entity implements TraceableEntity { +@@ -45,6 +45,45 @@ public abstract class Projectile extends Entity implements TraceableEntity { super(type, world); } diff --git a/patches/server/0022-Predict-Halloween.patch b/patches/server/0022-Predict-Halloween.patch index a535311..5cc1f64 100644 --- a/patches/server/0022-Predict-Halloween.patch +++ b/patches/server/0022-Predict-Halloween.patch @@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java -index 5beaa849a250ea005733250ad3edfa8382224667..ba809ea753df1f1c347d0410c4ff255ce6a55532 100644 +index 6b614818b14ecfc8fc82b523eeb7e21fdf9bf1ba..685823c4c6f175460fdeb84053ea115c24a67909 100644 --- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java +++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java @@ -1,6 +1,6 @@ @@ -18,7 +18,7 @@ index 5beaa849a250ea005733250ad3edfa8382224667..ba809ea753df1f1c347d0410c4ff255c import java.time.temporal.ChronoField; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; -@@ -237,12 +237,62 @@ public class Bat extends AmbientCreature { +@@ -241,12 +241,62 @@ public class Bat extends AmbientCreature { } } diff --git a/patches/server/0023-Move-random-tick-random.patch b/patches/server/0023-Move-random-tick-random.patch index c50b77a..65c6069 100644 --- a/patches/server/0023-Move-random-tick-random.patch +++ b/patches/server/0023-Move-random-tick-random.patch @@ -19,10 +19,10 @@ require it to be initialized earlier. By moving it to the superclass, we initialize it earlier, ensuring that it is available sooner. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 4ae45b7a7d2d5634a1bcf5030fa7851157e29827..39a54bf48dd0bc5b47874e3910cf3c3d3e68c2fa 100644 +index 7ec3570c1759f9c7f857fcb74cd397fea14dcd91..e38cd60ba31129ed53c8c3839fedd6f77440f4b1 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -939,7 +939,6 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -956,7 +956,6 @@ public class ServerLevel extends Level implements WorldGenLevel { } // Paper start - optimise random block ticking private final BlockPos.MutableBlockPos chunkTickMutablePosition = new BlockPos.MutableBlockPos(); @@ -31,10 +31,10 @@ index 4ae45b7a7d2d5634a1bcf5030fa7851157e29827..39a54bf48dd0bc5b47874e3910cf3c3d public void tickChunk(LevelChunk chunk, int randomTickSpeed) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index b6c3ca543e7e89fc29984140c9de7fce8457416b..72f8910ebc1c486f5f3df19718a38ea066c8ee7b 100644 +index 8c3c92e2a666bcfb88aaff4ca36507e6ea20afc5..c434d73f69cf39d2139a2e71605575733c8c4752 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -181,6 +181,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -184,6 +184,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public final Map explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions public java.util.ArrayDeque redstoneUpdateInfos; // Paper - Move from Map in BlockRedstoneTorch to here diff --git a/patches/server/0024-Optimize-random-calls-in-chunk-ticking.patch b/patches/server/0024-Optimize-random-calls-in-chunk-ticking.patch index 33478c2..3949bd6 100644 --- a/patches/server/0024-Optimize-random-calls-in-chunk-ticking.patch +++ b/patches/server/0024-Optimize-random-calls-in-chunk-ticking.patch @@ -52,22 +52,22 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 75f706d580c84deb2faf778552f8129a98bf32c6..4600ebd99e910287c3c97d6b9179af716da7f4c6 100644 +index 19625d104b19e02101ee7685a1df5bfd0c905296..643143fa45c7c480e4bbd3d03e1b7cc19e2969e2 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -507,6 +507,7 @@ public class ServerChunkCache extends ChunkSource { - } else { - LevelData worlddata = this.level.getLevelData(); - -+ this.level.resetIceAndSnowTick(); // Gale - Airplane - optimize random calls in chunk ticking - reset ice & snow tick random - int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING); - boolean flag1 = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit +@@ -603,6 +603,7 @@ public class ServerChunkCache extends ChunkSource { + player.playerNaturallySpawnedEvent = event; + } + // Paper end - optimise chunk tick iteration ++ this.level.resetIceAndSnowTick(); // Gale - Airplane - optimize random calls in chunk ticking - reset ice & snow tick random + int l = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING); + boolean flag1 = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && this.level.getLevelData().getGameTime() % this.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 67c9dabe4a33fe0335aeaee7759ec52b8ab169e0..a7972fba6490aa9f0a9808119b8343b71314391f 100644 +index e38cd60ba31129ed53c8c3839fedd6f77440f4b1..be1dbe955461823de7b3dbf032d399837be62ea9 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -941,6 +941,8 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -958,6 +958,8 @@ public class ServerLevel extends Level implements WorldGenLevel { private final BlockPos.MutableBlockPos chunkTickMutablePosition = new BlockPos.MutableBlockPos(); // Paper end @@ -76,7 +76,7 @@ index 67c9dabe4a33fe0335aeaee7759ec52b8ab169e0..a7972fba6490aa9f0a9808119b8343b7 public void tickChunk(LevelChunk chunk, int randomTickSpeed) { ChunkPos chunkcoordintpair = chunk.getPos(); boolean flag = this.isRaining(); -@@ -948,7 +950,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -965,7 +967,7 @@ public class ServerLevel extends Level implements WorldGenLevel { int k = chunkcoordintpair.getMinBlockZ(); final BlockPos.MutableBlockPos blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change @@ -85,7 +85,7 @@ index 67c9dabe4a33fe0335aeaee7759ec52b8ab169e0..a7972fba6490aa9f0a9808119b8343b7 blockposition.set(this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15))); // Paper if (this.isRainingAt(blockposition)) { -@@ -976,7 +978,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -993,7 +995,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } @@ -93,7 +93,7 @@ index 67c9dabe4a33fe0335aeaee7759ec52b8ab169e0..a7972fba6490aa9f0a9808119b8343b7 + if (!this.paperConfig().environment.disableIceAndSnow && (this.currentIceAndSnowTick++ & 15) == 0) { // Paper // Gale - Airplane - optimize random calls in chunk ticking - optimize further random ticking for (int l = 0; l < randomTickSpeed; ++l) { if (this.random.nextInt(48) == 0) { - this.getRandomBlockPosition(j, 0, k, 15, blockposition); + // Paper start diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java index c5ab3058f66a54dba397aa4b562ec95e4fd25686..cd375184c63453829be96449c4df88372f905d9e 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java diff --git a/patches/server/0029-Print-stack-trace-for-plugins-not-shutting-down-task.patch b/patches/server/0029-Print-stack-trace-for-plugins-not-shutting-down-task.patch index 705cd4c..3727a85 100644 --- a/patches/server/0029-Print-stack-trace-for-plugins-not-shutting-down-task.patch +++ b/patches/server/0029-Print-stack-trace-for-plugins-not-shutting-down-task.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8abeb9dc5c0e2fe95ea408fbaab9c359cb7cd69f..c0b66b8455c35794c055651b687ba9ca2b89af4c 100644 +index efebe795001058270ec92fdd8e86fd84589e8563..7ff1a1a258e181b6ab0e23374177eb006fd6da05 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1125,6 +1125,13 @@ public final class CraftServer implements Server { +@@ -1120,6 +1120,13 @@ public final class CraftServer implements Server { plugin.getPluginMeta().getDisplayName(), "This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies." )); diff --git a/patches/server/0031-Cache-on-climbable-check.patch b/patches/server/0031-Cache-on-climbable-check.patch index d6c2da0..7f8cd25 100644 --- a/patches/server/0031-Cache-on-climbable-check.patch +++ b/patches/server/0031-Cache-on-climbable-check.patch @@ -31,7 +31,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 4fc32bb632d2c6e7bcaae11c3c7fee4baeb26fa9..5f7e49d291e93373ba828aafc57fa6df0cd1a3e9 100644 +index f0cc2a0ce82071cf04fa5e885943cc72c44e1eab..93c810fe4c392b20295f73044470aa45f13d857f 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -142,7 +142,6 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -42,7 +42,7 @@ index 4fc32bb632d2c6e7bcaae11c3c7fee4baeb26fa9..5f7e49d291e93373ba828aafc57fa6df public abstract class LivingEntity extends Entity implements Attackable { -@@ -2002,6 +2001,20 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1999,6 +1998,20 @@ public abstract class LivingEntity extends Entity implements Attackable { return this.lastClimbablePos; } diff --git a/patches/server/0033-Improve-container-checking-with-a-bitset.patch b/patches/server/0033-Improve-container-checking-with-a-bitset.patch index aad4e8c..4b31ed7 100644 --- a/patches/server/0033-Improve-container-checking-with-a-bitset.patch +++ b/patches/server/0033-Improve-container-checking-with-a-bitset.patch @@ -265,7 +265,7 @@ index d6cbe98e67fdbf8db46338a88ab1356dd63b50a3..adbc0a9caf5daad2655658f06e42d752 int LARGE_MAX_STACK_SIZE = 64; int DEFAULT_DISTANCE_LIMIT = 8; diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java -index 272095d7a09ab41227d741172735f66fd2798ce1..77eee9c231ea075feb1ea0492d0be56554f78ec8 100644 +index 6d23c39e4eadf23616080d6d08672e13b5d3c37d..7bd2d00337024e2d9e274c00241e9827ea5383d6 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java @@ -27,7 +27,10 @@ import org.bukkit.inventory.InventoryHolder; @@ -390,7 +390,7 @@ index a71414397bd45ee7bcacfeef0041d80dfa25f114..7743f185672e977520218c3ce6b8ddc9 @Override diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index 1d9b23c6e458caddc2c738164e6c079cd85d3ce9..f30278bb704ecfb5746e798b97e6e945bc6bfce7 100644 +index d4dcf7fe26474ae07374e7761d823bc5c8b54f97..90c354d37a8db3bcad79aa882d52d5d25482c02d 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -47,7 +47,10 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen @@ -493,10 +493,10 @@ index 1d9b23c6e458caddc2c738164e6c079cd85d3ce9..f30278bb704ecfb5746e798b97e6e945 public static void entityInside(Level world, BlockPos pos, BlockState state, Entity entity, HopperBlockEntity blockEntity) { diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java -index 081691f9710ff1115e4308f79ed49fbc38941193..6347459c1e7347914642c23fe919526db879d103 100644 +index 64875525df244db838560f5fefb7b1b07b0f1f51..1de09539877d40b7bdcdc8a10d1d30c81420aa5b 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java -@@ -96,12 +96,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc +@@ -94,12 +94,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc public boolean isEmpty() { this.unpackLootTable((Player)null); // Paper start diff --git a/patches/server/0036-Inline-level-height.patch b/patches/server/0036-Inline-level-height.patch index 5dbe5b9..4a004fe 100644 --- a/patches/server/0036-Inline-level-height.patch +++ b/patches/server/0036-Inline-level-height.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 72f8910ebc1c486f5f3df19718a38ea066c8ee7b..fa262fdb15a82bf5dd0a03730677ecb777ab99bd 100644 +index c434d73f69cf39d2139a2e71605575733c8c4752..f6f5d385feb4c801a5fd7f1df81ac77838ef2a6f 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -209,6 +209,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -212,6 +212,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public abstract ResourceKey getTypeKey(); @@ -50,7 +50,7 @@ index 72f8910ebc1c486f5f3df19718a38ea066c8ee7b..fa262fdb15a82bf5dd0a03730677ecb7 protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, RegistryAccess iregistrycustom, Holder holder, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function paperWorldConfigCreator, java.util.function.Function galeWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration // Gale - Purpur - remove vanilla profiler this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper -@@ -231,6 +240,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -234,6 +243,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { }); final DimensionType dimensionmanager = (DimensionType) holder.value(); diff --git a/patches/server/0040-Reduce-entity-allocations.patch b/patches/server/0040-Reduce-entity-allocations.patch index be2d375..5a61f86 100644 --- a/patches/server/0040-Reduce-entity-allocations.patch +++ b/patches/server/0040-Reduce-entity-allocations.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index f182201f49dd9db41fe987a42c4c7cd19f07543c..c4fcd0fc2eb029daf2b3724cea1e5b8007373949 100644 +index 58d608a04183041e9b0cfabb1ef4a57b57642236..79096fc0827c6abffb4471fce87b695043643c3d 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -434,6 +434,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -439,6 +439,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S return this.originWorld; } // Paper end diff --git a/patches/server/0041-Remove-lambda-from-ticking-guard.patch b/patches/server/0041-Remove-lambda-from-ticking-guard.patch index 7a4db19..375f87d 100644 --- a/patches/server/0041-Remove-lambda-from-ticking-guard.patch +++ b/patches/server/0041-Remove-lambda-from-ticking-guard.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index f13daf2e529aa7e877c4882b76369cef8c780434..8105417cd90379642ca362c8b0d6ddcfcbaf47c6 100644 +index be1dbe955461823de7b3dbf032d399837be62ea9..1043f6e0567dd03dc8f6ef56d2c824493cf8c40e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -878,7 +878,20 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -895,7 +895,20 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.stopRiding(); } @@ -57,10 +57,10 @@ index f13daf2e529aa7e877c4882b76369cef8c780434..8105417cd90379642ca362c8b0d6ddcf } } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index fa262fdb15a82bf5dd0a03730677ecb777ab99bd..785f916d303b7601d4eeff5942ea3373f6454eab 100644 +index f6f5d385feb4c801a5fd7f1df81ac77838ef2a6f..8eb1ab90c11a38c0c35f89d39054efd721f6df6c 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -1319,13 +1319,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1330,13 +1330,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { try { tickConsumer.accept(entity); MinecraftServer.getServer().executeMidTickTasks(); // Paper - execute chunk tasks mid tick diff --git a/patches/server/0042-Reduce-entity-fluid-lookups-if-no-fluids.patch b/patches/server/0042-Reduce-entity-fluid-lookups-if-no-fluids.patch index 0fb5c56..75c42eb 100644 --- a/patches/server/0042-Reduce-entity-fluid-lookups-if-no-fluids.patch +++ b/patches/server/0042-Reduce-entity-fluid-lookups-if-no-fluids.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index c66df436e60bb86c91bf3047fa891a0f027aeab1..46ac334995f4771823f03a85388f6b45443331db 100644 +index 79096fc0827c6abffb4471fce87b695043643c3d..97fe21f2512481169cc269462b866bc194ed5fcc 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4346,16 +4346,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4388,16 +4388,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } public boolean updateFluidHeightAndDoFluidPushing(TagKey tag, double speed) { @@ -60,7 +60,7 @@ index c66df436e60bb86c91bf3047fa891a0f027aeab1..46ac334995f4771823f03a85388f6b45 double d1 = 0.0D; boolean flag = this.isPushedByFluid(); boolean flag1 = false; -@@ -4363,14 +4365,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4405,14 +4407,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S int k1 = 0; BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos(); @@ -128,7 +128,7 @@ index c66df436e60bb86c91bf3047fa891a0f027aeab1..46ac334995f4771823f03a85388f6b45 if (d2 >= axisalignedbb.minY) { flag1 = true; -@@ -4392,9 +4441,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4434,9 +4483,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S // CraftBukkit end } } diff --git a/patches/server/0043-SIMD-support.patch b/patches/server/0043-SIMD-support.patch index c53a9ad..ecd6949 100644 --- a/patches/server/0043-SIMD-support.patch +++ b/patches/server/0043-SIMD-support.patch @@ -13,10 +13,10 @@ As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/build.gradle.kts b/build.gradle.kts -index 266e5e177b23b48eb880565dcafdc16419e516db..de7a3389c66d5cb3123cf4c85d854bc727528b65 100644 +index c26c71c8613012c142be24711cb637717e07b6b8..e800e16e408d8a2f79c98bba229e878665b332db 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -71,6 +71,7 @@ tasks.withType { +@@ -85,6 +85,7 @@ tasks.withType { compilerArgs.add("-Xlint:-module") compilerArgs.add("-Xlint:-removal") compilerArgs.add("-Xlint:-dep-ann") @@ -24,7 +24,7 @@ index 266e5e177b23b48eb880565dcafdc16419e516db..de7a3389c66d5cb3123cf4c85d854bc7 } // Gale end - hide irrelevant compilation warnings -@@ -195,6 +196,7 @@ fun TaskContainer.registerRunTask( +@@ -209,6 +210,7 @@ fun TaskContainer.registerRunTask( minHeapSize = "${memoryGb}G" maxHeapSize = "${memoryGb}G" jvmArgs("--enable-preview") // Gale - enable preview features for development runs @@ -84,7 +84,7 @@ index 2acad4c3fd58178b0f8b22bdb04eeeeb689d5afa..850ccd53c5007e8b18344ba76c9e7f00 } diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 5ae5eba9b42b3a5adbad4896e692be0b7338ebaa..0c90a38ee504b2cc22d3bdcd57fbcd83f8bf9e6c 100644 +index 06ae3f1fee154d8f283fad6eeb06582ec647d519..d47e5442de3c6bf731b1b31454493855bc1e61e3 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -14,6 +14,8 @@ import java.util.Locale; diff --git a/patches/server/0044-Make-book-writing-configurable.patch b/patches/server/0044-Make-book-writing-configurable.patch index 8a23efd..5aa53ee 100644 --- a/patches/server/0044-Make-book-writing-configurable.patch +++ b/patches/server/0044-Make-book-writing-configurable.patch @@ -22,10 +22,10 @@ you to easily disable books, should you want to preemptively remove this functionality before additional exploits are found. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 65bb221993147a558995b36fb835f7b82e0eb4bd..11c0f81a6966ba07be793cd6778a5ce14b156898 100644 +index 30ccbab1586a656e0ae41d7406525fb02d9e025b..ec436869418f7c983d635e662b7c0d9eb77c6d13 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -178,6 +178,8 @@ import net.minecraft.world.phys.Vec3; +@@ -186,6 +186,8 @@ import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.shapes.BooleanOp; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; @@ -34,7 +34,7 @@ index 65bb221993147a558995b36fb835f7b82e0eb4bd..11c0f81a6966ba07be793cd6778a5ce1 import org.slf4j.Logger; // CraftBukkit start -@@ -1119,6 +1121,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1124,6 +1126,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleEditBook(ServerboundEditBookPacket packet) { diff --git a/patches/server/0045-Optimize-entity-coordinate-key.patch b/patches/server/0045-Optimize-entity-coordinate-key.patch index f3e32cc..3862711 100644 --- a/patches/server/0045-Optimize-entity-coordinate-key.patch +++ b/patches/server/0045-Optimize-entity-coordinate-key.patch @@ -22,10 +22,10 @@ data is already available in the blockPosition struct, so we use that instead of re-doing the casting. diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java -index 4fd889d717a22c84ebd092d80739c6e7f1fb8534..a7f0c7c0618f004315570801334d52ce3ec4b4e2 100644 +index adfb793ba2ca4552e0b800d37f166ea55562a57a..af49374eea8e85917687da19e8aa7491e560e41b 100644 --- a/src/main/java/io/papermc/paper/util/MCUtil.java +++ b/src/main/java/io/papermc/paper/util/MCUtil.java -@@ -211,7 +211,7 @@ public final class MCUtil { +@@ -210,7 +210,7 @@ public final class MCUtil { } public static long getCoordinateKey(final Entity entity) { @@ -35,10 +35,10 @@ index 4fd889d717a22c84ebd092d80739c6e7f1fb8534..a7f0c7c0618f004315570801334d52ce public static long getCoordinateKey(final ChunkPos pair) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 55306f3aaed98307ed0ac662351d18e274095a01..ec0c8205959d451c5f8c15f0aa11d0115f1d8125 100644 +index 97fe21f2512481169cc269462b866bc194ed5fcc..b9b3391726cbd801e1d386f13323aa907d4d51b9 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -306,7 +306,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -307,7 +307,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S public double yo; public double zo; private Vec3 position; diff --git a/patches/server/0046-Reduce-in-wall-checks.patch b/patches/server/0046-Reduce-in-wall-checks.patch index 84b0d15..6b7205d 100644 --- a/patches/server/0046-Reduce-in-wall-checks.patch +++ b/patches/server/0046-Reduce-in-wall-checks.patch @@ -28,10 +28,10 @@ but is so much cheaper than the suffocation check that it's worth keeping it. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 5f7e49d291e93373ba828aafc57fa6df0cd1a3e9..1794f5d1a8cc912fdd75a18ceccb536f48ab4686 100644 +index 93c810fe4c392b20295f73044470aa45f13d857f..ae070ceb7f696af8b43c4d2c2ff6daf221c8a9db 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -412,7 +412,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -411,7 +411,10 @@ public abstract class LivingEntity extends Entity implements Attackable { boolean flag = this instanceof net.minecraft.world.entity.player.Player; if (!this.level().isClientSide) { @@ -43,7 +43,7 @@ index 5f7e49d291e93373ba828aafc57fa6df0cd1a3e9..1794f5d1a8cc912fdd75a18ceccb536f this.hurt(this.damageSources().inWall(), 1.0F); } else if (flag && !this.level().getWorldBorder().isWithinBounds(this.getBoundingBox())) { double d0 = this.level().getWorldBorder().getDistanceToBorder(this) + this.level().getWorldBorder().getDamageSafeZone(); -@@ -1406,6 +1409,15 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1405,6 +1408,15 @@ public abstract class LivingEntity extends Entity implements Attackable { return this.getHealth() <= 0.0F; } diff --git a/patches/server/0047-Make-chat-order-verification-configurable.patch b/patches/server/0047-Make-chat-order-verification-configurable.patch index 6a0434c..c2648bf 100644 --- a/patches/server/0047-Make-chat-order-verification-configurable.patch +++ b/patches/server/0047-Make-chat-order-verification-configurable.patch @@ -12,22 +12,27 @@ By: Kevin Raneri As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) -diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 11c0f81a6966ba07be793cd6778a5ce14b156898..fd01a4ffb44024e46ea6d45dabd8f851cb8ebfa5 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2281,6 +2281,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - } +diff --git a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java +index 85a8a687b1568a56e3e646b37ef78b562c1b8a82..992617212932a38f5586cd3d0e1fbebb3a8d4f14 100644 +--- a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java ++++ b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java +@@ -9,6 +9,7 @@ import net.minecraft.util.SignatureUpdater; + import net.minecraft.util.SignatureValidator; + import net.minecraft.util.Signer; + import net.minecraft.world.entity.player.ProfilePublicKey; ++import org.galemc.gale.configuration.GaleGlobalConfiguration; + import org.slf4j.Logger; - private boolean updateChatOrder(Instant timestamp) { -+ // Gale start - Pufferfish - make chat order verification configurable -+ if (!GaleGlobalConfiguration.get().misc.verifyChatOrder) { -+ return true; -+ } -+ // Gale end - Pufferfish - make chat order verification configurable - Instant instant1; - - do { + public class SignedMessageChain { +@@ -38,7 +39,7 @@ public class SignedMessageChain { + throw new SignedMessageChain.DecodeException(Component.translatable("chat.disabled.chain_broken"), false); // Paper - diff on change (if disconnects, need a new kick event cause) + } else if (playerPublicKey.data().hasExpired()) { + throw new SignedMessageChain.DecodeException(Component.translatable("chat.disabled.expiredProfileKey", org.bukkit.event.player.PlayerKickEvent.Cause.EXPIRED_PROFILE_PUBLIC_KEY), false); // Paper - kick event causes +- } else if (body.timeStamp().isBefore(this.lastTimeStamp)) { ++ } else if (body.timeStamp().isBefore(this.lastTimeStamp) && GaleGlobalConfiguration.get().misc.verifyChatOrder) { // Gale - Pufferfish - make chat order verification configurable + throw new SignedMessageChain.DecodeException(Component.translatable("multiplayer.disconnect.out_of_order_chat", org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT), true); // Paper - kick event causes + } else { + this.lastTimeStamp = body.timeStamp(); diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java index 346fdf6f8a76539fa9ca46015ee122417e4a8102..7c781eabbb6df5df9f9f2cbdeef4e116ca30b645 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java diff --git a/patches/server/0050-Don-t-trigger-lootable-refresh-for-non-player-intera.patch b/patches/server/0050-Don-t-trigger-lootable-refresh-for-non-player-intera.patch index 9b6d780..0bd7031 100644 --- a/patches/server/0050-Don-t-trigger-lootable-refresh-for-non-player-intera.patch +++ b/patches/server/0050-Don-t-trigger-lootable-refresh-for-non-player-intera.patch @@ -13,14 +13,14 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java -index b71638976cacf542662beb1f77fc40182be65215..5ac1667dd79389195f656eff97f83a2dafaf1c28 100644 +index 1de09539877d40b7bdcdc8a10d1d30c81420aa5b..57be35f6a3954aec8b3b039c1d7bb02f8359cf5b 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java -@@ -70,6 +70,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc - } +@@ -68,6 +68,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc - public void unpackLootTable(@Nullable Player player) { + @Override + public void unpackLootTable(@org.jetbrains.annotations.Nullable final Player player) { + if (player == null) return; // Gale - EMC - don't trigger lootable refresh for non-player interaction - if (this.level != null && this.lootableData.shouldReplenish(player) && this.level.getServer() != null) { // Paper - don't unpack loot table if not in world - LootTable lootTable = this.level.getServer().getLootData().getLootTable(this.lootTable); - if (player instanceof ServerPlayer) { + // Copied from super with changes, always check the original method + net.minecraft.world.level.Level level = this.getLevel(); + BlockPos blockPos = this.getBlockPos(); diff --git a/patches/server/0051-Reduce-hopper-item-checks.patch b/patches/server/0051-Reduce-hopper-item-checks.patch index ccc2961..bfc7f5c 100644 --- a/patches/server/0051-Reduce-hopper-item-checks.patch +++ b/patches/server/0051-Reduce-hopper-item-checks.patch @@ -17,7 +17,7 @@ Licensed under: MIT (https://opensource.org/licenses/MIT) Only do an item "suck in" action once per second diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index eb0351aa12eebcefab1d1d14641fc3c60cbbcab8..760e54d74fc027e631e45b07b729d060511d5bfd 100644 +index a39db702063887cf530f272deaf4f334047cc7d4..2abd920e78a4da56654da87034c36c77d2fc6b35 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java @@ -14,11 +14,13 @@ import net.minecraft.world.entity.Entity; @@ -34,7 +34,7 @@ index eb0351aa12eebcefab1d1d14641fc3c60cbbcab8..760e54d74fc027e631e45b07b729d060 import net.minecraft.world.phys.Vec3; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; -@@ -209,11 +211,31 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -227,11 +229,31 @@ public class ItemEntity extends Entity implements TraceableEntity { } // CraftBukkit end this.discard(); @@ -66,7 +66,7 @@ index eb0351aa12eebcefab1d1d14641fc3c60cbbcab8..760e54d74fc027e631e45b07b729d060 // Spigot start - copied from above @Override public void inactiveTick() { -@@ -233,7 +255,13 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -251,7 +273,13 @@ public class ItemEntity extends Entity implements TraceableEntity { } // CraftBukkit end this.discard(); @@ -119,7 +119,7 @@ index a05acf709735b40ca86f978508c63a86065fd405..3752b4ba7fb0d680d4b4a61bf44d54d5 double getLevelY(); diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index f30278bb704ecfb5746e798b97e6e945bc6bfce7..f44372ec510273c8507865cd079f60bbd6fc586c 100644 +index 90c354d37a8db3bcad79aa882d52d5d25482c02d..375d1dc3a7897007f8d0997153fd77d16ff07388 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -11,6 +11,7 @@ import net.minecraft.core.Direction; diff --git a/patches/server/0054-Do-not-process-chat-commands-before-player-has-joine.patch b/patches/server/0054-Do-not-process-chat-commands-before-player-has-joine.patch index c8f275d..c2af475 100644 --- a/patches/server/0054-Do-not-process-chat-commands-before-player-has-joine.patch +++ b/patches/server/0054-Do-not-process-chat-commands-before-player-has-joine.patch @@ -13,10 +13,10 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index db0aa97608cc209ad63a93443498c7ffa362968f..a684be3ed6a464816eabdfe94f0ce1bf5bd91b54 100644 +index 5ed738854aebc3ca56dfba72e91971593c7a0db9..9701f93f0b6c51b01b05a54ed7482dbff75d9e8e 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -268,6 +268,7 @@ public class ServerPlayer extends Player { +@@ -275,6 +275,7 @@ public class ServerPlayer extends Player { public boolean joining = true; public boolean sentListPacket = false; public boolean supressTrackerForLogin = false; // Paper @@ -25,25 +25,25 @@ index db0aa97608cc209ad63a93443498c7ffa362968f..a684be3ed6a464816eabdfe94f0ce1bf public boolean isRealPlayer; // Paper public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index fd01a4ffb44024e46ea6d45dabd8f851cb8ebfa5..80140474fc1b43009e757d1fa7d1324ee9f35bca 100644 +index ec436869418f7c983d635e662b7c0d9eb77c6d13..6f3d36758bbeb6a5f0c3d7681fa09d09ce25a721 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2258,6 +2258,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales - this.send(new ClientboundSystemChatPacket(PaperAdventure.asAdventure(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED)), false)); // Paper - Adventure - return Optional.empty(); -+ // Gale start - EMC - do not process chat/commands before player has joined -+ } else if (!player.didPlayerJoinEvent) { -+ return Optional.empty(); -+ // Gale end - EMC - do not process chat/commands before player has joined - } else { - this.player.resetLastActionTime(); - return optional; +@@ -2274,6 +2274,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl + if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales + this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false)); + return Optional.empty(); ++ // Gale start - EMC - do not process chat/commands before player has joined ++ } else if (!player.didPlayerJoinEvent) { ++ return Optional.empty(); ++ // Gale end - EMC - do not process chat/commands before player has joined + } else { + this.player.resetLastActionTime(); + return optional; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 33abcf12b4426572b74ca4c813e4392c823494bc..0f8eac5bf5e8f59c511f4b0040bc8a84b8a05c5c 100644 +index a35638a92479b90afa89cf201fc45b49c9e767f3..05eaf2174e055bb78c58c8c2a2b51b17c898ff47 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -349,6 +349,8 @@ public abstract class PlayerList { +@@ -347,6 +347,8 @@ public abstract class PlayerList { return; } diff --git a/patches/server/0056-Do-not-log-empty-message-warnings.patch b/patches/server/0056-Do-not-log-empty-message-warnings.patch index b81736a..50fccec 100644 --- a/patches/server/0056-Do-not-log-empty-message-warnings.patch +++ b/patches/server/0056-Do-not-log-empty-message-warnings.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 80140474fc1b43009e757d1fa7d1324ee9f35bca..75b6adb8195fac955dd9c741324b63cfc4d4c578 100644 +index 6f3d36758bbeb6a5f0c3d7681fa09d09ce25a721..7333a7302d295f4b085e636ce800090d26982f0d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -179,6 +179,7 @@ import net.minecraft.world.phys.shapes.BooleanOp; +@@ -187,6 +187,7 @@ import net.minecraft.world.phys.shapes.BooleanOp; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions; @@ -18,7 +18,7 @@ index 80140474fc1b43009e757d1fa7d1324ee9f35bca..75b6adb8195fac955dd9c741324b63cf import org.galemc.gale.configuration.GaleGlobalConfiguration; import org.slf4j.Logger; -@@ -2443,7 +2444,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2440,7 +2441,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl // CraftBukkit start String s = message.signedContent(); if (s.isEmpty()) { diff --git a/patches/server/0057-Do-not-log-ignored-advancements.patch b/patches/server/0057-Do-not-log-ignored-advancements.patch index b65415d..120f1d2 100644 --- a/patches/server/0057-Do-not-log-ignored-advancements.patch +++ b/patches/server/0057-Do-not-log-ignored-advancements.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java -index e38e2e5a7ddba9c140f362021b6be0b0974f7cd1..33c36779548332a8c3653c6b829d941b6dc5fd49 100644 +index f655e0ae4a287886d0291cd0089bad2000249d0f..e15409231e56f5bbbfbcd19cea2c7e3fbc612886 100644 --- a/src/main/java/net/minecraft/server/PlayerAdvancements.java +++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java -@@ -46,6 +46,7 @@ import net.minecraft.server.level.ServerPlayer; +@@ -45,6 +45,7 @@ import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.players.PlayerList; import net.minecraft.util.datafix.DataFixTypes; import net.minecraft.world.level.GameRules; @@ -48,7 +48,7 @@ index e38e2e5a7ddba9c140f362021b6be0b0974f7cd1..33c36779548332a8c3653c6b829d941b import org.slf4j.Logger; public class PlayerAdvancements { -@@ -200,7 +201,7 @@ public class PlayerAdvancements { +@@ -199,7 +200,7 @@ public class PlayerAdvancements { if (advancementholder == null) { if (!minecraftkey.getNamespace().equals("minecraft")) return; // CraftBukkit diff --git a/patches/server/0062-Do-not-log-expired-message-warnings.patch b/patches/server/0062-Do-not-log-expired-message-warnings.patch index 62149c9..041b803 100644 --- a/patches/server/0062-Do-not-log-expired-message-warnings.patch +++ b/patches/server/0062-Do-not-log-expired-message-warnings.patch @@ -7,18 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java -index c0a80824a0307ea673805015119cc834b268f0dc..d7c6e90ccf3a8ce58e5533c5158ce62668cbcb78 100644 +index 992617212932a38f5586cd3d0e1fbebb3a8d4f14..a61b904b59651b2b9d4dfab7126677ec08a376ac 100644 --- a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java +++ b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java -@@ -8,6 +8,7 @@ import net.minecraft.util.SignatureUpdater; - import net.minecraft.util.SignatureValidator; - import net.minecraft.util.Signer; - import net.minecraft.world.entity.player.ProfilePublicKey; -+import org.galemc.gale.configuration.GaleGlobalConfiguration; - import org.slf4j.Logger; - - public class SignedMessageChain { -@@ -42,7 +43,7 @@ public class SignedMessageChain { +@@ -48,7 +48,7 @@ public class SignedMessageChain { throw new SignedMessageChain.DecodeException(Component.translatable("multiplayer.disconnect.unsigned_chat"), true, org.bukkit.event.player.PlayerKickEvent.Cause.UNSIGNED_CHAT); // Paper - kick event causes } else { if (playerChatMessage.hasExpiredServer(Instant.now())) { diff --git a/patches/server/0064-Do-not-log-Not-Secure-marker.patch b/patches/server/0063-Do-not-log-Not-Secure-marker.patch similarity index 87% rename from patches/server/0064-Do-not-log-Not-Secure-marker.patch rename to patches/server/0063-Do-not-log-Not-Secure-marker.patch index 54d4900..4ec848f 100644 --- a/patches/server/0064-Do-not-log-Not-Secure-marker.patch +++ b/patches/server/0063-Do-not-log-Not-Secure-marker.patch @@ -28,13 +28,13 @@ index e4fd372a1d585887287253a02531cd192929377b..397f985756c5bc6c11a32c844d536000 } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 0f8eac5bf5e8f59c511f4b0040bc8a84b8a05c5c..0353ab33aab3579e82ec0f7115763e190d080e9e 100644 +index 05eaf2174e055bb78c58c8c2a2b51b17c898ff47..206f179a4c6ea8eab75200ee72efb21e29d28a53 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -102,6 +102,7 @@ import net.minecraft.world.scores.Objective; +@@ -100,6 +100,7 @@ import net.minecraft.world.phys.Vec3; + import net.minecraft.world.scores.DisplaySlot; + import net.minecraft.world.scores.Objective; import net.minecraft.world.scores.PlayerTeam; - import net.minecraft.world.scores.Scoreboard; // Paper - import net.minecraft.world.scores.Team; +import org.galemc.gale.configuration.GaleGlobalConfiguration; import org.slf4j.Logger; @@ -49,13 +49,13 @@ index 0f8eac5bf5e8f59c511f4b0040bc8a84b8a05c5c..0353ab33aab3579e82ec0f7115763e19 boolean flag1 = false; diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -index 2d95bad5bf426da29aa7a0e573b38b6e158614ea..6cc221b02d543c7d5cd9a8b1b544206fd31b04fa 100644 +index ca6d3712f4552534585b46e921738ec9416095ab..0f5471291c482bd2b8ecc588da74a408563b7312 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -@@ -100,6 +100,7 @@ public class GaleGlobalConfiguration extends ConfigurationPart { +@@ -99,6 +99,7 @@ public class GaleGlobalConfiguration extends ConfigurationPart { + public class Chat extends ConfigurationPart { public boolean emptyMessageWarning = false; // Gale - do not log empty message warnings public boolean expiredMessageWarning = false; // Gale - do not log expired message warnings - public boolean outOfOrderMessageWarning = false; // Gale - do not log out-of-order message warnings + public boolean notSecureMarker = true; // Gale - do not log Not Secure marker } diff --git a/patches/server/0063-Do-not-log-out-of-order-message-warnings.patch b/patches/server/0063-Do-not-log-out-of-order-message-warnings.patch deleted file mode 100644 index 4eb970c..0000000 --- a/patches/server/0063-Do-not-log-out-of-order-message-warnings.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Martijn Muijsers -Date: Mon, 26 Dec 2022 05:18:17 +0100 -Subject: [PATCH] Do not log out-of-order message warnings - -License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) -Gale - https://galemc.org - -diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 75b6adb8195fac955dd9c741324b63cfc4d4c578..b7f3bf0553fe72449f54f45046fe5b8b69eb5b59 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2248,7 +2248,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - - private Optional tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { - if (!this.updateChatOrder(timestamp)) { -- ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}': {} > {}", this.player.getName().getString(), message, this.lastChatTimeStamp.get().getEpochSecond(), timestamp.getEpochSecond()); // Paper -+ if (GaleGlobalConfiguration.get().logToConsole.chat.outOfOrderMessageWarning) ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}': {} > {}", this.player.getName().getString(), message, this.lastChatTimeStamp.get().getEpochSecond(), timestamp.getEpochSecond()); // Paper // Gale - do not log out-of-order message warnings - this.server.scheduleOnMain(() -> { // Paper - push to main - this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event causes - }); // Paper - push to main -diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -index ca6d3712f4552534585b46e921738ec9416095ab..2d95bad5bf426da29aa7a0e573b38b6e158614ea 100644 ---- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -+++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -@@ -99,6 +99,7 @@ public class GaleGlobalConfiguration extends ConfigurationPart { - public class Chat extends ConfigurationPart { - public boolean emptyMessageWarning = false; // Gale - do not log empty message warnings - public boolean expiredMessageWarning = false; // Gale - do not log expired message warnings -+ public boolean outOfOrderMessageWarning = false; // Gale - do not log out-of-order message warnings - } - - // Gale start - Purpur - do not log plugin library loads diff --git a/patches/server/0065-Do-not-log-disconnections-with-null-id.patch b/patches/server/0064-Do-not-log-disconnections-with-null-id.patch similarity index 89% rename from patches/server/0065-Do-not-log-disconnections-with-null-id.patch rename to patches/server/0064-Do-not-log-disconnections-with-null-id.patch index da6e0a8..b8e3ca0 100644 --- a/patches/server/0065-Do-not-log-disconnections-with-null-id.patch +++ b/patches/server/0064-Do-not-log-disconnections-with-null-id.patch @@ -17,18 +17,18 @@ Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) This can help to hide annoying scanning bots from showing up in console. diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index ff2dd53e9e943aa929188fd9d4c35498b78c497a..a8ebafacbf3f146cb835a4855db54baf2731992e 100644 +index 89b3184be952fd0803520dd0f717f3acfc3cb496..4ed1b205d2b31c00fbf9aa70cd2c13e7d0fe0534 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -38,6 +38,7 @@ import net.minecraft.util.Crypt; - import net.minecraft.util.CryptException; +@@ -39,6 +39,7 @@ import net.minecraft.util.CryptException; import net.minecraft.util.RandomSource; + import net.minecraft.world.entity.player.Player; import org.apache.commons.lang3.Validate; +import org.galemc.gale.configuration.GaleGlobalConfiguration; import org.slf4j.Logger; import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.player.AsyncPlayerPreLoginEvent; -@@ -126,6 +127,14 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -127,6 +128,14 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @Override public void onDisconnect(Component reason) { @@ -44,7 +44,7 @@ index ff2dd53e9e943aa929188fd9d4c35498b78c497a..a8ebafacbf3f146cb835a4855db54baf } diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -index 6cc221b02d543c7d5cd9a8b1b544206fd31b04fa..91776314125f1101b7b67304b55748bda8c6e09b 100644 +index 0f5471291c482bd2b8ecc588da74a408563b7312..d95141f43ebbad984db96416623957bd47f3ac1b 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java @@ -94,6 +94,7 @@ public class GaleGlobalConfiguration extends ConfigurationPart { diff --git a/patches/server/0066-Do-not-log-run-as-root-warning.patch b/patches/server/0065-Do-not-log-run-as-root-warning.patch similarity index 96% rename from patches/server/0066-Do-not-log-run-as-root-warning.patch rename to patches/server/0065-Do-not-log-run-as-root-warning.patch index 5238c57..aa17784 100644 --- a/patches/server/0066-Do-not-log-run-as-root-warning.patch +++ b/patches/server/0065-Do-not-log-run-as-root-warning.patch @@ -41,7 +41,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 0c90a38ee504b2cc22d3bdcd57fbcd83f8bf9e6c..78e4e90a6267287a83ac178502ae1dbaecd999a0 100644 +index d47e5442de3c6bf731b1b31454493855bc1e61e3..64701667486002c60c9d1819e57ac40153306a71 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -179,7 +179,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface diff --git a/patches/server/0067-Do-not-log-offline-mode-warning.patch b/patches/server/0066-Do-not-log-offline-mode-warning.patch similarity index 96% rename from patches/server/0067-Do-not-log-offline-mode-warning.patch rename to patches/server/0066-Do-not-log-offline-mode-warning.patch index c934cc1..34137eb 100644 --- a/patches/server/0067-Do-not-log-offline-mode-warning.patch +++ b/patches/server/0066-Do-not-log-offline-mode-warning.patch @@ -41,7 +41,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 78e4e90a6267287a83ac178502ae1dbaecd999a0..72a364253d5871b4902b50cfd57d0b7f30c742e6 100644 +index 64701667486002c60c9d1819e57ac40153306a71..08d82f8592714eac92ead36b98460de6ff607cfe 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -290,7 +290,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface diff --git a/patches/server/0068-Softly-log-invalid-pool-element-errors.patch b/patches/server/0067-Softly-log-invalid-pool-element-errors.patch similarity index 97% rename from patches/server/0068-Softly-log-invalid-pool-element-errors.patch rename to patches/server/0067-Softly-log-invalid-pool-element-errors.patch index 68bdd1f..45af852 100644 --- a/patches/server/0068-Softly-log-invalid-pool-element-errors.patch +++ b/patches/server/0067-Softly-log-invalid-pool-element-errors.patch @@ -39,7 +39,7 @@ index d2b4654a9095a678bbc9e004af969cf54da0fcab..d797bac97ec1adec7a25a26c8e052e70 }); this.rotation = Rotation.valueOf(nbt.getString("rotation")); diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -index 91776314125f1101b7b67304b55748bda8c6e09b..24c67ac6e8f2572cc2e79350fdf4201825ee9e72 100644 +index d95141f43ebbad984db96416623957bd47f3ac1b..ea7f6a826763af8aa10d79e82b9ba99198e31e06 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java @@ -4,10 +4,14 @@ package org.galemc.gale.configuration; @@ -66,7 +66,7 @@ index 91776314125f1101b7b67304b55748bda8c6e09b..24c67ac6e8f2572cc2e79350fdf42018 public boolean invalidStatistics = true; // Gale - EMC - do not log invalid statistics public boolean ignoredAdvancements = true; // Gale - Purpur - do not log ignored advancements -@@ -122,6 +126,21 @@ public class GaleGlobalConfiguration extends ConfigurationPart { +@@ -121,6 +125,21 @@ public class GaleGlobalConfiguration extends ConfigurationPart { } // Gale end - Purpur - do not log plugin library loads diff --git a/patches/server/0069-Fix-outdated-server-showing-in-ping-before-server-fu.patch b/patches/server/0068-Fix-outdated-server-showing-in-ping-before-server-fu.patch similarity index 96% rename from patches/server/0069-Fix-outdated-server-showing-in-ping-before-server-fu.patch rename to patches/server/0068-Fix-outdated-server-showing-in-ping-before-server-fu.patch index 9ff5e25..2893d71 100644 --- a/patches/server/0069-Fix-outdated-server-showing-in-ping-before-server-fu.patch +++ b/patches/server/0068-Fix-outdated-server-showing-in-ping-before-server-fu.patch @@ -38,7 +38,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java -index 2c13147bc063a09bb7907d6f90c3a1e811a09eb1..38ba786b86de87a3e407e50b4cde40456200936f 100644 +index e5006e7672ba79ed4bcf2c4173c5a9ed4c68395b..cd0971429ae679311269004ffde8743c9ddcef6b 100644 --- a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java @@ -153,6 +153,10 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene diff --git a/patches/server/0070-Make-sand-duping-fix-configurable.patch b/patches/server/0069-Make-sand-duping-fix-configurable.patch similarity index 97% rename from patches/server/0070-Make-sand-duping-fix-configurable.patch rename to patches/server/0069-Make-sand-duping-fix-configurable.patch index ea87786..863960c 100644 --- a/patches/server/0070-Make-sand-duping-fix-configurable.patch +++ b/patches/server/0069-Make-sand-duping-fix-configurable.patch @@ -37,7 +37,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index 9105418b29c89f092378da11b14e3d324332a2ba..b8454f977c5b5690bffa70a063f7c349905abaae 100644 +index 45c07733f03b5c11f6d8e820f65dc950c70d9a67..fa1888db518d22e4069b4dcc42d80560181243e7 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java @@ -133,7 +133,7 @@ public class FallingBlockEntity extends Entity { diff --git a/patches/server/0071-Make-tripwire-duping-fix-configurable.patch b/patches/server/0070-Make-tripwire-duping-fix-configurable.patch similarity index 93% rename from patches/server/0071-Make-tripwire-duping-fix-configurable.patch rename to patches/server/0070-Make-tripwire-duping-fix-configurable.patch index 2a6a8f4..f491d80 100644 --- a/patches/server/0071-Make-tripwire-duping-fix-configurable.patch +++ b/patches/server/0070-Make-tripwire-duping-fix-configurable.patch @@ -7,10 +7,10 @@ License: MIT (https://opensource.org/licenses/MIT) Leaf - https://github.com/Winds-Studio/Leaf diff --git a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java -index cb2ff8d94308c637a498d2737f86f6af4c9c1b83..eb1ecbbb5c0f887ee1c7de85a6137f2f182b3fc0 100644 +index 2f947997ca746d18544940ef67ff550a95946edd..cc7096d54a5b9412c3cda4d1a0d99d042739a789 100644 --- a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java -@@ -78,7 +78,7 @@ public class TripWireBlock extends Block { +@@ -91,7 +91,7 @@ public class TripWireBlock extends Block { public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) { if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return; // Paper - prevent adjacent tripwires from updating if (!moved && !state.is(newState.getBlock())) { diff --git a/patches/server/0072-Fix-MC-238526.patch b/patches/server/0071-Fix-MC-238526.patch similarity index 95% rename from patches/server/0072-Fix-MC-238526.patch rename to patches/server/0071-Fix-MC-238526.patch index 439f79c..25c08e6 100644 --- a/patches/server/0072-Fix-MC-238526.patch +++ b/patches/server/0071-Fix-MC-238526.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java -index cd2ce5bcb8c30e4657cd0e340d80544c7e805905..db3574e4ec9bad32bbbcd9d7ab9607da60e1715a 100644 +index 827912174ee08cd19249797d351887149b25c880..15dfa2537da2b98deea09a3515c00fb2839121f5 100644 --- a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java +++ b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java -@@ -82,6 +82,6 @@ public abstract class WaterAnimal extends PathfinderMob { +@@ -77,6 +77,6 @@ public abstract class WaterAnimal extends PathfinderMob { i = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(i); j = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(j); // Paper end diff --git a/patches/server/0073-Fix-cow-rotation-when-shearing-mooshroom.patch b/patches/server/0072-Fix-cow-rotation-when-shearing-mooshroom.patch similarity index 97% rename from patches/server/0073-Fix-cow-rotation-when-shearing-mooshroom.patch rename to patches/server/0072-Fix-cow-rotation-when-shearing-mooshroom.patch index c3b1d18..8e0caf9 100644 --- a/patches/server/0073-Fix-cow-rotation-when-shearing-mooshroom.patch +++ b/patches/server/0072-Fix-cow-rotation-when-shearing-mooshroom.patch @@ -37,7 +37,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java -index 52cc265f1663d648b6bfd03f2ac3e191b1c16d44..652c8b5b579a06ab7e66df78bbf323cd9188208c 100644 +index e42b0b19019ef74733fd19b08f882cccff920142..d3982fc50ab87f64893ae5838d0256576912d311 100644 --- a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java +++ b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java @@ -176,12 +176,21 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder PRIMITIVE_ARG_CODEC = ExtraCodecs.validate(ExtraCodecs.JAVA, TranslatableContents::filterAllowedArguments); + private static final Codec ARG_CODEC = Codec.either(PRIMITIVE_ARG_CODEC, ComponentSerialization.CODEC).xmap((either) -> { + return either.map((object) -> { diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index ec268189b19b6fa5c4521f96ce211a531db35ec5..1577a6aeeaaf6a131008f536a125b9b986f3139e 100644 +index 7573c12a77797146c51ef2dfe4b2a636df45e21a..43ba5c26f40a9b00480198e10141275c07938994 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java -@@ -90,7 +90,7 @@ public class Main { +@@ -87,7 +87,7 @@ public class Main { OptionSpec optionspec5 = optionparser.accepts("eraseCache"); OptionSpec optionspec6 = optionparser.accepts("safeMode", "Loads level with vanilla datapack only"); OptionSpec optionspec7 = optionparser.accepts("help").forHelp(); @@ -390,10 +390,10 @@ index ec268189b19b6fa5c4521f96ce211a531db35ec5..1577a6aeeaaf6a131008f536a125b9b9 OptionSpec optionspec10 = optionparser.accepts("port").withRequiredArg().ofType(Integer.class).defaultsTo(-1, new Integer[0]); OptionSpec optionspec11 = optionparser.accepts("serverId").withRequiredArg(); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3810c8e431258c030fcbe9788d24307a24872677..7db5c6d9a4bab340a2ae95c43388281445690d29 100644 +index 557bfd1405603d1cd7e5210e406e63283947179b..7c691b953d66c9fb7a1f372ac885285ed55d9979 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -50,6 +50,8 @@ import java.util.stream.Collectors; +@@ -51,6 +51,8 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import javax.annotation.Nullable; import javax.imageio.ImageIO; @@ -416,7 +416,7 @@ index e8bb35322d3204e6a126bc6df0beed3f931dae6d..6bfa866ce2b3dab86dcbaba9fdf52737 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 0227b2cd2c38b18b958b52c6febca4a836126b7e..c097ea14a9f43f667b91d3a1cf8a61a5c648b979 100644 +index 1043f6e0567dd03dc8f6ef56d2c824493cf8c40e..902b9c144cdedabbc3dc489c8643351c2f31aabe 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -38,6 +38,8 @@ import java.util.stream.Collectors; @@ -426,18 +426,18 @@ index 0227b2cd2c38b18b958b52c6febca4a836126b7e..c097ea14a9f43f667b91d3a1cf8a61a5 + +import me.titaniumtown.ArrayConstants; import net.minecraft.CrashReport; + import net.minecraft.CrashReportCategory; import net.minecraft.Util; - import net.minecraft.core.BlockPos; -@@ -1026,7 +1028,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1045,7 +1047,7 @@ public class ServerLevel extends Level implements WorldGenLevel { BlockPos blockposition2 = blockposition.set(j + randomX, randomY, k + randomZ); BlockState iblockdata = com.destroystokyo.paper.util.maplist.IBlockDataList.getBlockDataFromRaw(raw); - iblockdata.randomTick(this, blockposition2, this.randomTickRandom); + iblockdata.randomTick(this, blockposition2.immutable(), this.randomTickRandom); // Gale - JettPack - reduce array allocations - // We drop the fluid tick since LAVA is ALREADY TICKED by the above method (See LiquidBlock). - // TODO CHECK ON UPDATE (ping the Canadian) } -@@ -1327,7 +1329,7 @@ public class ServerLevel extends Level implements WorldGenLevel { + // We drop the fluid tick since LAVA is ALREADY TICKED by the above method (See LiquidBlock). + // TODO CHECK ON UPDATE (ping the Canadian) +@@ -1351,7 +1353,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public static List getCurrentlyTickingEntities() { Entity ticking = currentlyTickingEntity.get(); @@ -447,10 +447,10 @@ index 0227b2cd2c38b18b958b52c6febca4a836126b7e..c097ea14a9f43f667b91d3a1cf8a61a5 return ret; } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index b7f3bf0553fe72449f54f45046fe5b8b69eb5b59..fadeac3a787350f6b3d4936825b3b02bd0cde31a 100644 +index 7333a7302d295f4b085e636ce800090d26982f0d..8b9fccee2f999836cb7550955ee4b38cde990286 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -29,6 +29,8 @@ import java.util.function.UnaryOperator; +@@ -28,6 +28,8 @@ import java.util.function.UnaryOperator; import java.util.stream.Collectors; import java.util.stream.Stream; import javax.annotation.Nullable; @@ -459,7 +459,7 @@ index b7f3bf0553fe72449f54f45046fe5b8b69eb5b59..fadeac3a787350f6b3d4936825b3b02b import net.minecraft.ChatFormatting; import net.minecraft.SharedConstants; import net.minecraft.Util; -@@ -169,7 +171,6 @@ import net.minecraft.world.level.block.entity.CommandBlockEntity; +@@ -177,7 +179,6 @@ import net.minecraft.world.level.block.entity.CrafterBlockEntity; import net.minecraft.world.level.block.entity.JigsawBlockEntity; import net.minecraft.world.level.block.entity.SignBlockEntity; import net.minecraft.world.level.block.entity.StructureBlockEntity; @@ -467,7 +467,7 @@ index b7f3bf0553fe72449f54f45046fe5b8b69eb5b59..fadeac3a787350f6b3d4936825b3b02b import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.BlockHitResult; -@@ -223,8 +224,6 @@ import org.bukkit.event.inventory.InventoryCreativeEvent; +@@ -227,8 +228,6 @@ import org.bukkit.event.inventory.InventoryCreativeEvent; import org.bukkit.event.inventory.InventoryType.SlotType; import org.bukkit.event.inventory.SmithItemEvent; import org.bukkit.event.player.AsyncPlayerChatEvent; @@ -476,7 +476,7 @@ index b7f3bf0553fe72449f54f45046fe5b8b69eb5b59..fadeac3a787350f6b3d4936825b3b02b import org.bukkit.event.player.PlayerChatEvent; import org.bukkit.event.player.PlayerCommandPreprocessEvent; import org.bukkit.event.player.PlayerInteractAtEntityEvent; -@@ -774,13 +773,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -777,13 +776,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - run this async // CraftBukkit start if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable @@ -492,7 +492,7 @@ index b7f3bf0553fe72449f54f45046fe5b8b69eb5b59..fadeac3a787350f6b3d4936825b3b02b return; } // Paper end -@@ -3215,7 +3214,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3212,7 +3211,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl // Paper start if (!org.bukkit.Bukkit.isPrimaryThread()) { if (this.recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) { @@ -502,34 +502,35 @@ index b7f3bf0553fe72449f54f45046fe5b8b69eb5b59..fadeac3a787350f6b3d4936825b3b02b } } diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 07f84c2815d18c6994498ad5e2fca556cca88567..49de4b85a8d8a9c861f8a081a2836bfefec91378 100644 +index 4ed1b205d2b31c00fbf9aa70cd2c13e7d0fe0534..a7ab766fe5259a033d61979d24d78862805b00ea 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -14,8 +14,9 @@ import java.util.Objects; - import java.util.UUID; +@@ -13,9 +13,10 @@ import java.security.PrivateKey; + import java.util.Objects; import java.util.concurrent.atomic.AtomicInteger; import javax.annotation.Nullable; -import javax.crypto.Cipher; import javax.crypto.SecretKey; + import net.minecraft.CrashReportCategory; + +import me.titaniumtown.ArrayConstants; import net.minecraft.DefaultUncaughtExceptionHandler; import net.minecraft.core.UUIDUtil; import net.minecraft.network.Connection; -@@ -166,8 +167,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -147,8 +148,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @Override public void handleHello(ServerboundHelloPacket packet) { - Validate.validState(this.state == ServerLoginPacketListenerImpl.State.HELLO, "Unexpected hello packet", new Object[0]); -- Validate.validState(ServerLoginPacketListenerImpl.isValidUsername(packet.name()), "Invalid characters in username", new Object[0]); +- if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode() && io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.performUsernameValidation && !this.iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation) Validate.validState(Player.isValidUsername(packet.name()), "Invalid characters in username", new Object[0]); // Paper - config username validation + // Gale start - JettPack - reduce array allocations + Validate.validState(this.state == ServerLoginPacketListenerImpl.State.HELLO, "Unexpected hello packet", ArrayConstants.emptyObjectArray); -+ Validate.validState(ServerLoginPacketListenerImpl.isValidUsername(packet.name()), "Invalid characters in username", ArrayConstants.emptyObjectArray); ++ if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode() && io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.performUsernameValidation && !this.iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation) Validate.validState(Player.isValidUsername(packet.name()), "Invalid characters in username", ArrayConstants.emptyObjectArray); // Paper - config username validation + // Gale end - JettPack - reduce array allocations - // Paper start - validate usernames - if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode() && io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.performUsernameValidation) { - if (!this.iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation && !validateUsername(packet.name())) { -@@ -260,7 +263,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, + this.requestedUsername = packet.name(); + GameProfile gameprofile = this.server.getSingleplayerProfile(); + +@@ -227,7 +230,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @Override public void handleKey(ServerboundKeyPacket packet) { @@ -538,8 +539,17 @@ index 07f84c2815d18c6994498ad5e2fca556cca88567..49de4b85a8d8a9c861f8a081a2836bfe final String s; +@@ -409,7 +412,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, + + @Override + public void handleLoginAcknowledgement(ServerboundLoginAcknowledgedPacket packet) { +- Validate.validState(this.state == ServerLoginPacketListenerImpl.State.PROTOCOL_SWITCHING, "Unexpected login acknowledgement packet", new Object[0]); ++ Validate.validState(this.state == ServerLoginPacketListenerImpl.State.PROTOCOL_SWITCHING, "Unexpected login acknowledgement packet", ArrayConstants.emptyObjectArray); // Gale - JettPack - reduce array allocations + CommonListenerCookie commonlistenercookie = CommonListenerCookie.createInitial((GameProfile) Objects.requireNonNull(this.authenticatedProfile)); + ServerConfigurationPacketListenerImpl serverconfigurationpacketlistenerimpl = new ServerConfigurationPacketListenerImpl(this.server, this.connection, commonlistenercookie, this.player); // CraftBukkit + diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index b1ae1944d3b5b2ac520b087a3059ae6059807f4d..1f7faf3ad062bf2bc0a0b4a4e6549914a05f0f9d 100644 +index 2306d7aca29b3e399f152eb8470115e6f7bb172a..2cbdd62e7b8a40ccdc8622c35fd94ae60d083531 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -25,6 +25,8 @@ import java.util.UUID; @@ -551,7 +561,7 @@ index b1ae1944d3b5b2ac520b087a3059ae6059807f4d..1f7faf3ad062bf2bc0a0b4a4e6549914 import net.minecraft.ChatFormatting; import net.minecraft.FileUtil; import net.minecraft.commands.CommandSourceStack; -@@ -725,7 +727,7 @@ public abstract class PlayerList { +@@ -723,7 +725,7 @@ public abstract class PlayerList { while (iterator.hasNext()) { entityplayer = (ServerPlayer) iterator.next(); this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved @@ -561,7 +571,7 @@ index b1ae1944d3b5b2ac520b087a3059ae6059807f4d..1f7faf3ad062bf2bc0a0b4a4e6549914 // Instead of kicking then returning, we need to store the kick reason diff --git a/src/main/java/net/minecraft/server/players/StoredUserList.java b/src/main/java/net/minecraft/server/players/StoredUserList.java -index 09fc086548b9d0f97849f56f41e3a5be87f5091a..ac64513e989500e76f8b0689dae655bcfc7f5b53 100644 +index 665120a62525f56912263a3e1b6f12f6c3e15dec..71e1c1a1ae59f74cfeea071aa6988f6fe47a286d 100644 --- a/src/main/java/net/minecraft/server/players/StoredUserList.java +++ b/src/main/java/net/minecraft/server/players/StoredUserList.java @@ -1,7 +1,6 @@ @@ -572,7 +582,7 @@ index 09fc086548b9d0f97849f56f41e3a5be87f5091a..ac64513e989500e76f8b0689dae655bc import com.google.common.collect.Maps; import com.google.common.io.Files; import com.google.gson.Gson; -@@ -24,6 +23,8 @@ import java.util.Map; +@@ -22,6 +21,8 @@ import java.util.Map; import java.util.Objects; import java.util.stream.Stream; import javax.annotation.Nullable; @@ -581,7 +591,7 @@ index 09fc086548b9d0f97849f56f41e3a5be87f5091a..ac64513e989500e76f8b0689dae655bc import net.minecraft.Util; import net.minecraft.util.GsonHelper; import org.slf4j.Logger; -@@ -96,7 +97,7 @@ public abstract class StoredUserList> { +@@ -79,7 +80,7 @@ public abstract class StoredUserList> { } public String[] getUserList() { @@ -641,10 +651,10 @@ index 2e324276ea4cd9e528c6a3f9a9ba394b378fe075..8e91714e3167ab0ad16df681bc080772 private EquipmentSlot(EquipmentSlot.Type type, int entityId, int armorStandId, String name) { this.type = type; diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 1794f5d1a8cc912fdd75a18ceccb536f48ab4686..d1d30ddc3c46cc7e5a7069e914f1117e8a8e638e 100644 +index ae070ceb7f696af8b43c4d2c2ff6daf221c8a9db..daabae0c34b4d03b71b19843c4b420128f4dbaf6 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3141,7 +3141,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3138,7 +3138,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @Nullable private Map collectEquipmentChanges() { Map map = null; @@ -654,10 +664,10 @@ index 1794f5d1a8cc912fdd75a18ceccb536f48ab4686..d1d30ddc3c46cc7e5a7069e914f1117e for (int j = 0; j < i; ++j) { diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 8dafe3126ef152d44b4ae6d84dd1a3b908332a1e..5a587d8901b80da72ac850b95b55a21011ae3fb4 100644 +index 5fa46974539fcfe3b344788c49e0be94228b1a6d..fc949fddb5864e4ed2cba4dad3ea5878d8a36b88 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -1055,7 +1055,7 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -1056,7 +1056,7 @@ public abstract class Mob extends LivingEntity implements Targeting { @Override protected void dropCustomDeathLoot(DamageSource source, int lootingMultiplier, boolean allowDrops) { super.dropCustomDeathLoot(source, lootingMultiplier, allowDrops); @@ -666,7 +676,7 @@ index 8dafe3126ef152d44b4ae6d84dd1a3b908332a1e..5a587d8901b80da72ac850b95b55a210 int j = aenumitemslot.length; for (int k = 0; k < j; ++k) { -@@ -1117,7 +1117,7 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -1118,7 +1118,7 @@ public abstract class Mob extends LivingEntity implements Targeting { } boolean flag = true; @@ -675,7 +685,7 @@ index 8dafe3126ef152d44b4ae6d84dd1a3b908332a1e..5a587d8901b80da72ac850b95b55a210 int j = aenumitemslot.length; for (int k = 0; k < j; ++k) { -@@ -1204,7 +1204,7 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -1205,7 +1205,7 @@ public abstract class Mob extends LivingEntity implements Targeting { float f = localDifficulty.getSpecialMultiplier(); this.enchantSpawnedWeapon(random, f); @@ -684,7 +694,7 @@ index 8dafe3126ef152d44b4ae6d84dd1a3b908332a1e..5a587d8901b80da72ac850b95b55a210 int i = aenumitemslot.length; for (int j = 0; j < i; ++j) { -@@ -1423,7 +1423,7 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -1424,7 +1424,7 @@ public abstract class Mob extends LivingEntity implements Targeting { t0.setInvulnerable(this.isInvulnerable()); if (flag) { t0.setCanPickUpLoot(this.canPickUpLoot()); @@ -707,10 +717,10 @@ index 94396ad1a3c280787d36c6c18256d10340ace488..9e139c1291f40fd730754ac2427269b1 for (int j = 0; j < i; ++j) { diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index d0f7baa80cb7d0883304abe2ed990c258a0d92b6..266a8e409af8b8d879d21a5d146acfc353484ce7 100644 +index de277d61b718fe07a87d75a2547bb1c7f8553aa1..2e451090791e1dd374bd54ae74eef617306e5f3e 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -1027,7 +1027,7 @@ public final class ItemStack { +@@ -1052,7 +1052,7 @@ public final class ItemStack { int k; if (ItemStack.shouldShowInTooltip(i, ItemStack.TooltipPart.MODIFIERS)) { @@ -719,47 +729,47 @@ index d0f7baa80cb7d0883304abe2ed990c258a0d92b6..266a8e409af8b8d879d21a5d146acfc3 k = aenumitemslot.length; -diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java -index 17bef91546fa85d401b263c3a69fbf464f290eca..5644aa6a80a7490909b89148f077ac51e3c861d3 100644 ---- a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java -+++ b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java -@@ -9,6 +9,8 @@ import java.util.Iterator; - import java.util.List; +diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipePattern.java b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipePattern.java +index 27dc0e4ce21ccf641ea16fd6d2dc1c28fcf62df8..81c9ba1d3455d1eb6619cb04d4e52a7226b2518f 100644 +--- a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipePattern.java ++++ b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipePattern.java +@@ -11,6 +11,8 @@ import java.util.List; import java.util.Map; - import java.util.Set; + import java.util.Optional; + import java.util.function.Function; + +import me.titaniumtown.ArrayConstants; + import net.minecraft.Util; import net.minecraft.core.NonNullList; - import net.minecraft.core.RegistryAccess; import net.minecraft.network.FriendlyByteBuf; -@@ -226,7 +228,7 @@ public class ShapedRecipe extends io.papermc.paper.inventory.recipe.RecipeBookEx +@@ -89,7 +91,7 @@ public record ShapedRecipePattern(int width, int height, NonNullList } if (pattern.size() == l) { - return new String[0]; + return ArrayConstants.emptyStringArray; // Gale - JettPack - reduce array allocations } else { - String[] astring = new String[pattern.size() - l - k]; + String[] strings = new String[pattern.size() - l - k]; diff --git a/src/main/java/net/minecraft/world/item/enchantment/Enchantments.java b/src/main/java/net/minecraft/world/item/enchantment/Enchantments.java -index 2bfbdaeb2b0d99dfd956cd5936403fe8b0eeae64..84f1c4c3ded4f201899f3c74e639349b9d1f00ee 100644 +index 6c2e8049c2197ddc912c1a0fc99c87beae81e25b..a13822a22ab524a0fb9fd998c4ada06b6e10e182 100644 --- a/src/main/java/net/minecraft/world/item/enchantment/Enchantments.java +++ b/src/main/java/net/minecraft/world/item/enchantment/Enchantments.java -@@ -44,8 +44,10 @@ public class Enchantments { - public static final Enchantment MULTISHOT = Enchantments.register("multishot", new MultiShotEnchantment(Enchantment.Rarity.RARE, new EquipmentSlot[]{EquipmentSlot.MAINHAND})); - public static final Enchantment QUICK_CHARGE = Enchantments.register("quick_charge", new QuickChargeEnchantment(Enchantment.Rarity.UNCOMMON, new EquipmentSlot[]{EquipmentSlot.MAINHAND})); - public static final Enchantment PIERCING = Enchantments.register("piercing", new ArrowPiercingEnchantment(Enchantment.Rarity.COMMON, new EquipmentSlot[]{EquipmentSlot.MAINHAND})); -- public static final Enchantment MENDING = Enchantments.register("mending", new MendingEnchantment(Enchantment.Rarity.RARE, EquipmentSlot.values())); -- public static final Enchantment VANISHING_CURSE = Enchantments.register("vanishing_curse", new VanishingCurseEnchantment(Enchantment.Rarity.VERY_RARE, EquipmentSlot.values())); +@@ -43,8 +43,10 @@ public class Enchantments { + public static final Enchantment MULTISHOT = register("multishot", new MultiShotEnchantment(Enchantment.Rarity.RARE, EquipmentSlot.MAINHAND)); + public static final Enchantment QUICK_CHARGE = register("quick_charge", new QuickChargeEnchantment(Enchantment.Rarity.UNCOMMON, EquipmentSlot.MAINHAND)); + public static final Enchantment PIERCING = register("piercing", new ArrowPiercingEnchantment(Enchantment.Rarity.COMMON, EquipmentSlot.MAINHAND)); +- public static final Enchantment MENDING = register("mending", new MendingEnchantment(Enchantment.Rarity.RARE, EquipmentSlot.values())); +- public static final Enchantment VANISHING_CURSE = register("vanishing_curse", new VanishingCurseEnchantment(Enchantment.Rarity.VERY_RARE, EquipmentSlot.values())); + // Gale start - JettPack - reduce array allocations -+ public static final Enchantment MENDING = Enchantments.register("mending", new MendingEnchantment(Enchantment.Rarity.RARE, EquipmentSlot.VALUES)); -+ public static final Enchantment VANISHING_CURSE = Enchantments.register("vanishing_curse", new VanishingCurseEnchantment(Enchantment.Rarity.VERY_RARE, EquipmentSlot.VALUES)); ++ public static final Enchantment MENDING = register("mending", new MendingEnchantment(Enchantment.Rarity.RARE, EquipmentSlot.VALUES)); ++ public static final Enchantment VANISHING_CURSE = register("vanishing_curse", new VanishingCurseEnchantment(Enchantment.Rarity.VERY_RARE, EquipmentSlot.VALUES)); + // Gale end - JettPack - reduce array allocations - public Enchantments() {} - + private static Enchantment register(String name, Enchantment enchantment) { + return Registry.register(BuiltInRegistries.ENCHANTMENT, name, enchantment); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index d0818a177f099817f6735bb341938ce0aa5282f8..4ddf4ad2cdf44841e1ca67a9ba1cce926f92bc6d 100644 +index 8eb1ab90c11a38c0c35f89d39054efd721f6df6c..d2a4e3326939c3c6dde7aba091d92ee84731d394 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -12,6 +12,8 @@ import java.util.function.Consumer; @@ -771,7 +781,7 @@ index d0818a177f099817f6735bb341938ce0aa5282f8..4ddf4ad2cdf44841e1ca67a9ba1cce92 import net.minecraft.CrashReport; import net.minecraft.CrashReportCategory; import net.minecraft.core.BlockPos; -@@ -1832,7 +1834,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1852,7 +1854,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public org.bukkit.entity.Entity[] getChunkEntities(int chunkX, int chunkZ) { io.papermc.paper.world.ChunkEntitySlices slices = ((ServerLevel)this).getEntityLookup().getChunk(chunkX, chunkZ); if (slices == null) { @@ -781,10 +791,10 @@ index d0818a177f099817f6735bb341938ce0aa5282f8..4ddf4ad2cdf44841e1ca67a9ba1cce92 return slices.getChunkEntities(); } diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java -index 10d3912ef043eefdf89105332e29b0d2bf4a5539..0500d4b96328ccc64e0dd3bd2d35c6b7bd21907e 100644 +index de8b5cab7925c1c46478952ed2cb2bd40f9a9c48..ce43cb260b36ca170a1d1725a7bf02525e8970d6 100644 --- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java -@@ -3,6 +3,8 @@ package net.minecraft.world.level.block; +@@ -4,6 +4,8 @@ import com.mojang.serialization.MapCodec; import it.unimi.dsi.fastutil.objects.Object2FloatMap; import it.unimi.dsi.fastutil.objects.Object2FloatOpenHashMap; import javax.annotation.Nullable; @@ -793,7 +803,7 @@ index 10d3912ef043eefdf89105332e29b0d2bf4a5539..0500d4b96328ccc64e0dd3bd2d35c6b7 import net.minecraft.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -@@ -415,7 +417,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { +@@ -422,7 +424,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { @Override public int[] getSlotsForFace(Direction side) { @@ -802,7 +812,7 @@ index 10d3912ef043eefdf89105332e29b0d2bf4a5539..0500d4b96328ccc64e0dd3bd2d35c6b7 } @Override -@@ -464,7 +466,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { +@@ -471,7 +473,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { @Override public int[] getSlotsForFace(Direction side) { @@ -811,7 +821,7 @@ index 10d3912ef043eefdf89105332e29b0d2bf4a5539..0500d4b96328ccc64e0dd3bd2d35c6b7 } @Override -@@ -506,7 +508,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { +@@ -513,7 +515,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { @Override public int[] getSlotsForFace(Direction side) { @@ -843,17 +853,18 @@ index a18aadbf7ae83713e1f2b21553185d8000bc7699..13e100fd2400878c819c7115bb958586 private static final int[] SLOTS_FOR_SIDES = new int[]{1}; public static final int DATA_LIT_DURATION = 1; diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -index 36af81f0957d17e170d229059c66f4eb4539dfeb..d6693314e7814763bf216d62ccf6c2211e8f5341 100644 +index b3a90d6ef0e17c236e0b3c46e2d0012671afdaa7..9c82568d31da70e30c45dbb41be48026eb0dc85a 100644 --- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java +++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -@@ -4,12 +4,13 @@ import com.mojang.datafixers.DataFixer; - import com.mojang.logging.LogUtils; - import java.io.File; +@@ -6,13 +6,14 @@ import java.io.File; + import java.nio.file.Files; + import java.nio.file.Path; import javax.annotation.Nullable; + +import me.titaniumtown.ArrayConstants; import net.minecraft.Util; import net.minecraft.nbt.CompoundTag; + import net.minecraft.nbt.NbtAccounter; import net.minecraft.nbt.NbtIo; import net.minecraft.nbt.NbtUtils; import net.minecraft.server.level.ServerPlayer; @@ -861,7 +872,7 @@ index 36af81f0957d17e170d229059c66f4eb4539dfeb..d6693314e7814763bf216d62ccf6c221 import net.minecraft.world.entity.player.Player; import org.slf4j.Logger; -@@ -119,7 +120,7 @@ public class PlayerDataStorage { +@@ -124,7 +125,7 @@ public class PlayerDataStorage { String[] astring = this.playerDir.list(); if (astring == null) { diff --git a/patches/server/0082-Optimize-sun-burn-tick.patch b/patches/server/0081-Optimize-sun-burn-tick.patch similarity index 90% rename from patches/server/0082-Optimize-sun-burn-tick.patch rename to patches/server/0081-Optimize-sun-burn-tick.patch index b4e2810..37aee99 100644 --- a/patches/server/0082-Optimize-sun-burn-tick.patch +++ b/patches/server/0081-Optimize-sun-burn-tick.patch @@ -13,10 +13,10 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index ec0c8205959d451c5f8c15f0aa11d0115f1d8125..3229280ed3e019958ae3c475c81397de979bb813 100644 +index b9b3391726cbd801e1d386f13323aa907d4d51b9..4a27430cf605969023437e9310aa685394dcec88 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -305,7 +305,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -306,7 +306,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S public double xo; public double yo; public double zo; @@ -25,7 +25,7 @@ index ec0c8205959d451c5f8c15f0aa11d0115f1d8125..3229280ed3e019958ae3c475c81397de public BlockPos blockPosition; // Gale - Pufferfish - optimize entity coordinate key - private -> public private ChunkPos chunkPosition; private Vec3 deltaMovement; -@@ -2000,9 +2000,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2005,9 +2005,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S /** @deprecated */ @Deprecated public float getLightLevelDependentMagicValue() { @@ -45,10 +45,10 @@ index ec0c8205959d451c5f8c15f0aa11d0115f1d8125..3229280ed3e019958ae3c475c81397de this.absMoveTo(x, y, z); this.setYRot(yaw % 360.0F); diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 5a587d8901b80da72ac850b95b55a21011ae3fb4..b35d9c04f0a9d73d6483526e396035d72fa33825 100644 +index fc949fddb5864e4ed2cba4dad3ea5878d8a36b88..db9aee68b644d318f65df010027b40628ea84ea2 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -1685,13 +1685,29 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -1686,13 +1686,29 @@ public abstract class Mob extends LivingEntity implements Targeting { } diff --git a/patches/server/0083-Reduce-lambda-and-Optional-allocation-in-EntityBased.patch b/patches/server/0082-Reduce-lambda-and-Optional-allocation-in-EntityBased.patch similarity index 100% rename from patches/server/0083-Reduce-lambda-and-Optional-allocation-in-EntityBased.patch rename to patches/server/0082-Reduce-lambda-and-Optional-allocation-in-EntityBased.patch diff --git a/patches/server/0084-Replace-AI-goal-set-with-optimized-collection.patch b/patches/server/0083-Replace-AI-goal-set-with-optimized-collection.patch similarity index 100% rename from patches/server/0084-Replace-AI-goal-set-with-optimized-collection.patch rename to patches/server/0083-Replace-AI-goal-set-with-optimized-collection.patch diff --git a/patches/server/0085-Replace-game-rules-map-with-optimized-collection.patch b/patches/server/0084-Replace-game-rules-map-with-optimized-collection.patch similarity index 91% rename from patches/server/0085-Replace-game-rules-map-with-optimized-collection.patch rename to patches/server/0084-Replace-game-rules-map-with-optimized-collection.patch index e027c7a..1a5dcb3 100644 --- a/patches/server/0085-Replace-game-rules-map-with-optimized-collection.patch +++ b/patches/server/0084-Replace-game-rules-map-with-optimized-collection.patch @@ -13,7 +13,7 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java -index 6639902efb85b4f49f26ba5f90556fb871ef8a0e..182db7ed5295edf41c0e28769f78875104c6a825 100644 +index 4f2fa47d094348bb8f86a86e808019ddba56e187..5c7e6b320566473a295f1979d68b3e3edf138895 100644 --- a/src/main/java/net/minecraft/world/level/GameRules.java +++ b/src/main/java/net/minecraft/world/level/GameRules.java @@ -19,6 +19,8 @@ import java.util.function.BiConsumer; @@ -25,7 +25,7 @@ index 6639902efb85b4f49f26ba5f90556fb871ef8a0e..182db7ed5295edf41c0e28769f788751 import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; import net.minecraft.nbt.CompoundTag; -@@ -137,7 +139,7 @@ public class GameRules { +@@ -141,7 +143,7 @@ public class GameRules { } private GameRules(Map, GameRules.Value> rules) { diff --git a/patches/server/0086-Replace-AI-attributes-with-optimized-collections.patch b/patches/server/0085-Replace-AI-attributes-with-optimized-collections.patch similarity index 100% rename from patches/server/0086-Replace-AI-attributes-with-optimized-collections.patch rename to patches/server/0085-Replace-AI-attributes-with-optimized-collections.patch diff --git a/patches/server/0087-Replace-class-map-with-optimized-collection.patch b/patches/server/0086-Replace-class-map-with-optimized-collection.patch similarity index 100% rename from patches/server/0087-Replace-class-map-with-optimized-collection.patch rename to patches/server/0086-Replace-class-map-with-optimized-collection.patch diff --git a/patches/server/0088-Replace-throttle-tracker-map-with-optimized-collecti.patch b/patches/server/0087-Replace-throttle-tracker-map-with-optimized-collecti.patch similarity index 98% rename from patches/server/0088-Replace-throttle-tracker-map-with-optimized-collecti.patch rename to patches/server/0087-Replace-throttle-tracker-map-with-optimized-collecti.patch index 5e81aec..f7db7ba 100644 --- a/patches/server/0088-Replace-throttle-tracker-map-with-optimized-collecti.patch +++ b/patches/server/0087-Replace-throttle-tracker-map-with-optimized-collecti.patch @@ -33,7 +33,7 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRA IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index 73f12e176acc0a035d3283cf5ecebcb1b8b06b73..b76f4b62d58087325d01983effe0a508d551d4ab 100644 +index c6bcf4a5d5c48e6f73b8e5d3662ec0d7c288c6c8..8e7488277bc30f83fa39f7435ca9f1724452e92e 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java @@ -1,5 +1,7 @@ diff --git a/patches/server/0089-Avoid-Class-isAssignableFrom-call-in-ClassInstanceMu.patch b/patches/server/0088-Avoid-Class-isAssignableFrom-call-in-ClassInstanceMu.patch similarity index 100% rename from patches/server/0089-Avoid-Class-isAssignableFrom-call-in-ClassInstanceMu.patch rename to patches/server/0088-Avoid-Class-isAssignableFrom-call-in-ClassInstanceMu.patch diff --git a/patches/server/0090-Cache-BlockStatePairKey-hash.patch b/patches/server/0089-Cache-BlockStatePairKey-hash.patch similarity index 90% rename from patches/server/0090-Cache-BlockStatePairKey-hash.patch rename to patches/server/0089-Cache-BlockStatePairKey-hash.patch index 55b3891..17106b4 100644 --- a/patches/server/0090-Cache-BlockStatePairKey-hash.patch +++ b/patches/server/0089-Cache-BlockStatePairKey-hash.patch @@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index d4cbff18adb62073a1dceb189043789620af6877..8f237fa0afb9f8d8fcded1a017342ecacd10bcf2 100644 +index 4d50dd92a7f3187ee1d8edb926e7c273c8156549..2ccfb0456cbc42e79bbab49f0c01443ce1560d3a 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java -@@ -598,11 +598,18 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -606,11 +606,18 @@ public class Block extends BlockBehaviour implements ItemLike { private final BlockState first; private final BlockState second; private final Direction direction; @@ -35,7 +35,7 @@ index d4cbff18adb62073a1dceb189043789620af6877..8f237fa0afb9f8d8fcded1a017342eca } public boolean equals(Object object) { -@@ -618,11 +625,7 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -626,11 +633,7 @@ public class Block extends BlockBehaviour implements ItemLike { } public int hashCode() { diff --git a/patches/server/0091-Cache-CubeVoxelShape-shape-array.patch b/patches/server/0090-Cache-CubeVoxelShape-shape-array.patch similarity index 100% rename from patches/server/0091-Cache-CubeVoxelShape-shape-array.patch rename to patches/server/0090-Cache-CubeVoxelShape-shape-array.patch diff --git a/patches/server/0092-Replace-division-by-multiplication-in-CubePointRange.patch b/patches/server/0091-Replace-division-by-multiplication-in-CubePointRange.patch similarity index 100% rename from patches/server/0092-Replace-division-by-multiplication-in-CubePointRange.patch rename to patches/server/0091-Replace-division-by-multiplication-in-CubePointRange.patch diff --git a/patches/server/0093-Replace-parts-by-size-in-CubePointRange.patch b/patches/server/0092-Replace-parts-by-size-in-CubePointRange.patch similarity index 100% rename from patches/server/0093-Replace-parts-by-size-in-CubePointRange.patch rename to patches/server/0092-Replace-parts-by-size-in-CubePointRange.patch diff --git a/patches/server/0094-Check-frozen-ticks-before-landing-block.patch b/patches/server/0093-Check-frozen-ticks-before-landing-block.patch similarity index 88% rename from patches/server/0094-Check-frozen-ticks-before-landing-block.patch rename to patches/server/0093-Check-frozen-ticks-before-landing-block.patch index 7e91058..e394921 100644 --- a/patches/server/0094-Check-frozen-ticks-before-landing-block.patch +++ b/patches/server/0093-Check-frozen-ticks-before-landing-block.patch @@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 4c707d81158e79554f1af41e3f8d4337cd99d836..0458695fa5cfff003d07ad049d7810acefe6d26e 100644 +index daabae0c34b4d03b71b19843c4b420128f4dbaf6..e2e1b3e148e32441b2b1adc97157253428f4c2ca 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -583,11 +583,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -582,11 +582,10 @@ public abstract class LivingEntity extends Entity implements Attackable { } protected void tryAddFrost() { @@ -29,7 +29,7 @@ index 4c707d81158e79554f1af41e3f8d4337cd99d836..0458695fa5cfff003d07ad049d7810ac if (attributemodifiable == null) { return; -@@ -597,7 +596,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -596,7 +595,6 @@ public abstract class LivingEntity extends Entity implements Attackable { attributemodifiable.addTransientModifier(new AttributeModifier(LivingEntity.SPEED_MODIFIER_POWDER_SNOW_UUID, "Powder snow slow", (double) f, AttributeModifier.Operation.ADDITION)); } diff --git a/patches/server/0095-Faster-chunk-serialization.patch b/patches/server/0094-Faster-chunk-serialization.patch similarity index 100% rename from patches/server/0095-Faster-chunk-serialization.patch rename to patches/server/0094-Faster-chunk-serialization.patch diff --git a/patches/server/0096-Update-boss-bar-within-tick.patch b/patches/server/0095-Update-boss-bar-within-tick.patch similarity index 100% rename from patches/server/0096-Update-boss-bar-within-tick.patch rename to patches/server/0095-Update-boss-bar-within-tick.patch diff --git a/patches/server/0097-Cache-ominous-banner-item.patch b/patches/server/0096-Cache-ominous-banner-item.patch similarity index 98% rename from patches/server/0097-Cache-ominous-banner-item.patch rename to patches/server/0096-Cache-ominous-banner-item.patch index 9011c6d..b64b726 100644 --- a/patches/server/0097-Cache-ominous-banner-item.patch +++ b/patches/server/0096-Cache-ominous-banner-item.patch @@ -13,7 +13,7 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) diff --git a/src/main/java/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java b/src/main/java/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java -index 3509fd5ad4f06cbac24d2dcdde171cebbdd0fcc1..67d446390586797970610e13fcdbd9410660a67e 100644 +index f4e5ada556a7fc7adac9b8d3e75ace483f753782..14b0fb4a1d7bc752fc041dbc850ad457a24c939a 100644 --- a/src/main/java/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java +++ b/src/main/java/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java @@ -15,7 +15,7 @@ public record EntityEquipmentPredicate(Optional head, Optional parent, Optional parent, Optional display, AdvancementRewards rewards, Map> criteria, AdvancementRequirements requirements, boolean sendsTelemetryEvent, Optional name) { public Advancement(Optional parent, Optional display, AdvancementRewards rewards, Map> criteria, AdvancementRequirements requirements, boolean sendsTelemetryEvent) { - this(parent, display, rewards, Map.copyOf(criteria), requirements, sendsTelemetryEvent, display.map(Advancement::decorateName)); + this(parent, display, rewards, criteria, requirements, sendsTelemetryEvent, display.map(Advancement::decorateName)); // Gale - Mirai - skip cloning advancement criteria } - public static Component decorateName(DisplayInfo display) { + private static DataResult validate(Advancement advancement) { diff --git a/patches/server/0109-Reduce-block-destruction-packet-allocations.patch b/patches/server/0108-Reduce-block-destruction-packet-allocations.patch similarity index 89% rename from patches/server/0109-Reduce-block-destruction-packet-allocations.patch rename to patches/server/0108-Reduce-block-destruction-packet-allocations.patch index 1e25294..854a385 100644 --- a/patches/server/0109-Reduce-block-destruction-packet-allocations.patch +++ b/patches/server/0108-Reduce-block-destruction-packet-allocations.patch @@ -13,10 +13,10 @@ As part of: SportPaper (https://github.com/Electroid/SportPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 786f0d50aefec0f76b6ad4df57b1389fa66f21ea..fbfef5678423f1224bfcfe62073e0603bb0bd58d 100644 +index 902b9c144cdedabbc3dc489c8643351c2f31aabe..b19571f838469dcaba5ecee06fe43de23bcdc776 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1728,7 +1728,17 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1752,7 +1752,17 @@ public class ServerLevel extends Level implements WorldGenLevel { @Override public void destroyBlockProgress(int entityId, BlockPos pos, int progress) { @@ -35,7 +35,7 @@ index 786f0d50aefec0f76b6ad4df57b1389fa66f21ea..fbfef5678423f1224bfcfe62073e0603 // CraftBukkit start Player entityhuman = null; -@@ -1751,7 +1761,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1775,7 +1785,7 @@ public class ServerLevel extends Level implements WorldGenLevel { // CraftBukkit end if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) { diff --git a/patches/server/0110-Spread-out-sending-all-player-info.patch b/patches/server/0109-Spread-out-sending-all-player-info.patch similarity index 94% rename from patches/server/0110-Spread-out-sending-all-player-info.patch rename to patches/server/0109-Spread-out-sending-all-player-info.patch index 84804d5..2e61256 100644 --- a/patches/server/0110-Spread-out-sending-all-player-info.patch +++ b/patches/server/0109-Spread-out-sending-all-player-info.patch @@ -37,7 +37,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 1f7faf3ad062bf2bc0a0b4a4e6549914a05f0f9d..45eefa9fd18950fbd913cef7c1e78f7d188d4d90 100644 +index 2cbdd62e7b8a40ccdc8622c35fd94ae60d083531..81eb658675ffaf0ee61bf7e04a02dd0c8a2d3da3 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -13,6 +13,8 @@ import java.net.SocketAddress; @@ -49,7 +49,7 @@ index 1f7faf3ad062bf2bc0a0b4a4e6549914a05f0f9d..45eefa9fd18950fbd913cef7c1e78f7d import java.util.Collection; import java.util.EnumSet; import java.util.Iterator; -@@ -135,10 +137,11 @@ public abstract class PlayerList { +@@ -133,10 +135,11 @@ public abstract class PlayerList { public static final Component CHAT_FILTERED_FULL = Component.translatable("chat.filtered_full"); public static final Component DUPLICATE_LOGIN_DISCONNECT_MESSAGE = Component.translatable("multiplayer.disconnect.duplicate_login"); private static final Logger LOGGER = LogUtils.getLogger(); @@ -62,7 +62,7 @@ index 1f7faf3ad062bf2bc0a0b4a4e6549914a05f0f9d..45eefa9fd18950fbd913cef7c1e78f7d private final Map playersByUUID = Maps.newHashMap(); private final UserBanList bans; private final IpBanList ipBans; -@@ -329,6 +332,7 @@ public abstract class PlayerList { +@@ -327,6 +330,7 @@ public abstract class PlayerList { // entityplayer.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // CraftBukkit - replaced with loop below this.players.add(player); @@ -70,7 +70,7 @@ index 1f7faf3ad062bf2bc0a0b4a4e6549914a05f0f9d..45eefa9fd18950fbd913cef7c1e78f7d this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot this.playersByUUID.put(player.getUUID(), player); // this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below -@@ -673,6 +677,7 @@ public abstract class PlayerList { +@@ -671,6 +675,7 @@ public abstract class PlayerList { entityplayer.retireScheduler(); // Paper - Folia schedulers entityplayer.getAdvancements().stopListening(); this.players.remove(entityplayer); @@ -78,7 +78,7 @@ index 1f7faf3ad062bf2bc0a0b4a4e6549914a05f0f9d..45eefa9fd18950fbd913cef7c1e78f7d this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot this.server.getCustomBossEvents().onPlayerDisconnect(entityplayer); UUID uuid = entityplayer.getUUID(); -@@ -834,6 +839,7 @@ public abstract class PlayerList { +@@ -832,6 +837,7 @@ public abstract class PlayerList { // Paper end entityplayer.stopRiding(); // CraftBukkit this.players.remove(entityplayer); @@ -86,7 +86,7 @@ index 1f7faf3ad062bf2bc0a0b4a4e6549914a05f0f9d..45eefa9fd18950fbd913cef7c1e78f7d this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot entityplayer.serverLevel().removePlayerImmediately(entityplayer, Entity.RemovalReason.DISCARDED); BlockPos blockposition = entityplayer.getRespawnPosition(); -@@ -970,6 +976,7 @@ public abstract class PlayerList { +@@ -968,6 +974,7 @@ public abstract class PlayerList { if (!entityplayer.connection.isDisconnected()) { worldserver1.addRespawnedPlayer(entityplayer1); this.players.add(entityplayer1); @@ -94,7 +94,7 @@ index 1f7faf3ad062bf2bc0a0b4a4e6549914a05f0f9d..45eefa9fd18950fbd913cef7c1e78f7d this.playersByName.put(entityplayer1.getScoreboardName().toLowerCase(java.util.Locale.ROOT), entityplayer1); // Spigot this.playersByUUID.put(entityplayer1.getUUID(), entityplayer1); } -@@ -1022,20 +1029,55 @@ public abstract class PlayerList { +@@ -1020,20 +1027,55 @@ public abstract class PlayerList { this.sendPlayerPermissionLevel(player, i); } @@ -157,7 +157,7 @@ index 1f7faf3ad062bf2bc0a0b4a4e6549914a05f0f9d..45eefa9fd18950fbd913cef7c1e78f7d } diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index fc4b9144cb093fe84b0d5cb27f0efee23c7a39ed..ff17428fc260f4737cda81bca5f4fdb8e50dbd67 100644 +index 5005d9ba125fb96900c01098a9a2e5f5d7a5cba6..b6c2044d9688c352b96a81c8d0abc4028fbe0ad1 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -39,6 +39,7 @@ import net.minecraft.network.syncher.SynchedEntityData; @@ -168,7 +168,7 @@ index fc4b9144cb093fe84b0d5cb27f0efee23c7a39ed..ff17428fc260f4737cda81bca5f4fdb8 import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; -@@ -199,12 +200,15 @@ public abstract class Player extends LivingEntity { +@@ -194,12 +195,15 @@ public abstract class Player extends LivingEntity { } // CraftBukkit end diff --git a/patches/server/0111-Optimize-player-list-for-sending-player-info.patch b/patches/server/0110-Optimize-player-list-for-sending-player-info.patch similarity index 95% rename from patches/server/0111-Optimize-player-list-for-sending-player-info.patch rename to patches/server/0110-Optimize-player-list-for-sending-player-info.patch index 0e09300..795ffe9 100644 --- a/patches/server/0111-Optimize-player-list-for-sending-player-info.patch +++ b/patches/server/0110-Optimize-player-list-for-sending-player-info.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 45eefa9fd18950fbd913cef7c1e78f7d188d4d90..b4ca4f9e418086a156823d2afd16fd2c8d47a542 100644 +index 81eb658675ffaf0ee61bf7e04a02dd0c8a2d3da3..4ffccef1c0c2646923e8016ddefc78a604b25f63 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1065,14 +1065,18 @@ public abstract class PlayerList { +@@ -1063,14 +1063,18 @@ public abstract class PlayerList { // Gale start - Purpur - spread out sending all player info ServerPlayer[] sendAllPlayerInfoBucket = this.sendAllPlayerInfoBuckets[this.sendAllPlayerInfoIn]; if (sendAllPlayerInfoBucket != null) { diff --git a/patches/server/0112-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch b/patches/server/0111-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch similarity index 93% rename from patches/server/0112-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch rename to patches/server/0111-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch index 714b777..8f42214 100644 --- a/patches/server/0112-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch +++ b/patches/server/0111-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index a2ba17ce6ceda1f52cf685783676a49ca17fd396..500a515f4c059dd2b521e82018e839dc244241e2 100644 +index e0a149b2bc29b3aab7be10798f6a0978f9381c07..f609e2a61a1362b0cc15fbb4e81ca66fd67eff6c 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -455,6 +455,7 @@ public class Commands { +@@ -509,6 +509,7 @@ public class Commands { private void runSync(ServerPlayer player, Collection bukkit, RootCommandNode rootcommandnode) { // Paper end - Async command map building new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent(player.getBukkitEntity(), (RootCommandNode) rootcommandnode, false).callEvent(); // Paper @@ -48,7 +48,7 @@ index a2ba17ce6ceda1f52cf685783676a49ca17fd396..500a515f4c059dd2b521e82018e839dc PlayerCommandSendEvent event = new PlayerCommandSendEvent(player.getBukkitEntity(), new LinkedHashSet<>(bukkit)); event.getPlayer().getServer().getPluginManager().callEvent(event); -@@ -465,6 +466,7 @@ public class Commands { +@@ -519,6 +520,7 @@ public class Commands { } } // CraftBukkit end diff --git a/patches/server/0113-Send-multiple-keep-alive-packets.patch b/patches/server/0112-Send-multiple-keep-alive-packets.patch similarity index 96% rename from patches/server/0113-Send-multiple-keep-alive-packets.patch rename to patches/server/0112-Send-multiple-keep-alive-packets.patch index 4d0ad47..c349e2b 100644 --- a/patches/server/0113-Send-multiple-keep-alive-packets.patch +++ b/patches/server/0112-Send-multiple-keep-alive-packets.patch @@ -37,7 +37,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 09595e58058e9c91b181c212bb629de463cc48b9..9019bbc86f3e94b8f4033f2e5fb43dd7efac15f9 100644 +index f5d81da99a47fc1237a670d0000f19f1d61a5160..cb453c4db347b320f19a79ede2d8898106605e25 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java @@ -4,6 +4,9 @@ import com.mojang.authlib.GameProfile; @@ -128,7 +128,7 @@ index 09595e58058e9c91b181c212bb629de463cc48b9..9019bbc86f3e94b8f4033f2e5fb43dd7 } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index fadeac3a787350f6b3d4936825b3b02bd0cde31a..f81ec0b6e542ac697769f6b7392d62e9e0aac0a6 100644 +index 8b9fccee2f999836cb7550955ee4b38cde990286..347b1d225d2e7084d13ea9a633f50e08bf8e58b4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -8,6 +8,8 @@ import com.mojang.brigadier.StringReader; @@ -140,7 +140,7 @@ index fadeac3a787350f6b3d4936825b3b02bd0cde31a..f81ec0b6e542ac697769f6b7392d62e9 import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import it.unimi.dsi.fastutil.objects.ObjectIterator; import java.net.SocketAddress; -@@ -3407,6 +3409,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3404,6 +3406,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } @Override @@ -149,7 +149,7 @@ index fadeac3a787350f6b3d4936825b3b02bd0cde31a..f81ec0b6e542ac697769f6b7392d62e9 PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // CraftBukkit start diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -index 00d511ed75a5e7268737663baad0c25511e35d53..d6d5bb73db5eb3f620e2c0d4858a96901f364462 100644 +index b2aa32662335c4d64ac87320fcfb334784d89ec5..4650c69295adcc780f00d8d098cf939931147828 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java @@ -88,6 +88,11 @@ public class GaleGlobalConfiguration extends ConfigurationPart { diff --git a/patches/server/0114-Make-slow-login-timeout-configurable.patch b/patches/server/0113-Make-slow-login-timeout-configurable.patch similarity index 88% rename from patches/server/0114-Make-slow-login-timeout-configurable.patch rename to patches/server/0113-Make-slow-login-timeout-configurable.patch index fbeb8bc..1704454 100644 --- a/patches/server/0114-Make-slow-login-timeout-configurable.patch +++ b/patches/server/0113-Make-slow-login-timeout-configurable.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index e1f442b204cdf8c58c4f980af1714368ef9a61b9..4dc8365202fe851933545635bd14c7633534ee34 100644 +index a7ab766fe5259a033d61979d24d78862805b00ea..c4a681cdcd4d9e94fa7ef68562b9e41c2390852d 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -93,7 +93,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -94,7 +94,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, this.finishLoginAndWaitForClient(this.authenticatedProfile); } @@ -23,7 +23,7 @@ index e1f442b204cdf8c58c4f980af1714368ef9a61b9..4dc8365202fe851933545635bd14c763 } diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -index d6d5bb73db5eb3f620e2c0d4858a96901f364462..f53328d3be9238c01bf2ec9b6ed0a854696a60f0 100644 +index 4650c69295adcc780f00d8d098cf939931147828..35a59ea0ba0b018278287c7aefb39b18b5a72267 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java @@ -52,6 +52,7 @@ public class GaleGlobalConfiguration extends ConfigurationPart { diff --git a/patches/server/0115-Make-max-interaction-distance-configurable.patch b/patches/server/0114-Make-max-interaction-distance-configurable.patch similarity index 86% rename from patches/server/0115-Make-max-interaction-distance-configurable.patch rename to patches/server/0114-Make-max-interaction-distance-configurable.patch index 870bd1b..21ad41b 100644 --- a/patches/server/0115-Make-max-interaction-distance-configurable.patch +++ b/patches/server/0114-Make-max-interaction-distance-configurable.patch @@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 106a312aba249d1e83e4b535fc6e741e04ccfd14..58e3ac1e155fcd352efcc90401e4e13ae4c6a2ca 100644 +index 58f972832c39a27a8ccd606f9144e1c54adbf6f3..c0b368b8137ca6d90c4e6ec931e07b7ea69f8d9b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -174,7 +174,7 @@ public class ServerPlayerGameMode { @@ -20,10 +20,10 @@ index 106a312aba249d1e83e4b535fc6e741e04ccfd14..58e3ac1e155fcd352efcc90401e4e13a this.debugLogging(pos, false, sequence, "too far"); } else if (pos.getY() >= worldHeight) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f81ec0b6e542ac697769f6b7392d62e9e0aac0a6..477c343670599ba16dc34a5d4c07392ae1cc873b 100644 +index 347b1d225d2e7084d13ea9a633f50e08bf8e58b4..7b955100e39a935259887475278b24cf29905577 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -247,7 +247,7 @@ import org.bukkit.inventory.SmithingInventory; +@@ -251,7 +251,7 @@ import org.bukkit.inventory.SmithingInventory; public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl implements ServerGamePacketListener, ServerPlayerConnection, TickablePacketListener { static final Logger LOGGER = LogUtils.getLogger(); @@ -32,7 +32,7 @@ index f81ec0b6e542ac697769f6b7392d62e9e0aac0a6..477c343670599ba16dc34a5d4c07392a private static final int NO_BLOCK_UPDATES_TO_ACK = -1; private static final int TRACKED_MESSAGE_DISCONNECT_THRESHOLD = 4096; private static final Component CHAT_VALIDATION_FAILED = Component.translatable("multiplayer.disconnect.chat_validation_failed"); -@@ -327,6 +327,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -330,6 +330,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl private boolean hasMoved; // Spigot // CraftBukkit end @@ -46,7 +46,7 @@ index f81ec0b6e542ac697769f6b7392d62e9e0aac0a6..477c343670599ba16dc34a5d4c07392a @Override public void tick() { if (this.ackBlockChangesUpTo > -1) { -@@ -1901,7 +1908,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1928,7 +1935,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl BlockPos blockposition = movingobjectpositionblock.getBlockPos(); Vec3 vec3d1 = Vec3.atCenterOf(blockposition); @@ -55,7 +55,7 @@ index f81ec0b6e542ac697769f6b7392d62e9e0aac0a6..477c343670599ba16dc34a5d4c07392a Vec3 vec3d2 = vec3d.subtract(vec3d1); double d0 = 1.0000001D; -@@ -2716,7 +2723,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2713,7 +2720,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl AABB axisalignedbb = entity.getBoundingBox(); @@ -65,22 +65,22 @@ index f81ec0b6e542ac697769f6b7392d62e9e0aac0a6..477c343670599ba16dc34a5d4c07392a private void performInteraction(InteractionHand enumhand, ServerGamePacketListenerImpl.EntityInteraction playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand); diff --git a/src/main/java/net/minecraft/world/item/BrushItem.java b/src/main/java/net/minecraft/world/item/BrushItem.java -index e111bbbba63ec53d709f23ad12b96c2d3766a146..72718684cf99a3b74ea7dce1e2e9d7a3c4b88d7e 100644 +index f46c16dd6ff9cd09ea579eecf99ce78c7eb39d49..430b8a2bb1639eeb7338e0f7b1030248d66ef31e 100644 --- a/src/main/java/net/minecraft/world/item/BrushItem.java +++ b/src/main/java/net/minecraft/world/item/BrushItem.java -@@ -30,7 +30,6 @@ import net.minecraft.world.phys.Vec3; - public class BrushItem extends Item { - public static final int ANIMATION_DURATION = 10; - private static final int USE_DURATION = 200; -- private static final double MAX_BRUSH_DISTANCE = Math.sqrt(ServerGamePacketListenerImpl.MAX_INTERACTION_DISTANCE) - 1.0D; - - public BrushItem(Item.Properties settings) { - super(settings); -@@ -112,7 +111,7 @@ public class BrushItem extends Item { - private HitResult calculateHitResult(LivingEntity user) { +@@ -4,6 +4,7 @@ import net.minecraft.core.BlockPos; + import net.minecraft.core.Direction; + import net.minecraft.core.particles.BlockParticleOption; + import net.minecraft.core.particles.ParticleTypes; ++import net.minecraft.server.network.ServerGamePacketListenerImpl; + import net.minecraft.sounds.SoundEvent; + import net.minecraft.sounds.SoundEvents; + import net.minecraft.sounds.SoundSource; +@@ -110,7 +111,7 @@ public class BrushItem extends Item { + private HitResult calculateHitResult(Player user) { return ProjectileUtil.getHitResultOnViewVector(user, (entity) -> { return !entity.isSpectator() && entity.isPickable(); -- }, MAX_BRUSH_DISTANCE); +- }, (double)Player.getPickRange(user.isCreative())); + }, Math.sqrt(ServerGamePacketListenerImpl.getMaxInteractionDistanceSquared(user.level())) - 1.0D); // Gale - make max interaction distance configurable } diff --git a/patches/server/0116-Load-portal-destination-chunk-before-entity-teleport.patch b/patches/server/0115-Load-portal-destination-chunk-before-entity-teleport.patch similarity index 93% rename from patches/server/0116-Load-portal-destination-chunk-before-entity-teleport.patch rename to patches/server/0115-Load-portal-destination-chunk-before-entity-teleport.patch index 726b999..6aa3663 100644 --- a/patches/server/0116-Load-portal-destination-chunk-before-entity-teleport.patch +++ b/patches/server/0115-Load-portal-destination-chunk-before-entity-teleport.patch @@ -13,10 +13,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 1ec01ffb3c0b7e62304b5342927d81d5140e02d1..92b5d832427af60a5a0efc33c54f7ba49a0de9c4 100644 +index bc54774c3caed6102dd256a1311ebb244242a16a..9199686ff08b8fc5f54438ade7bef5e71d74ff9f 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3668,6 +3668,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3697,6 +3697,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S Entity entity = this.getType().create(worldserver); if (entity != null) { diff --git a/patches/server/0117-Don-t-load-chunks-to-spawn-phantoms.patch b/patches/server/0116-Don-t-load-chunks-to-spawn-phantoms.patch similarity index 100% rename from patches/server/0117-Don-t-load-chunks-to-spawn-phantoms.patch rename to patches/server/0116-Don-t-load-chunks-to-spawn-phantoms.patch diff --git a/patches/server/0118-Don-t-load-chunks-to-activate-climbing-entities.patch b/patches/server/0117-Don-t-load-chunks-to-activate-climbing-entities.patch similarity index 92% rename from patches/server/0118-Don-t-load-chunks-to-activate-climbing-entities.patch rename to patches/server/0117-Don-t-load-chunks-to-activate-climbing-entities.patch index 21dbe07..b81a757 100644 --- a/patches/server/0118-Don-t-load-chunks-to-activate-climbing-entities.patch +++ b/patches/server/0117-Don-t-load-chunks-to-activate-climbing-entities.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 92b5d832427af60a5a0efc33c54f7ba49a0de9c4..f27b32d5e1acf83527930f25a7b026d243bf4d26 100644 +index 9199686ff08b8fc5f54438ade7bef5e71d74ff9f..1fd0af1085a56fef7b2255c726f52d0fe370cced 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4565,6 +4565,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4607,6 +4607,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S return this.feetBlockState; } @@ -28,10 +28,10 @@ index 92b5d832427af60a5a0efc33c54f7ba49a0de9c4..f27b32d5e1acf83527930f25a7b026d2 return this.chunkPosition; } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index ad7b59a9b49d3d9c4a506fef24412b065b904578..61178e3e8a64b4d01db0ce5361d0e1edc6d746e5 100644 +index e2e1b3e148e32441b2b1adc97157253428f4c2ca..3f0fe74372c1fe440688da2b058ceae106180ed3 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -2018,19 +2018,43 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2015,19 +2015,43 @@ public abstract class LivingEntity extends Entity implements Attackable { public boolean onClimbableCached() { if (!this.blockPosition().equals(this.lastClimbingPosition)) { diff --git a/patches/server/0119-Broadcast-crit-animations-as-the-entity-being-critte.patch b/patches/server/0118-Broadcast-crit-animations-as-the-entity-being-critte.patch similarity index 95% rename from patches/server/0119-Broadcast-crit-animations-as-the-entity-being-critte.patch rename to patches/server/0118-Broadcast-crit-animations-as-the-entity-being-critte.patch index ec7be7b..fc16f13 100644 --- a/patches/server/0119-Broadcast-crit-animations-as-the-entity-being-critte.patch +++ b/patches/server/0118-Broadcast-crit-animations-as-the-entity-being-critte.patch @@ -13,10 +13,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index c651cef360efe8f80a49c3d572064ee16c786205..58bed6f664fc82665f680695070ee785a441f9bb 100644 +index 9701f93f0b6c51b01b05a54ed7482dbff75d9e8e..6f03370c6c05cbbbadf28f19c4263ded15b559d7 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1916,12 +1916,18 @@ public class ServerPlayer extends Player { +@@ -2017,12 +2017,18 @@ public class ServerPlayer extends Player { @Override public void crit(Entity target) { diff --git a/patches/server/0120-Ignore-null-legacy-structure-data.patch b/patches/server/0119-Ignore-null-legacy-structure-data.patch similarity index 97% rename from patches/server/0120-Ignore-null-legacy-structure-data.patch rename to patches/server/0119-Ignore-null-legacy-structure-data.patch index 195665d..9f1262c 100644 --- a/patches/server/0120-Ignore-null-legacy-structure-data.patch +++ b/patches/server/0119-Ignore-null-legacy-structure-data.patch @@ -46,7 +46,7 @@ index 541314ba47ea158e4751aa4e853117f8861fad82..eb61a0f1cea465884baa17c2d0a0768d continue; } diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -index f53328d3be9238c01bf2ec9b6ed0a854696a60f0..f83fa90b2ed4a60d5f3b305a99ae16498a20aef1 100644 +index 35a59ea0ba0b018278287c7aefb39b18b5a72267..506d34b207da63893204b3da7490d24826f5b662 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java @@ -53,6 +53,7 @@ public class GaleGlobalConfiguration extends ConfigurationPart { diff --git a/patches/server/0120-Skip-unnecessary-mob-spawning-computations.patch b/patches/server/0120-Skip-unnecessary-mob-spawning-computations.patch new file mode 100644 index 0000000..567854b --- /dev/null +++ b/patches/server/0120-Skip-unnecessary-mob-spawning-computations.patch @@ -0,0 +1,79 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Martijn Muijsers +Date: Sun, 25 Dec 2022 20:29:03 +0100 +Subject: [PATCH] Skip unnecessary mob spawning computations + +License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) +Gale - https://galemc.org + +This patch is based on the following patch: +"Only create a spawner state when we are actually spawning mobs" +By: PureGero +As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) +Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) + +diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +index 643143fa45c7c480e4bbd3d03e1b7cc19e2969e2..b4b6f21556717900b7ac49f8bead34a95362d4de 100644 +--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java ++++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +@@ -539,11 +539,16 @@ public class ServerChunkCache extends ChunkSource { + // Paper end - optimise chunk tick iteration + + if (this.level.getServer().tickRateManager().runsNormally()) { ++ // Gale start - MultiPaper - skip unnecessary mob spawning computations ++ NaturalSpawner.SpawnState spawnercreature_d; // moved down ++ final boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit ++ boolean flagAndHasNaturalSpawn = flag && this.anySpawnCategoryIsSpawnedThisTick(); ++ if (flagAndHasNaturalSpawn) { ++ // Gale end - MultiPaper - skip unnecessary mob spawning computations + this.level.timings.countNaturalMobs.startTiming(); // Paper - timings + int k = this.distanceManager.getNaturalSpawnChunkCount(); + // Paper start - per player mob spawning + int naturalSpawnChunkCount = k; +- NaturalSpawner.SpawnState spawnercreature_d; // moved down + if ((this.spawnFriendlies || this.spawnEnemies) && this.level.paperConfig().entities.spawning.perPlayerMobSpawns) { // don't count mobs when animals and monsters are disabled + // re-set mob counts + for (ServerPlayer player : this.level.players) { +@@ -567,7 +572,11 @@ public class ServerChunkCache extends ChunkSource { + this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings + + this.lastSpawnState = spawnercreature_d; +- boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit ++ // Gale start - MultiPaper - skip unnecessary mob spawning computations ++ } else { ++ spawnercreature_d = null; ++ } ++ // Gale end - MultiPaper - skip unnecessary mob spawning computations + + // Paper start - optimise chunk tick iteration + for (ServerPlayer player : this.level.players) { +@@ -654,7 +663,7 @@ public class ServerChunkCache extends ChunkSource { + if (tick && chunk1.chunkStatus.isOrAfter(net.minecraft.server.level.FullChunkStatus.ENTITY_TICKING)) { + // Paper end - optimise chunk tick iteration + chunk1.incrementInhabitedTime(j); +- if (spawn && flag && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair)) { // Spigot // Paper - optimise chunk tick iteration ++ if (spawn && flagAndHasNaturalSpawn && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair)) { // Spigot // Paper - optimise chunk tick iteration // Gale - MultiPaper - skip unnecessary mob spawning computations + NaturalSpawner.spawnForChunk(this.level, chunk1, spawnercreature_d, this.spawnFriendlies, this.spawnEnemies, flag1); + } + +@@ -700,6 +709,20 @@ public class ServerChunkCache extends ChunkSource { + } + } + ++ // Gale start - MultiPaper - skip unnecessary mob spawning computations ++ public boolean anySpawnCategoryIsSpawnedThisTick() { ++ long gameTime = this.level.getLevelData().getGameTime(); ++ ++ for (long ticksForSpawnCategory : this.level.ticksPerSpawnCategory.values()) { ++ if (ticksForSpawnCategory != 0L && gameTime % ticksForSpawnCategory == 0L) { ++ return true; ++ } ++ } ++ ++ return false; ++ } ++ // Gale end - MultiPaper - skip unnecessary mob spawning computations ++ + private void getFullChunk(long pos, Consumer chunkConsumer) { + ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos); + diff --git a/patches/server/0122-Prevent-entities-random-strolling-into-non-ticking-c.patch b/patches/server/0121-Prevent-entities-random-strolling-into-non-ticking-c.patch similarity index 100% rename from patches/server/0122-Prevent-entities-random-strolling-into-non-ticking-c.patch rename to patches/server/0121-Prevent-entities-random-strolling-into-non-ticking-c.patch diff --git a/patches/server/0121-Skip-unnecessary-mob-spawning-computations.patch b/patches/server/0121-Skip-unnecessary-mob-spawning-computations.patch deleted file mode 100644 index ae4b421..0000000 --- a/patches/server/0121-Skip-unnecessary-mob-spawning-computations.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Martijn Muijsers -Date: Sun, 25 Dec 2022 20:29:03 +0100 -Subject: [PATCH] Skip unnecessary mob spawning computations - -License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) -Gale - https://galemc.org - -This patch is based on the following patch: -"Only create a spawner state when we are actually spawning mobs" -By: PureGero -As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) -Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) - -diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 4600ebd99e910287c3c97d6b9179af716da7f4c6..292a6450a2031756b3037c77dfc501e9396d7440 100644 ---- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java -+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -511,10 +511,15 @@ public class ServerChunkCache extends ChunkSource { - int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING); - boolean flag1 = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit - -+ // Gale start - MultiPaper - skip unnecessary mob spawning computations -+ NaturalSpawner.SpawnState spawnercreature_d; // moved down -+ final boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit -+ boolean flag2AndHasNaturalSpawn = flag2 && this.anySpawnCategoryIsSpawnedThisTick(); -+ if (flag2AndHasNaturalSpawn) { -+ // Gale end - MultiPaper - skip unnecessary mob spawning computations - this.level.timings.countNaturalMobs.startTiming(); // Paper - timings - int l = this.distanceManager.getNaturalSpawnChunkCount(); - // Paper start - per player mob spawning -- NaturalSpawner.SpawnState spawnercreature_d; // moved down - if ((this.spawnFriendlies || this.spawnEnemies) && this.level.paperConfig().entities.spawning.perPlayerMobSpawns) { // don't count mobs when animals and monsters are disabled - // re-set mob counts - for (ServerPlayer player : this.level.players) { -@@ -540,12 +545,15 @@ public class ServerChunkCache extends ChunkSource { - this.lastSpawnState = spawnercreature_d; - // Paper - optimise chunk tick iteration - // Paper - optimise chunk tick iteration -+ // Gale start - MultiPaper - skip unnecessary mob spawning computations -+ } else { -+ spawnercreature_d = null; -+ } -+ // Gale end - MultiPaper - skip unnecessary mob spawning computations - this.level.timings.chunkTicks.startTiming(); // Paper - - // Paper - optimise chunk tick iteration - -- boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit -- - // Paper start - optimise chunk tick iteration - ChunkMap playerChunkMap = this.chunkMap; - for (ServerPlayer player : this.level.players) { -@@ -628,7 +636,7 @@ public class ServerChunkCache extends ChunkSource { - // Paper end - optimise chunk tick iteration - if (tick && chunk1.chunkStatus.isOrAfter(net.minecraft.server.level.FullChunkStatus.ENTITY_TICKING)) { // Paper - optimise chunk tick iteration - chunk1.incrementInhabitedTime(j); -- if (spawn && flag2 && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair)) { // Spigot // Paper - optimise chunk tick iteration -+ if (spawn && flag2AndHasNaturalSpawn && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair)) { // Spigot // Paper - optimise chunk tick iteration // Gale - MultiPaper - skip unnecessary mob spawning computations - NaturalSpawner.spawnForChunk(this.level, chunk1, spawnercreature_d, this.spawnFriendlies, this.spawnEnemies, flag1); - } - -@@ -673,6 +681,20 @@ public class ServerChunkCache extends ChunkSource { - } - } - -+ // Gale start - MultiPaper - skip unnecessary mob spawning computations -+ public boolean anySpawnCategoryIsSpawnedThisTick() { -+ long gameTime = this.level.getLevelData().getGameTime(); -+ -+ for (long ticksForSpawnCategory : this.level.ticksPerSpawnCategory.values()) { -+ if (ticksForSpawnCategory != 0L && gameTime % ticksForSpawnCategory == 0L) { -+ return true; -+ } -+ } -+ -+ return false; -+ } -+ // Gale end - MultiPaper - skip unnecessary mob spawning computations -+ - private void getFullChunk(long pos, Consumer chunkConsumer) { - ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos); - diff --git a/patches/server/0123-Do-not-place-player-in-world-if-kicked-before-being-.patch b/patches/server/0122-Do-not-place-player-in-world-if-kicked-before-being-.patch similarity index 92% rename from patches/server/0123-Do-not-place-player-in-world-if-kicked-before-being-.patch rename to patches/server/0122-Do-not-place-player-in-world-if-kicked-before-being-.patch index 655eb29..08eea3d 100644 --- a/patches/server/0123-Do-not-place-player-in-world-if-kicked-before-being-.patch +++ b/patches/server/0122-Do-not-place-player-in-world-if-kicked-before-being-.patch @@ -14,10 +14,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index b4ca4f9e418086a156823d2afd16fd2c8d47a542..29d33dcbf3787bd28176021d2eb7c9290ccce802 100644 +index 4ffccef1c0c2646923e8016ddefc78a604b25f63..5720af3b629fbd10ac4a8c399623be4d4b2d8022 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -278,6 +278,13 @@ public abstract class PlayerList { +@@ -276,6 +276,13 @@ public abstract class PlayerList { org.spigotmc.event.player.PlayerSpawnLocationEvent ev = new com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent(spawnPlayer, spawnPlayer.getLocation()); // Paper use our duplicate event this.cserver.getPluginManager().callEvent(ev); diff --git a/patches/server/0124-CraftBukkit-UUID-to-world-map.patch b/patches/server/0123-CraftBukkit-UUID-to-world-map.patch similarity index 87% rename from patches/server/0124-CraftBukkit-UUID-to-world-map.patch rename to patches/server/0123-CraftBukkit-UUID-to-world-map.patch index 8cb5f09..4b759d1 100644 --- a/patches/server/0124-CraftBukkit-UUID-to-world-map.patch +++ b/patches/server/0123-CraftBukkit-UUID-to-world-map.patch @@ -13,10 +13,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c0b66b8455c35794c055651b687ba9ca2b89af4c..05e81adc990eaea4fd4d78ef7f53efd6ae8df35f 100644 +index 7ff1a1a258e181b6ab0e23374177eb006fd6da05..01a94c790cfd96436591213ec57d14b541a02feb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -44,6 +44,9 @@ import java.util.logging.Logger; +@@ -45,6 +45,9 @@ import java.util.logging.Logger; import java.util.stream.Collectors; import javax.imageio.ImageIO; // import jline.console.ConsoleReader; @@ -26,7 +26,7 @@ index c0b66b8455c35794c055651b687ba9ca2b89af4c..05e81adc990eaea4fd4d78ef7f53efd6 import net.minecraft.advancements.AdvancementHolder; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; -@@ -284,6 +287,7 @@ public final class CraftServer implements Server { +@@ -285,6 +288,7 @@ public final class CraftServer implements Server { protected final DedicatedServer console; protected final DedicatedPlayerList playerList; private final Map worlds = new LinkedHashMap(); @@ -34,7 +34,7 @@ index c0b66b8455c35794c055651b687ba9ca2b89af4c..05e81adc990eaea4fd4d78ef7f53efd6 private final Map, Registry> registries = new HashMap<>(); private YamlConfiguration configuration; private YamlConfiguration commandsConfiguration; -@@ -1415,6 +1419,7 @@ public final class CraftServer implements Server { +@@ -1447,6 +1451,7 @@ public final class CraftServer implements Server { this.getLogger().log(Level.SEVERE, null, ex); } @@ -42,7 +42,7 @@ index c0b66b8455c35794c055651b687ba9ca2b89af4c..05e81adc990eaea4fd4d78ef7f53efd6 this.worlds.remove(world.getName().toLowerCase(java.util.Locale.ENGLISH)); this.console.removeLevel(handle); return true; -@@ -1433,12 +1438,7 @@ public final class CraftServer implements Server { +@@ -1465,12 +1470,7 @@ public final class CraftServer implements Server { @Override public World getWorld(UUID uid) { @@ -56,7 +56,7 @@ index c0b66b8455c35794c055651b687ba9ca2b89af4c..05e81adc990eaea4fd4d78ef7f53efd6 } // Paper start -@@ -1456,6 +1456,7 @@ public final class CraftServer implements Server { +@@ -1488,6 +1488,7 @@ public final class CraftServer implements Server { System.out.println("World " + world.getName() + " is a duplicate of another world and has been prevented from loading. Please delete the uid.dat file from " + world.getName() + "'s world directory if you want to be able to load the duplicate world."); return; } diff --git a/patches/server/0125-Global-EULA-file.patch b/patches/server/0124-Global-EULA-file.patch similarity index 100% rename from patches/server/0125-Global-EULA-file.patch rename to patches/server/0124-Global-EULA-file.patch diff --git a/patches/server/0126-Specific-interval-TPS-API.patch b/patches/server/0125-Specific-interval-TPS-API.patch similarity index 88% rename from patches/server/0126-Specific-interval-TPS-API.patch rename to patches/server/0125-Specific-interval-TPS-API.patch index 6238762..023557b 100644 --- a/patches/server/0126-Specific-interval-TPS-API.patch +++ b/patches/server/0125-Specific-interval-TPS-API.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 05e81adc990eaea4fd4d78ef7f53efd6ae8df35f..b105cf508e1d605155ac9248e7701bee6efc3953 100644 +index 01a94c790cfd96436591213ec57d14b541a02feb..4e5fd5fcdbbe7fce044deae5be1f46728231029c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2947,6 +2947,25 @@ public final class CraftServer implements Server { +@@ -2979,6 +2979,25 @@ public final class CraftServer implements Server { }; } diff --git a/patches/server/0127-5-second-TPS-average.patch b/patches/server/0126-5-second-TPS-average.patch similarity index 91% rename from patches/server/0127-5-second-TPS-average.patch rename to patches/server/0126-5-second-TPS-average.patch index ce07d3a..f94e0c2 100644 --- a/patches/server/0127-5-second-TPS-average.patch +++ b/patches/server/0126-5-second-TPS-average.patch @@ -37,7 +37,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java b/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java -index fa56cd09102a89692b42f1d14257990508c5c720..fac07dda413002c12276131efbe4ee3832c2265a 100644 +index 066b9e4c4f0e7773548eda045cdd1ca8445221d2..6be80b8dfd28a5e25a7f6ae603d8510e52b89085 100644 --- a/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java +++ b/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java @@ -58,7 +58,7 @@ public class RAMDetails extends JList { @@ -52,17 +52,17 @@ index fa56cd09102a89692b42f1d14257990508c5c720..fac07dda413002c12276131efbe4ee38 @@ -67,7 +67,7 @@ public class RAMDetails extends JList { vector.add("Memory use: " + (data.getUsedMem() / 1024L / 1024L) + " mb (" + (data.getFree() * 100L / data.getMax()) + "% free)"); vector.add("Heap: " + (data.getTotal() / 1024L / 1024L) + " / " + (data.getMax() / 1024L / 1024L) + " mb"); - vector.add("Avg tick: " + DECIMAL_FORMAT.format(getAverage(server.tickTimes)) + " ms"); + vector.add("Avg tick: " + DECIMAL_FORMAT.format(this.getAverage(server.getTickTimesNanos())) + " ms"); - vector.add("TPS from last 1m, 5m, 15m: " + String.join(", ", tpsAvg)); + vector.add("TPS from last 5s, 1m, 5m, 15m: " + String.join(", ", tpsAvg)); // Gale - Purpur - 5 second TPS average setListData(vector); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7db5c6d9a4bab340a2ae95c43388281445690d29..754c56b9ceb5d5eac9625571e5eaffd3bf05f0c6 100644 +index 7c691b953d66c9fb7a1f372ac885285ed55d9979..073b27e5133b9832e7ac233cd0420200f9a49164 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1012,6 +1012,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { + return false; + } : this::haveTime); + lastTickProperTime = (System.nanoTime() - tickProperStart) / 1000000L; // Gale - YAPFA - last tick time this.mayHaveDelayedTasks = true; - this.delayedTasksMaxNextTickTime = Math.max(Util.getMillis() + 50L, this.nextTickTime); + this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos); this.waitUntilNextTick(); -@@ -1242,9 +1249,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop DATA_PLAYER_MAIN_HAND = SynchedEntityData.defineId(Player.class, EntityDataSerializers.BYTE); protected static final EntityDataAccessor DATA_SHOULDER_LEFT = SynchedEntityData.defineId(Player.class, EntityDataSerializers.COMPOUND_TAG); protected static final EntityDataAccessor DATA_SHOULDER_RIGHT = SynchedEntityData.defineId(Player.class, EntityDataSerializers.COMPOUND_TAG); @@ -64,7 +64,7 @@ index e2ce9790e5b996ee25970820a5cd82f6f057ebd8..e1590e00f8150a5017d3816683f33cfb private long timeEntitySatOnShoulder; private final Inventory inventory = new Inventory(this); protected PlayerEnderChestContainer enderChestInventory = new PlayerEnderChestContainer(this); // CraftBukkit - add "this" to constructor -@@ -287,19 +289,23 @@ public abstract class Player extends LivingEntity { +@@ -282,19 +284,23 @@ public abstract class Player extends LivingEntity { this.moveCloak(); if (!this.level().isClientSide) { this.foodData.tick(this); @@ -94,7 +94,7 @@ index e2ce9790e5b996ee25970820a5cd82f6f057ebd8..e1590e00f8150a5017d3816683f33cfb int i = 29999999; diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -index 7f85aef54e10e27800fc031f9b18398dd7e573f9..c57fbc979a931b694d13365e9f538f534d4d9e67 100644 +index c2f77cb0d42baf41f85a3fa7bfcf0b323117fd48..c3df5278231e13c43e9ea0804d95bf0542f2560a 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java @@ -29,7 +29,17 @@ public class GaleGlobalConfiguration extends ConfigurationPart { diff --git a/patches/server/0132-For-collision-check-has-physics-before-same-vehicle.patch b/patches/server/0131-For-collision-check-has-physics-before-same-vehicle.patch similarity index 88% rename from patches/server/0132-For-collision-check-has-physics-before-same-vehicle.patch rename to patches/server/0131-For-collision-check-has-physics-before-same-vehicle.patch index 1c5f57a..8ca9c09 100644 --- a/patches/server/0132-For-collision-check-has-physics-before-same-vehicle.patch +++ b/patches/server/0131-For-collision-check-has-physics-before-same-vehicle.patch @@ -16,10 +16,10 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 409e7b30c0a1459170cf21c9be2e47aed25d22fa..07ac9b9928e5450e9ff42b82aeacfcb874eb8da0 100644 +index 1fd0af1085a56fef7b2255c726f52d0fe370cced..bf06632144b4f1126f48d75f5e38d96be4d83167 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2117,8 +2117,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2122,8 +2122,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S public void playerTouch(Player player) {} public void push(Entity entity) { diff --git a/patches/server/0133-Skip-negligible-planar-movement-multiplication.patch b/patches/server/0132-Skip-negligible-planar-movement-multiplication.patch similarity index 89% rename from patches/server/0133-Skip-negligible-planar-movement-multiplication.patch rename to patches/server/0132-Skip-negligible-planar-movement-multiplication.patch index 2c0c90d..0fdc81d 100644 --- a/patches/server/0133-Skip-negligible-planar-movement-multiplication.patch +++ b/patches/server/0132-Skip-negligible-planar-movement-multiplication.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 07ac9b9928e5450e9ff42b82aeacfcb874eb8da0..a11ab3630fdc5848440e0df0f450337b02ca965a 100644 +index bf06632144b4f1126f48d75f5e38d96be4d83167..53275a3aef1f4c03324a368a9fef34ffc6307a7f 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1230,9 +1230,19 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1235,9 +1235,19 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } this.tryCheckInsideBlocks(); diff --git a/patches/server/0134-Optimize-matching-item-checks.patch b/patches/server/0133-Optimize-matching-item-checks.patch similarity index 91% rename from patches/server/0134-Optimize-matching-item-checks.patch rename to patches/server/0133-Optimize-matching-item-checks.patch index 0f90bdd..51c94c8 100644 --- a/patches/server/0134-Optimize-matching-item-checks.patch +++ b/patches/server/0133-Optimize-matching-item-checks.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 266a8e409af8b8d879d21a5d146acfc353484ce7..8526df6a7112a8c1b541b341ab9e7dd3b8f53697 100644 +index 2e451090791e1dd374bd54ae74eef617306e5f3e..3c4919412fd995a6f00abe912e138b726392b88a 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -762,15 +762,15 @@ public final class ItemStack { +@@ -783,15 +783,15 @@ public final class ItemStack { } public static boolean matches(ItemStack left, ItemStack right) { diff --git a/patches/server/0135-Pre-compute-VarLong-sizes.patch b/patches/server/0134-Pre-compute-VarLong-sizes.patch similarity index 100% rename from patches/server/0135-Pre-compute-VarLong-sizes.patch rename to patches/server/0134-Pre-compute-VarLong-sizes.patch diff --git a/patches/server/0136-Optimize-VarLong-write.patch b/patches/server/0135-Optimize-VarLong-write.patch similarity index 100% rename from patches/server/0136-Optimize-VarLong-write.patch rename to patches/server/0135-Optimize-VarLong-write.patch diff --git a/patches/server/0137-Reduce-RandomSource-instances.patch b/patches/server/0136-Reduce-RandomSource-instances.patch similarity index 91% rename from patches/server/0137-Reduce-RandomSource-instances.patch rename to patches/server/0136-Reduce-RandomSource-instances.patch index 8c397e3..1bcbfdd 100644 --- a/patches/server/0137-Reduce-RandomSource-instances.patch +++ b/patches/server/0136-Reduce-RandomSource-instances.patch @@ -13,10 +13,10 @@ As part of: Patina (https://github.com/PatinaMC/Patina) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java b/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java -index f5bc3497831877e0c2b7dc1cbd8abe3a67d7695b..5783a8014e3faf93b81903c947b2534e41ba6037 100644 +index b47a8a082170bcb630c4354be7c77a4cac71d105..b49e3f2cdc1fa5ff3723fae452404664ff710252 100644 --- a/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java +++ b/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java -@@ -65,7 +65,7 @@ public class SpreadPlayersCommand { +@@ -66,7 +66,7 @@ public class SpreadPlayersCommand { if (maxY < j) { throw SpreadPlayersCommand.ERROR_INVALID_MAX_HEIGHT.create(maxY, j); } else { @@ -26,10 +26,10 @@ index f5bc3497831877e0c2b7dc1cbd8abe3a67d7695b..5783a8014e3faf93b81903c947b2534e double d1 = (double) (center.y - maxRange); double d2 = (double) (center.x + maxRange); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 9ed1757b6d3de9d4cc3c317b48b4156da2551761..032ae1af757f0241467fddd0c7c735d53a1eb473 100644 +index 6f03370c6c05cbbbadf28f19c4263ded15b559d7..a9d6870abe34e929c476ae199549e26643ef3343 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -446,7 +446,7 @@ public class ServerPlayer extends Player { +@@ -453,7 +453,7 @@ public class ServerPlayer extends Player { long l = k * k; int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l; int j1 = this.getCoprime(i1); @@ -38,7 +38,7 @@ index 9ed1757b6d3de9d4cc3c317b48b4156da2551761..032ae1af757f0241467fddd0c7c735d5 for (int l1 = 0; l1 < i1; ++l1) { int i2 = (k1 + j1 * l1) % i1; -@@ -483,7 +483,7 @@ public class ServerPlayer extends Player { +@@ -490,7 +490,7 @@ public class ServerPlayer extends Player { long l = k * k; int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l; int j1 = this.getCoprime(i1); @@ -61,7 +61,7 @@ index 1ef089dbf83de35d875c00efdf468c397be56978..b9f5dc95f859acb8f8fd4739537485af } diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -index a9eaa079a43bc8a5e81deaf6df5ce2f9c53cb319..df83a54fbbb0da52c96d7809d8c6f13b0080002a 100644 +index a2093158e57d5f43c4afa66386481b82b3c4c3c4..52506b0b2909cc1b4d3999a99bd012401dbc5bd8 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java @@ -86,7 +86,7 @@ public class FishingHook extends Projectile { @@ -96,20 +96,20 @@ index ea0df00966cf9900a8a0153099bbb04e5b47116d..1168465f6b9414b08680660413c62967 this.level = world; this.id = nbt.getInt("Id"); diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 1fbdae6690176c61143f08ff96b5255248c4d4c9..a12bf8dec7a5e2bfcdb399e6631ee4d447f564ae 100644 +index 3fde433edfd8835bf162cf39dd9999aa6dc5832d..ee76770b4f0cfadd2f7953c1328a2b6144379742 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java -@@ -82,7 +82,7 @@ public class Explosion { +@@ -92,7 +92,7 @@ public class Explosion { } - public Explosion(Level world, @Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator behavior, double x, double y, double z, float power, boolean createFire, Explosion.BlockInteraction destructionType) { + public Explosion(Level world, @Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator behavior, double x, double y, double z, float power, boolean createFire, Explosion.BlockInteraction destructionType, ParticleOptions particle, ParticleOptions emitterParticle, SoundEvent soundEvent) { - this.random = RandomSource.create(); + this.random = world == null || world.random == null ? RandomSource.create() : world.random; // Gale - Patina - reduce RandomSource instances this.toBlow = new ObjectArrayList(); this.hitPlayers = Maps.newHashMap(); this.level = world; diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -index 5f8e169a6e80e8f05df251fa76e60f512508d385..6569efea988243729af2c0df8d15edc848e95c13 100644 +index 9a14425e7de3eeca8f489bce03f5c9127811a6aa..c7ebc50201a96b58dd3828a30eff1292a48a532e 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java @@ -360,7 +360,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { diff --git a/patches/server/0138-Add-xor-shift-random.patch b/patches/server/0137-Add-xor-shift-random.patch similarity index 98% rename from patches/server/0138-Add-xor-shift-random.patch rename to patches/server/0137-Add-xor-shift-random.patch index ef72031..dcec828 100644 --- a/patches/server/0138-Add-xor-shift-random.patch +++ b/patches/server/0137-Add-xor-shift-random.patch @@ -62,10 +62,10 @@ index 9248769e6d357f6eec68945fd7700e79b2942c41..5b91ccafbdc7582e50272953f3ab2b8c } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 90c76ddcb8af13409490b8976263d27a71954668..656394bd8e4de8f3292a7781c0dcbf30c2a2ed6b 100644 +index e1fad381b861471a17529c246bb8a4a9c7646420..5c3d07151ff26377b4d0dbeff793fe7e27176ad8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -237,7 +237,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -238,7 +238,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { } // Paper end @@ -88,7 +88,7 @@ index c13cdbaf7abdf120a3969f8e887b4c3b78989c9c..2c054f16d2503f0443d3986314f68fa0 public CraftFirework(CraftServer server, FireworkRocketEntity entity) { diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -index c57fbc979a931b694d13365e9f538f534d4d9e67..3cf07d814ffad808a2adb3c10abf7277a3a77c9d 100644 +index c3df5278231e13c43e9ea0804d95bf0542f2560a..abb8ff945b13c2cf4926a2f047d0e8dd074cea8f 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java @@ -10,6 +10,7 @@ import org.spongepowered.configurate.objectmapping.meta.PostProcess; diff --git a/patches/server/0139-Reduce-skull-ItemStack-lookups-for-reduced-visibilit.patch b/patches/server/0138-Reduce-skull-ItemStack-lookups-for-reduced-visibilit.patch similarity index 93% rename from patches/server/0139-Reduce-skull-ItemStack-lookups-for-reduced-visibilit.patch rename to patches/server/0138-Reduce-skull-ItemStack-lookups-for-reduced-visibilit.patch index dff588c..d0c1004 100644 --- a/patches/server/0139-Reduce-skull-ItemStack-lookups-for-reduced-visibilit.patch +++ b/patches/server/0138-Reduce-skull-ItemStack-lookups-for-reduced-visibilit.patch @@ -18,10 +18,10 @@ this patch is focused around the sensors used for ai delete the line of sight cache less often and use a faster nearby comparison diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index f1d48ef527782a43df595c4b68e8be7838b5400f..37db21b3d2426dec69f378669b2ba8f0c8130bfc 100644 +index 3f0fe74372c1fe440688da2b058ceae106180ed3..dbf3f61227198a0ce5c0521fec933aafa3199154 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1023,10 +1023,9 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1022,10 +1022,9 @@ public abstract class LivingEntity extends Entity implements Attackable { } if (entity != null) { diff --git a/patches/server/0140-Initialize-line-of-sight-cache-with-low-capacity.patch b/patches/server/0139-Initialize-line-of-sight-cache-with-low-capacity.patch similarity index 100% rename from patches/server/0140-Initialize-line-of-sight-cache-with-low-capacity.patch rename to patches/server/0139-Initialize-line-of-sight-cache-with-low-capacity.patch diff --git a/patches/server/0141-Reduce-line-of-sight-updates-and-cache-lookups.patch b/patches/server/0140-Reduce-line-of-sight-updates-and-cache-lookups.patch similarity index 98% rename from patches/server/0141-Reduce-line-of-sight-updates-and-cache-lookups.patch rename to patches/server/0140-Reduce-line-of-sight-updates-and-cache-lookups.patch index 71c96d7..4577f56 100644 --- a/patches/server/0141-Reduce-line-of-sight-updates-and-cache-lookups.patch +++ b/patches/server/0140-Reduce-line-of-sight-updates-and-cache-lookups.patch @@ -115,7 +115,7 @@ index 57472cb54e9fd83e980e3c57f28d6e6643f422e8..ce50852a9b18679a80e9393e8d904935 return bl; } diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -index 3cf07d814ffad808a2adb3c10abf7277a3a77c9d..104316a79771cfd9fce6883499fca268eed223c4 100644 +index abb8ff945b13c2cf4926a2f047d0e8dd074cea8f..b4cca06a583fbb7918237de256f43ee61fd8ec6c 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java @@ -34,6 +34,7 @@ public class GaleGlobalConfiguration extends ConfigurationPart { diff --git a/patches/server/0142-Server-thread-priority-environment-variable.patch b/patches/server/0141-Server-thread-priority-environment-variable.patch similarity index 87% rename from patches/server/0142-Server-thread-priority-environment-variable.patch rename to patches/server/0141-Server-thread-priority-environment-variable.patch index 623fc24..d130d4b 100644 --- a/patches/server/0142-Server-thread-priority-environment-variable.patch +++ b/patches/server/0141-Server-thread-priority-environment-variable.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 63a8b5624183f19e21813482babda9a0a0061479..909e00c433fc869104dbe4a633c82f92304880d0 100644 +index 3a081a25d7580e7b60f2b8c17d9388530ae2efe6..f1bf143d5a97a4afbba6b2e7c07a5f46678c3260 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -183,6 +183,8 @@ import co.aikar.timings.MinecraftTimings; // Paper +@@ -184,6 +184,8 @@ import co.aikar.timings.MinecraftTimings; // Paper public abstract class MinecraftServer extends ReentrantBlockableEventLoop implements ServerInfo, CommandSource, AutoCloseable { @@ -19,7 +19,7 @@ index 63a8b5624183f19e21813482babda9a0a0061479..909e00c433fc869104dbe4a633c82f92 private static MinecraftServer SERVER; // Paper public static final Logger LOGGER = LogUtils.getLogger(); public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper -@@ -310,6 +312,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop