Minimize strict-advancement-dimension-checks.patch

This commit is contained in:
Bjarne Koll 2023-06-08 10:53:00 +02:00
parent aa1c25c88d
commit d5682d77c3
No known key found for this signature in database
GPG key ID: 27F6CCCF55D2EE62
3 changed files with 5 additions and 6 deletions

View file

@ -11,14 +11,13 @@ 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/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 72da912363681685809aa04cf35f1e5a8f8b93a8..0e8e1f74a041dc500bb07d3e5e97ff134882fb59 100644
index 72da912363681685809aa04cf35f1e5a8f8b93a8..81b6b6f0e74bc3940b211846ed084b545a8c46db 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1314,7 +1314,12 @@ public class ServerPlayer extends Player {
// CraftBukkit start
@@ -1315,6 +1315,12 @@ public class ServerPlayer extends Player {
ResourceKey<Level> maindimensionkey = CraftDimensionUtil.getMainDimensionKey(origin);
ResourceKey<Level> maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level());
-
+ // Paper start - config for strict advancement checks for dimensions
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.strictAdvancementDimensionCheck) {
+ maindimensionkey = resourcekey;

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerInventorySlotChangeEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 0e8e1f74a041dc500bb07d3e5e97ff134882fb59..4eb2679bddf89cc1c72ab561fd7e1be8423d746b 100644
index 81b6b6f0e74bc3940b211846ed084b545a8c46db..fcd79bb4c231b1c91e6b094d9be90b35835717a6 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -371,6 +371,25 @@ public class ServerPlayer extends Player {

View file

@ -8,7 +8,7 @@ offhand slot isn't sent. This is not correct because you *can* put stuff into th
by pressing the offhand swap item
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 4eb2679bddf89cc1c72ab561fd7e1be8423d746b..bf512f73b6c4f318b514fa998cfe142130ea53a1 100644
index fcd79bb4c231b1c91e6b094d9be90b35835717a6..870963afbe74272bbc67447476631ba84ed8cef2 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -340,6 +340,13 @@ public class ServerPlayer extends Player {