diff --git a/gradle.properties b/gradle.properties index f80c7a5..129df84 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group = space.bxteam.divinemc mcVersion = 1.21 version = 1.21-R0.1-SNAPSHOT -purpurRef = f1c87e4fee9a8e7d513f9e284d402a21fd73ec3a +purpurRef = 04a9fec0cc76bf0f46faa5c1a99bb3a4eedc706d org.gradle.caching = true org.gradle.parallel = true diff --git a/patches/unapplied/api/0001-Divine-Branding.patch b/patches/api/0001-Divine-Branding.patch similarity index 100% rename from patches/unapplied/api/0001-Divine-Branding.patch rename to patches/api/0001-Divine-Branding.patch diff --git a/patches/unapplied/api/0002-Divine-Configuration.patch b/patches/api/0002-Divine-Configuration.patch similarity index 82% rename from patches/unapplied/api/0002-Divine-Configuration.patch rename to patches/api/0002-Divine-Configuration.patch index ea2cd69..d1aa4c0 100644 --- a/patches/unapplied/api/0002-Divine-Configuration.patch +++ b/patches/api/0002-Divine-Configuration.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Divine Configuration diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index ec8b9b2cbe65838a194281f7d76d0e17defc5211..adeb76886e99bd8f8374102471c71694ab5a30e4 100644 +index ceb81148f5fd17f00d1a0fb2df1f31c45aa6807d..a27599cb3f3274fe0a4bf09b6477d93440c28bce 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2269,6 +2269,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2263,6 +2263,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi } // Purpur end diff --git a/patches/unapplied/api/0003-Disable-reload-command-by-default.patch b/patches/api/0003-Disable-reload-command-by-default.patch similarity index 100% rename from patches/unapplied/api/0003-Disable-reload-command-by-default.patch rename to patches/api/0003-Disable-reload-command-by-default.patch diff --git a/patches/unapplied/api/0004-Optimize-Paper-Event-Manager.patch b/patches/api/0004-Optimize-Paper-Event-Manager.patch similarity index 100% rename from patches/unapplied/api/0004-Optimize-Paper-Event-Manager.patch rename to patches/api/0004-Optimize-Paper-Event-Manager.patch diff --git a/patches/unapplied/api/0005-Delete-Timings.patch b/patches/api/0005-Delete-Timings.patch similarity index 100% rename from patches/unapplied/api/0005-Delete-Timings.patch rename to patches/api/0005-Delete-Timings.patch diff --git a/patches/unapplied/api/0006-DivineMC-API-Publish.patch b/patches/api/0006-DivineMC-API-Publish.patch similarity index 100% rename from patches/unapplied/api/0006-DivineMC-API-Publish.patch rename to patches/api/0006-DivineMC-API-Publish.patch diff --git a/patches/unapplied/api/0007-Hide-unnecessary-compilation-warnings.patch b/patches/api/0007-Hide-unnecessary-compilation-warnings.patch similarity index 100% rename from patches/unapplied/api/0007-Hide-unnecessary-compilation-warnings.patch rename to patches/api/0007-Hide-unnecessary-compilation-warnings.patch diff --git a/patches/unapplied/server/0001-Divine-Branding.patch b/patches/server/0001-Divine-Branding.patch similarity index 93% rename from patches/unapplied/server/0001-Divine-Branding.patch rename to patches/server/0001-Divine-Branding.patch index f23caca..bc53224 100644 --- a/patches/unapplied/server/0001-Divine-Branding.patch +++ b/patches/server/0001-Divine-Branding.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Divine Branding diff --git a/build.gradle.kts b/build.gradle.kts -index d23ecfabf6bf1e355fb2efe5abd80236259ce3c4..ba4a171468365dbfa95d50f4eb2830815eb167e3 100644 +index 0635aacceec1ba9c753b4dde057876b91336d416..dffee3fdef02135233bc9a915eebbb714830b889 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { @@ -38,7 +38,7 @@ index d23ecfabf6bf1e355fb2efe5abd80236259ce3c4..ba4a171468365dbfa95d50f4eb283081 "Build-Time" to Instant.now().toString(), "Git-Branch" to gitBranch, // Paper diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java -index 8cde30544e14f8fc2dac32966ae3c21f8cf3a551..8b06174a9c42ea1d5a1cc5a423a0d6f7304a06c4 100644 +index 308d80ca27aa0edd63fba87343b12b39675462bc..cd9bf4bde05228ce3c5e54a2c8e9a50f4150f958 100644 --- a/src/main/java/com/destroystokyo/paper/Metrics.java +++ b/src/main/java/com/destroystokyo/paper/Metrics.java @@ -3,6 +3,7 @@ package com.destroystokyo.paper; @@ -49,7 +49,7 @@ index 8cde30544e14f8fc2dac32966ae3c21f8cf3a551..8b06174a9c42ea1d5a1cc5a423a0d6f7 import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.plugin.Plugin; -@@ -593,7 +594,7 @@ public class Metrics { +@@ -588,7 +589,7 @@ public class Metrics { boolean logFailedRequests = config.getBoolean("logFailedRequests", false); // Only start Metrics, if it's enabled in the config if (config.getBoolean("enabled", true)) { @@ -58,7 +58,7 @@ index 8cde30544e14f8fc2dac32966ae3c21f8cf3a551..8b06174a9c42ea1d5a1cc5a423a0d6f7 metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> { String minecraftVersion = Bukkit.getVersion(); -@@ -604,6 +605,7 @@ public class Metrics { +@@ -599,6 +600,7 @@ public class Metrics { metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size())); metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode() ? "bungee" : "offline"))); // Purpur metrics.addCustomChart(new Metrics.SimplePie("purpur_version", () -> (org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() != null) ? org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() : "unknown")); // Purpur @@ -183,31 +183,18 @@ index a6e5950b5875cafd734300cdfbf58f5d3736f3c8..7256e02150a2ddc2afd821299d36b1c7 SharedConstants.getCurrentVersion().getName(), getManifestAttribute(manifest, ATTRIBUTE_BUILD_NUMBER) diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java -index c366d84518979e842a6f10f969a5951539ecac93..b44daf19e76e9729980a4c871edd31dc293143fd 100644 +index 7eabcb453ef655741c4802d2f574932d6d741631..c66f0bc0c92788ca06490672acc26227d268ea12 100644 --- a/src/main/java/net/minecraft/CrashReport.java +++ b/src/main/java/net/minecraft/CrashReport.java -@@ -127,7 +127,7 @@ public class CrashReport { - stringbuilder.append("---- Minecraft Crash Report ----\n"); - // Purpur start - stringbuilder.append("// "); -- stringbuilder.append("// DO NOT REPORT THIS TO PAPER! REPORT TO PURPUR INSTEAD!"); -+ stringbuilder.append("// DO NOT REPORT THIS TO PAPER! REPORT TO DIVINEMC INSTEAD!"); // DivineMC - // Purpur end - stringbuilder.append("// "); - stringbuilder.append(CrashReport.getErrorComment()); -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 330bae815c0a332e3dc9fa7b224c9f92098199b9..a57ea225fb9951421d2026928c26f351d1b58cca 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -959,7 +959,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop extraInfo = List.of("", "DO NOT REPORT THIS TO PAPER! REPORT TO PURPUR INSTEAD!", ""); // Purpur - Rebrand ++ private List extraInfo = List.of("", "DO NOT REPORT THIS TO PAPER! REPORT TO DIVINEMC INSTEAD!", ""); // Purpur - Rebrand // DivineMC + + public CrashReport(String message, Throwable cause) { + io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(cause); // Paper diff --git a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java index 8f74c2ec5252b6265549589310d742337c91cb2c..1f4c965531393dd81246de487bc86f6d6f73b723 100644 --- a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java @@ -266,10 +253,10 @@ index 99597258e8e88cd9e2c901c4ac3ff7faeeabee2b..7bbbdf2895776f12ebc153dc83f4d53b if (stream != null) { diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index a353eb9f45af7b7f9bfd92a4a89403335b841840..3f3d158bb0f4b62dcf51402150e83d4efbbb8ca9 100644 +index 101d1528d818a1c27080c973df5eee041f1ebc9e..dc062e94cd3a9fb57a60eb2c63f7f773f8cfddbf 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java -@@ -155,14 +155,14 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa +@@ -80,14 +80,14 @@ public class WatchdogThread extends Thread if (isLongTimeout) { // Paper end log.log( Level.SEVERE, "------------------------------" ); @@ -287,7 +274,7 @@ index a353eb9f45af7b7f9bfd92a4a89403335b841840..3f3d158bb0f4b62dcf51402150e83d4e // if ( net.minecraft.world.level.Level.lastPhysicsProblem != null ) { -@@ -184,12 +184,12 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa +@@ -109,12 +109,12 @@ public class WatchdogThread extends Thread // Paper end } else { @@ -298,11 +285,11 @@ index a353eb9f45af7b7f9bfd92a4a89403335b841840..3f3d158bb0f4b62dcf51402150e83d4e // Paper end - Different message for short timeout log.log( Level.SEVERE, "------------------------------" ); - log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Purpur!):" ); // Paper // Purpur -+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to DivineMC!):" ); // Paper // DivineMC - io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper - rewrite chunk system - this.dumpTickingInfo(); // Paper - log detailed tick information ++ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to DivineMC!):" ); // Paper // Purpur // DivineMC + ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper - rewrite chunk system WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log ); -@@ -205,7 +205,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa + log.log( Level.SEVERE, "------------------------------" ); +@@ -129,7 +129,7 @@ public class WatchdogThread extends Thread WatchdogThread.dumpThread( thread, log ); } } else { diff --git a/patches/unapplied/server/0002-Divine-Configuration.patch b/patches/server/0002-Divine-Configuration.patch similarity index 94% rename from patches/unapplied/server/0002-Divine-Configuration.patch rename to patches/server/0002-Divine-Configuration.patch index 5e2fa18..d5a6187 100644 --- a/patches/unapplied/server/0002-Divine-Configuration.patch +++ b/patches/server/0002-Divine-Configuration.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Divine Configuration diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 956df6b435bf04f67f321715cceafd7c1e0165e5..be6b3add037e9c95e6c93a3ee6b413e5a79a2846 100644 +index 3e27a6c1d0e36d76d1ecdf52f642935b90d50d73..0956889c7b4fbba2ec615e222c52698cfb14db4c 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -56,6 +56,7 @@ import net.minecraft.world.level.GameType; +@@ -58,6 +58,7 @@ import net.minecraft.world.level.GameType; import net.minecraft.world.level.block.entity.SkullBlockEntity; import net.minecraft.world.level.storage.LevelStorageSource; import org.slf4j.Logger; @@ -16,7 +16,7 @@ index 956df6b435bf04f67f321715cceafd7c1e0165e5..be6b3add037e9c95e6c93a3ee6b413e5 // CraftBukkit start import net.minecraft.server.WorldLoader; -@@ -244,6 +245,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -248,6 +249,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface // Purpur end com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now @@ -34,10 +34,10 @@ index 956df6b435bf04f67f321715cceafd7c1e0165e5..be6b3add037e9c95e6c93a3ee6b413e5 this.setFlightAllowed(dedicatedserverproperties.allowFlight); this.setMotd(dedicatedserverproperties.motd); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 4beada452d014ec7dc7c167466ec2af3c5bfcd33..63629a36572cd83977886c016084fd5ebefab65c 100644 +index 629f35eda2f31b17025fd9d0e594cdebabc0a504..721fe9c6c3a6700d5d91d4078bfd79dd01ef32f3 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -81,6 +81,7 @@ import net.minecraft.world.level.storage.WritableLevelData; +@@ -82,6 +82,7 @@ import net.minecraft.world.level.storage.WritableLevelData; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; import net.minecraft.world.scores.Scoreboard; @@ -45,7 +45,7 @@ index 4beada452d014ec7dc7c167466ec2af3c5bfcd33..63629a36572cd83977886c016084fd5e // CraftBukkit start import java.util.HashMap; -@@ -172,6 +173,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -173,6 +174,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray public final org.purpurmc.purpur.PurpurWorldConfig purpurConfig; // Purpur @@ -53,7 +53,7 @@ index 4beada452d014ec7dc7c167466ec2af3c5bfcd33..63629a36572cd83977886c016084fd5e public final co.aikar.timings.WorldTimingsHandler timings; // Paper public static BlockPos lastPhysicsProblem; // Spigot private org.spigotmc.TickLimiter entityLimiter; -@@ -253,6 +255,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -306,6 +308,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), env); // Purpur @@ -62,10 +62,10 @@ index 4beada452d014ec7dc7c167466ec2af3c5bfcd33..63629a36572cd83977886c016084fd5e this.generator = gen; 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 07a04dcbd48430102268f8f44e9bce437214a00f..53fe8501a477a2cb436792cc02601de4de7f3f54 100644 +index 002a3ee08d7e009ef1e4bd3bc274aa608846b219..7c6af53de9b3b7552bf69aaef6ce2ff179bf2ece 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -264,6 +264,8 @@ import net.md_5.bungee.api.chat.BaseComponent; // Spigot +@@ -265,6 +265,8 @@ import net.md_5.bungee.api.chat.BaseComponent; // Spigot import javax.annotation.Nullable; // Paper import javax.annotation.Nonnull; // Paper @@ -74,7 +74,7 @@ index 07a04dcbd48430102268f8f44e9bce437214a00f..53fe8501a477a2cb436792cc02601de4 public final class CraftServer implements Server { private final String serverName = io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); // Paper private final String serverVersion; -@@ -1071,6 +1073,7 @@ public final class CraftServer implements Server { +@@ -1074,6 +1076,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); org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur @@ -82,7 +82,7 @@ index 07a04dcbd48430102268f8f44e9bce437214a00f..53fe8501a477a2cb436792cc02601de4 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)) -@@ -1087,6 +1090,7 @@ public final class CraftServer implements Server { +@@ -1090,6 +1093,7 @@ public final class CraftServer implements Server { } world.spigotConfig.init(); // Spigot world.purpurConfig.init(); // Purpur @@ -90,7 +90,7 @@ index 07a04dcbd48430102268f8f44e9bce437214a00f..53fe8501a477a2cb436792cc02601de4 } Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper -@@ -1104,6 +1108,7 @@ public final class CraftServer implements Server { +@@ -1107,6 +1111,7 @@ public final class CraftServer implements Server { org.spigotmc.SpigotConfig.registerCommands(); // Spigot io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper org.purpurmc.purpur.PurpurConfig.registerCommands(); // Purpur @@ -98,7 +98,7 @@ index 07a04dcbd48430102268f8f44e9bce437214a00f..53fe8501a477a2cb436792cc02601de4 this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*"); this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -3131,6 +3136,13 @@ public final class CraftServer implements Server { +@@ -3056,6 +3061,13 @@ public final class CraftServer implements Server { } // Purpur end @@ -113,7 +113,7 @@ index 07a04dcbd48430102268f8f44e9bce437214a00f..53fe8501a477a2cb436792cc02601de4 public void restart() { org.spigotmc.RestartCommand.restart(); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index e2b79f8eacd34d2d20f8be34b402820723e37ae3..6aff380ee0224a438b36fa83cfbede4b57996d06 100644 +index 930614ebfd3d6b6e011a58bbd5310620c02582db..ecb5105f4bebb897d098e4a82eb8dfa1b97218fa 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -184,6 +184,14 @@ public class Main {