Updated Upstream (Folia)

This commit is contained in:
Bacteriawa
2025-05-20 16:31:49 +08:00
parent 8e697a3dd6
commit 61c3cc8c74

View File

@@ -22,7 +22,7 @@ index de8b9048c8395c05b8688bc9d984b8ad680f15b3..f42692cd4f0154705c3d5b030d281cfc
+ // KioCG end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f7ceb89d9b908f02fc9e90e426e8e14e330ac041..3819c748473f2cbf53890867e552985eeb8ee35f 100644
index f7ceb89d9b908f02fc9e90e426e8e14e330ac041..b6e451c8a41a1d25bac679d18156d6e813efda2a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2400,6 +2400,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -57,27 +57,10 @@ index f7ceb89d9b908f02fc9e90e426e8e14e330ac041..3819c748473f2cbf53890867e552985e
// Paper start - persist for use in offline save data
if (!nbttagcompound.contains("Paper")) {
nbttagcompound.put("Paper", new CompoundTag());
@@ -3614,4 +3632,27 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3614,4 +3632,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void setDeathScreenScore(final int score) {
getHandle().setScore(score);
}
+
+ /**
+ * Returns whether container desync checks should skip the full item comparison of remote carried and changed slots
+ * and should instead only check their type and amount.
+ * <p>
+ * This is useful if the client is not able to produce the same item stack (or as of 1.21.5, its data hashes) as the server.
+ *
+ * @return whether to simplify container desync checks
+ */
+ public boolean simplifyContainerDesyncCheck() {
+ return simplifyContainerDesyncCheck;
+ }
+
+ public void setSimplifyContainerDesyncCheck(final boolean simplifyContainerDesyncCheck) {
+ this.simplifyContainerDesyncCheck = simplifyContainerDesyncCheck;
+ }
+
+ // KioCG start - ChunkHot
+ @Override
+ public long getNearbyChunkHot() {