mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 23:22:10 -07:00
Add option for strict advancement dimension checks
Craftbukkit attempts to translate worlds that use the same generation as the Overworld, The Nether, or The End to use those dimensions when checking the `changed_dimension` 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.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/advancements/critereon/LocationPredicate.java
|
||||
+++ b/net/minecraft/advancements/critereon/LocationPredicate.java
|
||||
@@ -44,7 +44,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.util.CraftDimensionUtil.getMainDimensionKey(world))) { // Paper - Add option for strict advancement dimension checks
|
||||
return false;
|
||||
} else {
|
||||
BlockPos blockPos = BlockPos.containing(x, y, z);
|
Reference in New Issue
Block a user