From 630b5af068da360967f370f4bf31229a9e31a86d Mon Sep 17 00:00:00 2001 From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com> Date: Sun, 24 Sep 2023 16:11:09 +0300 Subject: [PATCH] Updated Upstream (Purpur) Upstream has released updates that appear to apply and compile correctly Purpur Changes: --- gradle.properties | 2 +- patches/server/0002-Divine-Configuration.patch | 12 ++++++------ .../0004-Optimize-default-values-for-configs.patch | 4 ++-- patches/server/0010-Remove-Spigot-tick-limiter.patch | 9 ++++----- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/gradle.properties b/gradle.properties index c346648..c2b13bf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ group = gq.bxteam.divinemc version = 1.20.2-R0.1-SNAPSHOT -purpurRef = 8a46226fdd14e0f8cf80b21274ef2b79e92158ca +purpurRef = 01e013b1732e252916c41356b8760d26251d6b25 org.gradle.caching = true org.gradle.parallel = true diff --git a/patches/server/0002-Divine-Configuration.patch b/patches/server/0002-Divine-Configuration.patch index 021cd7d..ac7fef9 100644 --- a/patches/server/0002-Divine-Configuration.patch +++ b/patches/server/0002-Divine-Configuration.patch @@ -327,7 +327,7 @@ index 0000000000000000000000000000000000000000..5d16d2250bae9c982a0af9ad2580a635 +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 6e9061dd6d5fd35d74d02c25a5985ffc5bc8e5ac..d65329d5fee1e204635cd7bcfd1a93c498fd0543 100644 +index e2c74460d149360f01c4d0577054879f2601a58f..567d90930adfdef4949ba011bb24790b7d73c57f 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -232,6 +232,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -348,7 +348,7 @@ index 6e9061dd6d5fd35d74d02c25a5985ffc5bc8e5ac..d65329d5fee1e204635cd7bcfd1a93c4 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 7b35238aadcd10a4a246712f252e6254b0070d57..1a0f3acc5ff66e867171b95c520d96efc8fa65aa 100644 +index 4e8738531ea388733c41dbb408eb43c1e3c88fad..985d00ffd5579bbfb5c6798afda30f89cf158e4e 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -15,6 +15,8 @@ import java.util.function.Consumer; @@ -360,15 +360,15 @@ index 7b35238aadcd10a4a246712f252e6254b0070d57..1a0f3acc5ff66e867171b95c520d96ef import net.minecraft.CrashReport; import net.minecraft.CrashReportCategory; import net.minecraft.ReportedException; -@@ -176,6 +178,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { - // Paper end +@@ -177,6 +179,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { + public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray public final org.purpurmc.purpur.PurpurWorldConfig purpurConfig; // Purpur + public final gq.bxteam.divinemc.configuration.DivineWorldConfig divinemcConfig; // DivineMC public final co.aikar.timings.WorldTimingsHandler timings; // Paper public static BlockPos lastPhysicsProblem; // Spigot private org.spigotmc.TickLimiter entityLimiter; -@@ -257,6 +260,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -258,6 +261,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), env); // Purpur @@ -377,7 +377,7 @@ index 7b35238aadcd10a4a246712f252e6254b0070d57..1a0f3acc5ff66e867171b95c520d96ef 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 90948176112da593f6896360a4a5d59b3ae9d16f..843ece478bfd198f955b7d877f8dc1d0d0a1ad32 100644 +index 541fb093e2fc6439370d757a7cc70e049e0d7d6f..4c2c49e5f4a47fa1f0c540514a61b3957e958e32 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -15,6 +15,7 @@ import com.mojang.brigadier.tree.LiteralCommandNode; diff --git a/patches/server/0004-Optimize-default-values-for-configs.patch b/patches/server/0004-Optimize-default-values-for-configs.patch index af5e5f6..b9fc327 100644 --- a/patches/server/0004-Optimize-default-values-for-configs.patch +++ b/patches/server/0004-Optimize-default-values-for-configs.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimize default values for configs diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java -index 3bc7230ca62ebe3426da293e436a962bb0134f85..fd93efca790b75e8300202342c45b845d8e7eb7c 100644 +index 97a9ce438afc9094dca4a44cb25b37d5f88dcf43..89ffa88514911f36f65d0b1ff513d11b126a7d2b 100644 --- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java +++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java @@ -90,9 +90,11 @@ public class GlobalConfiguration extends ConfigurationPart { @@ -23,7 +23,7 @@ index 3bc7230ca62ebe3426da293e436a962bb0134f85..fd93efca790b75e8300202342c45b845 public boolean serverNamePrivacy = false; public List hiddenConfigEntries = List.of( "database", -@@ -312,9 +314,9 @@ public class GlobalConfiguration extends ConfigurationPart { +@@ -311,9 +313,9 @@ public class GlobalConfiguration extends ConfigurationPart { public boolean fixEntityPositionDesync = true; public boolean loadPermissionsYmlBeforePlugins = true; @Constraints.Min(4) diff --git a/patches/server/0010-Remove-Spigot-tick-limiter.patch b/patches/server/0010-Remove-Spigot-tick-limiter.patch index a1b7362..7fbf90a 100644 --- a/patches/server/0010-Remove-Spigot-tick-limiter.patch +++ b/patches/server/0010-Remove-Spigot-tick-limiter.patch @@ -5,13 +5,12 @@ Subject: [PATCH] Remove Spigot tick limiter Original code by Titaniumtown, modified by NONPLAYT You can find the original code on https://gitlab.com/Titaniumtown/JettPack -TODO: Update when Anti-XRay will be added diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 1a0f3acc5ff66e867171b95c520d96efc8fa65aa..b2bd02bff590940c0106dfba327cae58198e3e46 100644 +index 985d00ffd5579bbfb5c6798afda30f89cf158e4e..a48403c468a8d026017fcc3aaef5ee5ca37e4d65 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -181,8 +181,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -182,8 +182,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public final gq.bxteam.divinemc.configuration.DivineWorldConfig divinemcConfig; // DivineMC public final co.aikar.timings.WorldTimingsHandler timings; // Paper public static BlockPos lastPhysicsProblem; // Spigot @@ -20,15 +19,15 @@ index 1a0f3acc5ff66e867171b95c520d96efc8fa65aa..b2bd02bff590940c0106dfba327cae58 private int tileTickPosition; public final Map explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions public java.util.ArrayDeque redstoneUpdateInfos; // Paper - Move from Map in BlockRedstoneTorch to here -@@ -343,8 +341,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -344,8 +342,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // CraftBukkit end timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings this.keepSpawnInMemory = this.paperConfig().spawn.keepSpawnLoaded; // Paper - this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime); - this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); + this.chunkPacketBlockController = this.paperConfig().anticheat.antiXray.enabled ? new com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray(this, executor) : com.destroystokyo.paper.antixray.ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray // Paper start - optimise collisions this.minSection = io.papermc.paper.util.WorldUtil.getMinSection(this); - this.maxSection = io.papermc.paper.util.WorldUtil.getMaxSection(this); diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java index 389bcb5e01d66f8e3915e09a49aace5176012191..d5271bc912632e694a10897717460893a1badf04 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java