Remove Moonrise utils to MCUtils, remove duplicated/unused utils
This commit is contained in:
@@ -52,7 +52,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+package io.papermc.paper.threadedregions;
|
||||
+
|
||||
+import ca.spottedleaf.concurrentutil.util.Validate;
|
||||
+import io.papermc.paper.util.TickThread;
|
||||
+import ca.spottedleaf.moonrise.common.util.TickThread;
|
||||
+import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
|
||||
+import net.minecraft.world.entity.Entity;
|
||||
+import org.bukkit.craftbukkit.entity.CraftEntity;
|
||||
@@ -1280,14 +1280,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ @Override
|
||||
+ public final boolean isOwnedByCurrentRegion(World world, io.papermc.paper.math.Position position) {
|
||||
+ return io.papermc.paper.util.TickThread.isTickThreadFor(
|
||||
+ return ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(
|
||||
+ ((CraftWorld) world).getHandle(), position.blockX() >> 4, position.blockZ() >> 4
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public final boolean isOwnedByCurrentRegion(World world, io.papermc.paper.math.Position position, int squareRadiusChunks) {
|
||||
+ return io.papermc.paper.util.TickThread.isTickThreadFor(
|
||||
+ return ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(
|
||||
+ ((CraftWorld) world).getHandle(), position.blockX() >> 4, position.blockZ() >> 4, squareRadiusChunks
|
||||
+ );
|
||||
+ }
|
||||
@@ -1295,7 +1295,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ @Override
|
||||
+ public final boolean isOwnedByCurrentRegion(Location location) {
|
||||
+ World world = location.getWorld();
|
||||
+ return io.papermc.paper.util.TickThread.isTickThreadFor(
|
||||
+ return ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(
|
||||
+ ((CraftWorld) world).getHandle(), location.getBlockX() >> 4, location.getBlockZ() >> 4
|
||||
+ );
|
||||
+ }
|
||||
@@ -1303,28 +1303,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ @Override
|
||||
+ public final boolean isOwnedByCurrentRegion(Location location, int squareRadiusChunks) {
|
||||
+ World world = location.getWorld();
|
||||
+ return io.papermc.paper.util.TickThread.isTickThreadFor(
|
||||
+ return ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(
|
||||
+ ((CraftWorld) world).getHandle(), location.getBlockX() >> 4, location.getBlockZ() >> 4, squareRadiusChunks
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public final boolean isOwnedByCurrentRegion(World world, int chunkX, int chunkZ) {
|
||||
+ return io.papermc.paper.util.TickThread.isTickThreadFor(
|
||||
+ return ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(
|
||||
+ ((CraftWorld) world).getHandle(), chunkX, chunkZ
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public final boolean isOwnedByCurrentRegion(World world, int chunkX, int chunkZ, int squareRadiusChunks) {
|
||||
+ return io.papermc.paper.util.TickThread.isTickThreadFor(
|
||||
+ return ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(
|
||||
+ ((CraftWorld) world).getHandle(), chunkX, chunkZ, squareRadiusChunks
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public final boolean isOwnedByCurrentRegion(Entity entity) {
|
||||
+ return io.papermc.paper.util.TickThread.isTickThreadFor(((org.bukkit.craftbukkit.entity.CraftEntity) entity).getHandleRaw());
|
||||
+ return ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(((org.bukkit.craftbukkit.entity.CraftEntity) entity).getHandleRaw());
|
||||
+ }
|
||||
+ // Paper end - Folia reagion threading API
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user