diff options
Diffstat (limited to 'patches/server/0834-Folia-scheduler-and-owned-region-API.patch')
-rw-r--r-- | patches/server/0834-Folia-scheduler-and-owned-region-API.patch | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/patches/server/0834-Folia-scheduler-and-owned-region-API.patch b/patches/server/0834-Folia-scheduler-and-owned-region-API.patch index edcef4f99f..10b07e7cdb 100644 --- a/patches/server/0834-Folia-scheduler-and-owned-region-API.patch +++ b/patches/server/0834-Folia-scheduler-and-owned-region-API.patch @@ -1249,10 +1249,10 @@ index 4cced854e750ea9057b4a8d686245925e5dc2868..5a2d33b7da60469f27f9782841b0cf87 public void setLevelCallback(EntityInLevelCallback changeListener) { this.levelCallback = changeListener; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5c907eca23d936ba3095f2d81256775edaa737da..1bf51d4a1ffb6ab56c4023c49725e412f4350197 100644 +index 5c907eca23d936ba3095f2d81256775edaa737da..4c4fa7bbafb075beb0d9c1ef21e3ba2d62b1ae65 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -313,6 +313,76 @@ public final class CraftServer implements Server { +@@ -313,6 +313,88 @@ public final class CraftServer implements Server { private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher(); // Paper private final io.papermc.paper.potion.PaperPotionBrewer potionBrewer; // Paper - Custom Potion Mixes @@ -1321,9 +1321,21 @@ index 5c907eca23d936ba3095f2d81256775edaa737da..1bf51d4a1ffb6ab56c4023c49725e412 + } + + @Override ++ public final boolean isOwnedByCurrentRegion(World world, int minChunkX, int minChunkZ, int maxChunkX, int maxChunkZ) { ++ return ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor( ++ ((CraftWorld) world).getHandle(), minChunkX, minChunkZ, maxChunkX, maxChunkZ ++ ); ++ } ++ ++ @Override + public final boolean isOwnedByCurrentRegion(Entity entity) { + return ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(((org.bukkit.craftbukkit.entity.CraftEntity) entity).getHandleRaw()); + } ++ ++ @Override ++ public final boolean isGlobalTickThread() { ++ return ca.spottedleaf.moonrise.common.util.TickThread.isTickThread(); ++ } + // Paper end - Folia reagion threading API + static { |