mirror of
https://github.com/PaperMC/Folia.git
synced 2024-11-24 12:25:23 +01:00
Make ServerLevel#areChunksLoadedForMove also check region ownership
We do not want players to move into chunks that are not owned by the current region
This commit is contained in:
parent
0e4358fb7e
commit
386bcd1094
@ -13743,7 +13743,7 @@ index 736f37979c882e41e7571202df38eb6a2923fcb0..09a6a74f9bbcbbfba8bfc0424cde6000
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 714637cdd9dcdbffa344b19e77944fb3c7541ff7..1a6ff553e8d286bdd8b46ce366a4cbd4485c0e6f 100644
|
||||
index 714637cdd9dcdbffa344b19e77944fb3c7541ff7..440e39238560059d3c13a98c66fd7dd1dd0a0381 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -192,35 +192,34 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -13791,6 +13791,15 @@ index 714637cdd9dcdbffa344b19e77944fb3c7541ff7..1a6ff553e8d286bdd8b46ce366a4cbd4
|
||||
private final alternate.current.wire.WireHandler wireHandler = new alternate.current.wire.WireHandler(this); // Paper - optimize redstone (Alternate Current)
|
||||
public static Throwable getAddToWorldStackTrace(Entity entity) {
|
||||
final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date());
|
||||
@@ -258,7 +257,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
for (int cx = minChunkX; cx <= maxChunkX; ++cx) {
|
||||
for (int cz = minChunkZ; cz <= maxChunkZ; ++cz) {
|
||||
- if (chunkProvider.getChunkAtIfLoadedImmediately(cx, cz) == null) {
|
||||
+ if (chunkProvider.getChunkAtIfLoadedImmediately(cx, cz) == null || !io.papermc.paper.util.TickThread.isTickThreadFor(this, cx, cz)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -267,50 +266,64 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user