--- a/net/minecraft/advancements/critereon/LocationPredicate.java
+++ b/net/minecraft/advancements/critereon/LocationPredicate.java
@@ -30,7 +30,7 @@
     public boolean matches(ServerLevel world, double x, double y, double z) {
         if (this.position.isPresent() && !this.position.get().matches(x, y, z)) {
             return false;
-        } else if (this.dimension.isPresent() && this.dimension.get() != world.dimension()) {
+        } else if (this.dimension.isPresent() && this.dimension.get() != (io.papermc.paper.configuration.GlobalConfiguration.get().misc.strictAdvancementDimensionCheck ? world.dimension() : org.bukkit.craftbukkit.v1_20_R2.util.CraftDimensionUtil.getMainDimensionKey(world))) { // Paper
             return false;
         } else {
             BlockPos blockPos = BlockPos.containing(x, y, z);
