diff --git a/build.gradle.kts b/build.gradle.kts index 2f21eae..9b458d7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -52,10 +52,6 @@ subprojects { } } - dependencies { - "testRuntimeOnly"("org.junit.platform:junit-platform-launcher") - } - tasks.withType { options.encoding = Charsets.UTF_8.name() options.release = 21 diff --git a/divinemc-api/paper-patches/features/0002-Delete-Timings.patch b/divinemc-api/paper-patches/features/0002-Delete-Timings.patch index 47b21cb..c723879 100644 --- a/divinemc-api/paper-patches/features/0002-Delete-Timings.patch +++ b/divinemc-api/paper-patches/features/0002-Delete-Timings.patch @@ -179,7 +179,7 @@ index 42e7e712403676171d34d5f2be27e48e7a071ebd..00000000000000000000000000000000 -} diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java deleted file mode 100644 -index 157617933a772451f6c073d97afaf305769b4d40..0000000000000000000000000000000000000000 +index c178d77bd23a484043f50e46ccd603734f7b6059..0000000000000000000000000000000000000000 --- a/src/main/java/co/aikar/timings/TimedEventExecutor.java +++ /dev/null @@ -1,93 +0,0 @@ @@ -265,9 +265,9 @@ index 157617933a772451f6c073d97afaf305769b4d40..00000000000000000000000000000000 - executor.execute(listener, event); - return; - } -- try (Timing ignored = timings.startTiming()){ +- //try (Timing ignored = timings.startTiming()){ // Purpur - Remove Timings - executor.execute(listener, event); -- } +- //} // Purpur - Remove Timings - } - - @Override @@ -278,10 +278,10 @@ index 157617933a772451f6c073d97afaf305769b4d40..00000000000000000000000000000000 -} diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java deleted file mode 100644 -index 4195efcfe044618052bb03dea34a4fb2ca7c44f0..0000000000000000000000000000000000000000 +index acd06662bf1da1f12f73e2e85c0fd1b10f3b8b93..0000000000000000000000000000000000000000 --- a/src/main/java/co/aikar/timings/Timing.java +++ /dev/null -@@ -1,86 +0,0 @@ +@@ -1,92 +0,0 @@ -/* - * This file is licensed under the MIT License (MIT). - * @@ -323,6 +323,7 @@ index 4195efcfe044618052bb03dea34a4fb2ca7c44f0..00000000000000000000000000000000 - * @return Timing - */ - @NotNull +- @io.papermc.paper.annotation.DoNotUse // Purpur - Remove Timings - Timing startTiming(); - - /** @@ -330,6 +331,7 @@ index 4195efcfe044618052bb03dea34a4fb2ca7c44f0..00000000000000000000000000000000 - * - * Will automatically be called when this Timing is used with try-with-resources - */ +- @io.papermc.paper.annotation.DoNotUse // Purpur - Remove Timings - void stopTiming(); - - /** @@ -340,6 +342,7 @@ index 4195efcfe044618052bb03dea34a4fb2ca7c44f0..00000000000000000000000000000000 - * @return Timing - */ - @NotNull +- @io.papermc.paper.annotation.DoNotUse // Purpur - Remove Timings - Timing startTimingIfSync(); - - /** @@ -349,12 +352,14 @@ index 4195efcfe044618052bb03dea34a4fb2ca7c44f0..00000000000000000000000000000000 - * - * But only if we are on the primary thread. - */ +- @io.papermc.paper.annotation.DoNotUse // Purpur - Remove Timings - void stopTimingIfSync(); - - /** - * @deprecated Doesn't do anything - Removed - */ - @Deprecated +- @io.papermc.paper.annotation.DoNotUse // Purpur - Remove Timings - void abort(); - - /** @@ -366,6 +371,7 @@ index 4195efcfe044618052bb03dea34a4fb2ca7c44f0..00000000000000000000000000000000 - TimingHandler getTimingHandler(); - - @Override +- @io.papermc.paper.annotation.DoNotUse // Purpur - Remove Timings - void close(); -} diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java @@ -1279,10 +1285,10 @@ index df142a89b8c43acb81eb383eac0ef048a1f49a6e..00000000000000000000000000000000 -} diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java deleted file mode 100644 -index 95b7cdf0677ef71e6885fa78aa5c75bb500f5f53..0000000000000000000000000000000000000000 +index 213c89fddc9413246443d66506ba5437bdb60dce..0000000000000000000000000000000000000000 --- a/src/main/java/co/aikar/timings/Timings.java +++ /dev/null -@@ -1,325 +0,0 @@ +@@ -1,324 +0,0 @@ -/* - * This file is licensed under the MIT License (MIT). - * @@ -1409,7 +1415,7 @@ index 95b7cdf0677ef71e6885fa78aa5c75bb500f5f53..00000000000000000000000000000000 - @NotNull - public static Timing ofStart(@NotNull Plugin plugin, @NotNull String name, @Nullable Timing groupHandler) { - Timing timing = of(plugin, name, groupHandler); -- timing.startTiming(); +- //timing.startTiming(); // Purpur - Remove Timings - return timing; - } - @@ -1431,7 +1437,7 @@ index 95b7cdf0677ef71e6885fa78aa5c75bb500f5f53..00000000000000000000000000000000 - */ - public static void setTimingsEnabled(boolean enabled) { - if (enabled && !warnedAboutDeprecationOnEnable) { -- Bukkit.getLogger().severe(PlainTextComponentSerializer.plainText().serialize(deprecationMessage())); +- //Bukkit.getLogger().severe(PlainTextComponentSerializer.plainText().serialize(deprecationMessage())); // Purpur - Remove Timings - warnedAboutDeprecationOnEnable = true; - } - } @@ -1607,13 +1613,13 @@ index 95b7cdf0677ef71e6885fa78aa5c75bb500f5f53..00000000000000000000000000000000 - return TimingsManager.getHandler(groupName, name, groupHandler); - } -} -- +\ No newline at end of file diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java deleted file mode 100644 -index b83e5ff7ada8771fdf27ba9807c77ba6a4ce12da..0000000000000000000000000000000000000000 +index 04d0dc27406e9f96224f88edb1c535176e84d395..0000000000000000000000000000000000000000 --- a/src/main/java/co/aikar/timings/TimingsCommand.java +++ /dev/null -@@ -1,127 +0,0 @@ +@@ -1,132 +0,0 @@ -/* - * This file is licensed under the MIT License (MIT). - * @@ -1663,7 +1669,7 @@ index b83e5ff7ada8771fdf27ba9807c77ba6a4ce12da..00000000000000000000000000000000 - public TimingsCommand(@NotNull String name) { - super(name); - this.description = "Manages Spigot Timings data to see performance of the server."; -- this.usageMessage = "/timings "; +- this.usageMessage = "/timings";// "; // Purpur - Remove Timings - this.setPermission("bukkit.command.timings"); - } - @@ -1673,7 +1679,12 @@ index b83e5ff7ada8771fdf27ba9807c77ba6a4ce12da..00000000000000000000000000000000 - return true; - } - if (true) { -- sender.sendMessage(Timings.deprecationMessage()); +- // Purpur start - Remove Timings +- net.kyori.adventure.text.minimessage.MiniMessage mm = net.kyori.adventure.text.minimessage.MiniMessage.miniMessage(); +- sender.sendMessage(mm.deserialize("Purpur has removed timings to save your performance. Please use /spark instead")); +- sender.sendMessage(mm.deserialize("For more information, view its documentation at")); +- sender.sendMessage(mm.deserialize("https://spark.lucko.me/docs/Command-Usage")); +- // Purpur end - Remove Timings - return true; - } - if (args.length < 1) { @@ -1734,7 +1745,7 @@ index b83e5ff7ada8771fdf27ba9807c77ba6a4ce12da..00000000000000000000000000000000 - Preconditions.checkNotNull(args, "Arguments cannot be null"); - Preconditions.checkNotNull(alias, "Alias cannot be null"); - -- if (args.length == 1) { +- if (false && args.length == 1) { // Purpur - Remove Timings - return StringUtil.copyPartialMatches(args[0], TIMINGS_SUBCOMMANDS, - new ArrayList(TIMINGS_SUBCOMMANDS.size())); - } @@ -2094,76 +2105,3 @@ index 632c4961515f5052551f841cfa840e60bba7a257..00000000000000000000000000000000 - super.stopTiming(); - } -} -diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java -deleted file mode 100644 -index 12946bd55fcf7c40d39081779a7fa30049ee6165..0000000000000000000000000000000000000000 ---- a/src/main/java/org/spigotmc/CustomTimingsHandler.java -+++ /dev/null -@@ -1,67 +0,0 @@ --/* -- * This file is licensed under the MIT License (MIT). -- * -- * Copyright (c) 2014 Daniel Ennis -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy -- * of this software and associated documentation files (the "Software"), to deal -- * in the Software without restriction, including without limitation the rights -- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- * copies of the Software, and to permit persons to whom the Software is -- * furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in -- * all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- * THE SOFTWARE. -- */ --package org.spigotmc; -- --import org.bukkit.Bukkit; --import org.jetbrains.annotations.NotNull; --import org.bukkit.plugin.AuthorNagException; --import co.aikar.timings.Timing; --import co.aikar.timings.Timings; --import co.aikar.timings.TimingsManager; -- --import java.lang.reflect.Method; --import java.util.logging.Level; -- --/** -- * This is here for legacy purposes incase any plugin used it. -- * -- * If you use this, migrate ASAP as this will be removed in the future! -- * -- * @deprecated -- * @see co.aikar.timings.Timings#of -- */ --@Deprecated(forRemoval = true) --public final class CustomTimingsHandler { -- private final Timing handler; -- -- public CustomTimingsHandler(@NotNull String name) { -- Timing timing; -- -- new AuthorNagException("Deprecated use of CustomTimingsHandler. Please Switch to Timings.of ASAP").printStackTrace(); -- try { -- final Method ofSafe = TimingsManager.class.getDeclaredMethod("getHandler", String.class, String.class, Timing.class); -- ofSafe.setAccessible(true); -- timing = (Timing) ofSafe.invoke(null,"Minecraft", "(Deprecated API) " + name, null); -- } catch (Exception e) { -- e.printStackTrace(); -- Bukkit.getLogger().log(Level.SEVERE, "This handler could not be registered"); -- timing = Timings.NULL_HANDLER; -- } -- handler = timing; -- } -- -- public void startTiming() { handler.startTiming(); } -- public void stopTiming() { handler.stopTiming(); } -- --} diff --git a/divinemc-api/paper-patches/files/src/main/java/org/bukkit/command/SimpleCommandMap.java.patch b/divinemc-api/paper-patches/files/src/main/java/org/bukkit/command/SimpleCommandMap.java.patch index 80bc109..ca83d8c 100644 --- a/divinemc-api/paper-patches/files/src/main/java/org/bukkit/command/SimpleCommandMap.java.patch +++ b/divinemc-api/paper-patches/files/src/main/java/org/bukkit/command/SimpleCommandMap.java.patch @@ -16,21 +16,16 @@ label = label.toLowerCase(Locale.ROOT).trim(); fallbackPrefix = fallbackPrefix.toLowerCase(Locale.ROOT).trim(); boolean registered = register(label, command, false, fallbackPrefix); -@@ -166,17 +_,9 @@ +@@ -165,12 +_,6 @@ + sentCommandLabel = event.getLabel(); parsedArgs = event.getArgs(); // Purpur end - ExecuteCommandEvent - +- - // Paper start - Plugins do weird things to workaround normal registration - if (target.timings == null) { - target.timings = co.aikar.timings.TimingsManager.getCommandTiming(null, target); - } - // Paper end -- + try { -- try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources - // Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false) - target.execute(sender, sentCommandLabel, parsedArgs); // Purpur - ExecuteCommandEvent -- } // target.timings.stopTiming(); // Spigot // Paper - } catch (CommandException ex) { - server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper - //target.timings.stopTiming(); // Spigot // Paper + //try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources // Purpur - Remove Timings diff --git a/divinemc-api/paper-patches/files/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java.patch b/divinemc-api/paper-patches/files/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java.patch index c15936a..ded8bdb 100644 --- a/divinemc-api/paper-patches/files/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java.patch +++ b/divinemc-api/paper-patches/files/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java.patch @@ -8,7 +8,7 @@ import org.yaml.snakeyaml.error.YAMLException; /** -@@ -293,7 +_,7 @@ +@@ -294,7 +_,7 @@ } } @@ -17,7 +17,7 @@ @Override public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { // Paper try { -@@ -307,7 +_,7 @@ +@@ -308,7 +_,7 @@ throw new EventException(t); } } diff --git a/divinemc-server/build.gradle.kts.patch b/divinemc-server/build.gradle.kts.patch index e933b44..1910aee 100644 --- a/divinemc-server/build.gradle.kts.patch +++ b/divinemc-server/build.gradle.kts.patch @@ -56,7 +56,7 @@ implementation("ca.spottedleaf:concurrentutil:0.0.2") // Paper - Add ConcurrentUtil dependency // Paper start implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+ -@@ -207,26 +_,35 @@ +@@ -208,26 +_,35 @@ // Paper end - spark } diff --git a/divinemc-server/minecraft-patches/features/0002-DivineMC-Configuration.patch b/divinemc-server/minecraft-patches/features/0002-DivineMC-Configuration.patch index f6a7aad..a994711 100644 --- a/divinemc-server/minecraft-patches/features/0002-DivineMC-Configuration.patch +++ b/divinemc-server/minecraft-patches/features/0002-DivineMC-Configuration.patch @@ -5,7 +5,7 @@ Subject: [PATCH] DivineMC Configuration diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index b545362d99d39e1fbecf2e38ba4406e7936b9d6e..18b8405ac4de2b96ae8164fd580f9bd164b8db81 100644 +index 96253bf49a6895524f6f606a9c434cb1b78948a6..2c7c1335d4524486ed701365e64920091c85eaac 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java @@ -301,6 +301,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping public boolean lagging = false; // Purpur - Lagging threshold -@@ -473,6 +474,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entityClassToAvoid, float maxDist, double walkSpeedModifier, double sprintSpeedModifier) { -@@ -529,7 +529,7 @@ public class Cat extends TamableAnimal implements VariantHolder(this, Creaking.class, 8.0F, 1.0, 1.2)); this.goalSelector.addGoal(2, new Vindicator.VindicatorBreakDoorGoal(this)); this.goalSelector.addGoal(3, new AbstractIllager.RaiderOpenDoorGoal(this)); diff --git a/divinemc-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch b/divinemc-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch index 4753c2c..d057a48 100644 --- a/divinemc-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch +++ b/divinemc-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java -@@ -231,6 +_,7 @@ +@@ -232,6 +_,7 @@ org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); // Paper - start watchdog thread thread.start(); // Paper - Enhance console tab completions for brigadier commands; start console thread after MinecraftServer.console & PaperConfig are initialized io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command @@ -8,7 +8,7 @@ this.server.spark.registerCommandBeforePlugins(this.server); // Paper - spark com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics // Purpur start - Purpur config files -@@ -301,7 +_,7 @@ +@@ -326,7 +_,7 @@ String proxyFlavor = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "Velocity" : "BungeeCord"; String proxyLink = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "https://docs.papermc.io/velocity/security" : "http://www.spigotmc.org/wiki/firewall-guide/"; // Paper end - Add Velocity IP Forwarding Support diff --git a/divinemc-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayer.java.patch b/divinemc-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayer.java.patch index 8272d26..f759c2f 100644 --- a/divinemc-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayer.java.patch +++ b/divinemc-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayer.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -2240,6 +_,7 @@ +@@ -2259,6 +_,7 @@ this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, gameMode.getId())); if (gameMode == GameType.SPECTATOR) { this.removeEntitiesOnShoulder(); diff --git a/divinemc-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch b/divinemc-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch index cfd08ed..874016b 100644 --- a/divinemc-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch +++ b/divinemc-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch @@ -18,7 +18,7 @@ flag2 = true; // Paper - diff on change, this should be moved wrongly LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", rootVehicle.getName().getString(), this.player.getName().getString(), Math.sqrt(d7)); } -@@ -2387,6 +_,7 @@ +@@ -2397,6 +_,7 @@ } private void tryHandleChat(String message, Runnable handler, boolean sync) { // CraftBukkit @@ -26,7 +26,7 @@ if (isChatMessageIllegal(message)) { this.disconnectAsync(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper - add proper async disconnect } else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales -@@ -2414,6 +_,15 @@ +@@ -2424,6 +_,15 @@ return optional; } } diff --git a/divinemc-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch b/divinemc-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch index e65b197..6f94348 100644 --- a/divinemc-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch +++ b/divinemc-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch @@ -8,7 +8,7 @@ public boolean onGround; public boolean horizontalCollision; public boolean verticalCollision; -@@ -1113,6 +_,12 @@ +@@ -1120,6 +_,12 @@ // Paper end - detailed watchdog information public void move(MoverType type, Vec3 movement) { @@ -21,7 +21,7 @@ final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity // Paper start - detailed watchdog information ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main"); -@@ -4232,6 +_,7 @@ +@@ -4253,6 +_,7 @@ } public final void setBoundingBox(AABB bb) { diff --git a/divinemc-server/minecraft-patches/sources/net/minecraft/world/entity/LivingEntity.java.patch b/divinemc-server/minecraft-patches/sources/net/minecraft/world/entity/LivingEntity.java.patch index d2e4b23..b09a350 100644 --- a/divinemc-server/minecraft-patches/sources/net/minecraft/world/entity/LivingEntity.java.patch +++ b/divinemc-server/minecraft-patches/sources/net/minecraft/world/entity/LivingEntity.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -1377,7 +_,7 @@ +@@ -1385,7 +_,7 @@ player.setRealHealth(health); } @@ -9,7 +9,7 @@ return; } // CraftBukkit end -@@ -2656,6 +_,7 @@ +@@ -2664,6 +_,7 @@ } protected void updateSwingTime() { @@ -17,7 +17,7 @@ int currentSwingDuration = this.getCurrentSwingDuration(); if (this.swinging) { this.swingTime++; -@@ -3139,7 +_,13 @@ +@@ -3148,7 +_,13 @@ } protected float getFlyingSpeed() { @@ -32,7 +32,7 @@ } public float getSpeed() { -@@ -3606,6 +_,7 @@ +@@ -3615,6 +_,7 @@ protected void updateFallFlying() { this.checkSlowFallDistance(); if (!this.level().isClientSide) { diff --git a/divinemc-server/minecraft-patches/sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch b/divinemc-server/minecraft-patches/sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch index f2722ca..2837559 100644 --- a/divinemc-server/minecraft-patches/sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch +++ b/divinemc-server/minecraft-patches/sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -313,6 +_,12 @@ +@@ -320,6 +_,12 @@ if (!this.isSilent()) { serverLevel.levelEvent(null, 1027, this.blockPosition(), 0); } diff --git a/divinemc-server/minecraft-patches/sources/net/minecraft/world/level/block/Blocks.java.patch b/divinemc-server/minecraft-patches/sources/net/minecraft/world/level/block/Blocks.java.patch index f340094..4cd6154 100644 --- a/divinemc-server/minecraft-patches/sources/net/minecraft/world/level/block/Blocks.java.patch +++ b/divinemc-server/minecraft-patches/sources/net/minecraft/world/level/block/Blocks.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/world/level/block/Blocks.java +++ b/net/minecraft/world/level/block/Blocks.java -@@ -6630,6 +_,7 @@ +@@ -6632,6 +_,7 @@ .mapColor(MapColor.COLOR_ORANGE) .instrument(NoteBlockInstrument.BASEDRUM) .requiresCorrectToolForDrops() diff --git a/divinemc-server/paper-patches/features/0002-DivineMC-Configuration.patch b/divinemc-server/paper-patches/features/0002-DivineMC-Configuration.patch index 4778eaa..5a2c145 100644 --- a/divinemc-server/paper-patches/features/0002-DivineMC-Configuration.patch +++ b/divinemc-server/paper-patches/features/0002-DivineMC-Configuration.patch @@ -133,10 +133,10 @@ index 05339a176083af667c16f77d76dc1878dafce3f0..0a1428b826fe4057058cf24284bd5f6f } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4cf13628c0d304fbf658fcb6f09631b282c34bfa..14a499fd21d653951a30552f740b4d1ca3851158 100644 +index c68b97ab916746570229cef37357756b6df44baf..b8bc80e60dc36bfe9aac83d7f46b79303b7d66cf 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1087,6 +1087,7 @@ public final class CraftServer implements Server { +@@ -1101,6 +1101,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); @@ -144,7 +144,7 @@ index 4cf13628c0d304fbf658fcb6f09631b282c34bfa..14a499fd21d653951a30552f740b4d1c org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur - Purpur config files for (ServerLevel world : this.console.getAllLevels()) { // world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty -@@ -3056,6 +3057,13 @@ public final class CraftServer implements Server { +@@ -3124,6 +3125,13 @@ public final class CraftServer implements Server { return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console); } diff --git a/divinemc-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/CraftServer.java.patch b/divinemc-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/CraftServer.java.patch index 549eed6..98be1f7 100644 --- a/divinemc-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/CraftServer.java.patch +++ b/divinemc-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/CraftServer.java.patch @@ -8,7 +8,7 @@ private YamlConfiguration configuration; private YamlConfiguration commandsConfiguration; private final Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions())); -@@ -1521,6 +_,7 @@ +@@ -1535,6 +_,7 @@ this.getLogger().log(Level.SEVERE, null, ex); } @@ -16,7 +16,7 @@ this.worlds.remove(world.getName().toLowerCase(Locale.ROOT)); this.console.removeLevel(handle); return true; -@@ -1539,6 +_,7 @@ +@@ -1553,6 +_,7 @@ @Override public World getWorld(UUID uid) { @@ -24,7 +24,7 @@ for (World world : this.worlds.values()) { if (world.getUID().equals(uid)) { return world; -@@ -1562,6 +_,7 @@ +@@ -1576,6 +_,7 @@ 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/divinemc-server/purpur-patches/features/0001-Optimize-default-values-for-configs.patch b/divinemc-server/purpur-patches/features/0001-Optimize-default-values-for-configs.patch index 2ac4f5e..cd48d9c 100644 --- a/divinemc-server/purpur-patches/features/0001-Optimize-default-values-for-configs.patch +++ b/divinemc-server/purpur-patches/features/0001-Optimize-default-values-for-configs.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize default values for configs diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index 31f41990623120f8de9f7c842bd8ad4f5affe59f..8f9a73f524ffaa439f0cb59eeb3de3c2ff9fac3d 100644 +index 702f71bed6634042bc306fa365ff00b4053d8661..8208a91dd9d15a23b17590f88ab2fefdc0fcfcf3 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -@@ -217,7 +217,7 @@ public class PurpurConfig { +@@ -240,7 +240,7 @@ public class PurpurConfig { laggingThreshold = getDouble("settings.lagging-threshold", laggingThreshold); } diff --git a/divinemc-server/purpur-patches/features/0002-Add-missing-purpur-config-options.patch b/divinemc-server/purpur-patches/features/0002-Add-missing-purpur-config-options.patch index 10bb9d1..5a9685d 100644 --- a/divinemc-server/purpur-patches/features/0002-Add-missing-purpur-config-options.patch +++ b/divinemc-server/purpur-patches/features/0002-Add-missing-purpur-config-options.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add missing purpur config options diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index 8f9a73f524ffaa439f0cb59eeb3de3c2ff9fac3d..3ba75f262e7477fc4d1a544599646e1d33fe31aa 100644 +index 8208a91dd9d15a23b17590f88ab2fefdc0fcfcf3..0ead27518fc23943b29f163ed0feb6c61c119468 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -@@ -273,6 +273,7 @@ public class PurpurConfig { +@@ -327,6 +327,7 @@ public class PurpurConfig { } public static int barrelRows = 3; @@ -16,7 +16,7 @@ index 8f9a73f524ffaa439f0cb59eeb3de3c2ff9fac3d..3ba75f262e7477fc4d1a544599646e1d public static boolean enderChestSixRows = false; public static boolean enderChestPermissionRows = false; public static boolean cryingObsidianValidForPortalFrame = false; -@@ -306,6 +307,7 @@ public class PurpurConfig { +@@ -369,6 +370,7 @@ public class PurpurConfig { case 1 -> 9; default -> 27; }); @@ -25,10 +25,10 @@ index 8f9a73f524ffaa439f0cb59eeb3de3c2ff9fac3d..3ba75f262e7477fc4d1a544599646e1d org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27); enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows); diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b389f0d22c 100644 +index 22e793c40f3a784b514905c1d756d4cbdf1fd740..235c851e8dd202690a5eac6537d22d244c012494 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -979,12 +979,20 @@ public class PurpurWorldConfig { +@@ -1144,12 +1144,20 @@ public class PurpurWorldConfig { public boolean allayControllable = true; public double allayMaxHealth = 20.0D; public double allayScale = 1.0D; @@ -49,7 +49,7 @@ index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b3 } public boolean armadilloRidable = false; -@@ -1124,6 +1132,10 @@ public class PurpurWorldConfig { +@@ -1299,6 +1307,10 @@ public class PurpurWorldConfig { public double camelMovementSpeedMin = 0.09D; public double camelMovementSpeedMax = 0.09D; public int camelBreedingTicks = 6000; @@ -60,7 +60,7 @@ index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b3 private void camelSettings() { camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater); camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin); -@@ -1133,6 +1145,10 @@ public class PurpurWorldConfig { +@@ -1308,6 +1320,10 @@ public class PurpurWorldConfig { camelMovementSpeedMin = getDouble("mobs.camel.attributes.movement_speed.min", camelMovementSpeedMin); camelMovementSpeedMax = getDouble("mobs.camel.attributes.movement_speed.max", camelMovementSpeedMax); camelBreedingTicks = getInt("mobs.camel.breeding-delay-ticks", camelBreedingTicks); @@ -71,7 +71,7 @@ index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b3 } public boolean catRidable = false; -@@ -1539,12 +1555,22 @@ public class PurpurWorldConfig { +@@ -1764,12 +1780,22 @@ public class PurpurWorldConfig { public boolean frogControllable = true; public float frogRidableJumpHeight = 0.65F; public int frogBreedingTicks = 6000; @@ -94,7 +94,7 @@ index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b3 } public boolean ghastRidable = false; -@@ -2439,6 +2465,10 @@ public class PurpurWorldConfig { +@@ -2776,6 +2802,10 @@ public class PurpurWorldConfig { public double snifferMaxHealth = 14.0D; public double snifferScale = 1.0D; public int snifferBreedingTicks = 6000; @@ -105,7 +105,7 @@ index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b3 private void snifferSettings() { snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable); snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater); -@@ -2446,6 +2476,10 @@ public class PurpurWorldConfig { +@@ -2783,6 +2813,10 @@ public class PurpurWorldConfig { snifferMaxHealth = getDouble("mobs.sniffer.attributes.max_health", snifferMaxHealth); snifferScale = Mth.clamp(getDouble("mobs.sniffer.attributes.scale", snifferScale), 0.0625D, 16.0D); snifferBreedingTicks = getInt("mobs.sniffer.breeding-delay-ticks", snifferBreedingTicks); @@ -116,7 +116,7 @@ index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b3 } public boolean squidRidable = false; -@@ -2539,10 +2573,20 @@ public class PurpurWorldConfig { +@@ -2884,10 +2918,20 @@ public class PurpurWorldConfig { public boolean tadpoleRidable = false; public boolean tadpoleRidableInWater = true; public boolean tadpoleControllable = true; @@ -137,7 +137,7 @@ index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b3 } public boolean traderLlamaRidable = false; -@@ -2730,10 +2774,20 @@ public class PurpurWorldConfig { +@@ -3116,10 +3160,20 @@ public class PurpurWorldConfig { public boolean wardenRidable = false; public boolean wardenRidableInWater = true; public boolean wardenControllable = true; diff --git a/gradle.properties b/gradle.properties index 15a9588..a2cd914 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group = space.bxteam.divinemc mcVersion = 1.21.4 version = 1.21.4-R0.1-SNAPSHOT -purpurRef = a4e8b4d70b42fbecd7dc4ea82cad847f6fd65282 +purpurRef = ad38c53a655585a430dcd2ae79b99f576dd53b4a org.gradle.configuration-cache=true org.gradle.caching = true