diff --git a/patches/server/0834-Add-option-for-strict-advancement-dimension-checks.patch b/patches/server/0834-Add-option-for-strict-advancement-dimension-checks.patch index 17c86550c3..8eea382975 100644 --- a/patches/server/0834-Add-option-for-strict-advancement-dimension-checks.patch +++ b/patches/server/0834-Add-option-for-strict-advancement-dimension-checks.patch @@ -10,6 +10,19 @@ criteria trigger, or whether to trigger the `NETHER_TRAVEL` distance trigger. This adds a config option to ignore that and use the exact dimension key of the worlds involved. +diff --git a/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java b/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java +index 97b6f2ae67edd37483a27a7e8678d9d78508d990..13078ac512fddc8009114c1c3bec8f67213c4e74 100644 +--- a/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java ++++ b/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java +@@ -72,7 +72,7 @@ public class LocationPredicate { + return false; + } else if (!this.z.matches(z)) { + return false; +- } else if (this.dimension != null && this.dimension != world.dimension()) { ++ } else if (this.dimension != null && this.dimension != (io.papermc.paper.configuration.GlobalConfiguration.get().misc.strictAdvancementDimensionCheck ? world.dimension() : org.bukkit.craftbukkit.util.CraftDimensionUtil.getMainDimensionKey(world))) { // Paper + return false; + } else { + BlockPos blockPos = BlockPos.containing(x, y, z); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java index c0db84c559c3ab5b202b234915e070b540a828fe..48cd206a41fe238af4c53b7f2a664fb16da366a5 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java