@@ -756,48 +756,17 @@ index c03608fec96b51e1867f43d8f42e5aefb1520e46..127d96280cad2d4e5db574a089d67ad6
756756 * Retires the scheduler, preventing new tasks from being scheduled and invoking the retired callback
757757 * on all currently scheduled tasks.
758758diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
759- index 27927bb7967a417dd3542e7d62d67a13118ed98e..eb94f71f626c1f89f1b9048a8e68ae09ff17effc 100644
759+ index 8492a06883e2ff597bbbdaa74fe5e5cdd0a0a1b1..ff6d200c3c3ecb958086f11dff39357dc0bf70fc 100644
760760--- a/src/main/java/io/papermc/paper/util/MCUtil.java
761761+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
762- @@ -92 ,6 +92 ,7 @@ public final class MCUtil {
762+ @@ -94 ,6 +94 ,7 @@ public final class MCUtil {
763763 */
764764 public static void ensureMain(String reason, Runnable run) {
765765 if (!isMainThread()) {
766766+ if (true) throw new UnsupportedOperationException(); // Folia - region threading
767767 if (reason != null) {
768768 MinecraftServer.LOGGER.warn("Asynchronous " + reason + "!", new IllegalStateException());
769769 }
770- @@ -150,6 +151,30 @@ public final class MCUtil {
771- return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + (z1 - z2) * (z1 - z2);
772- }
773-
774- + // Folia start - TODO MERGE INTO MCUTIL
775- + /**
776- + * Converts a NMS World/Vector to Bukkit Location
777- + * @param world
778- + * @param pos
779- + * @return
780- + */
781- + public static org.bukkit.Location toLocation(net.minecraft.world.level.Level world, Vec3 pos) {
782- + return new org.bukkit.Location(world.getWorld(), pos.x(), pos.y(), pos.z());
783- + }
784- +
785- + /**
786- + * Converts a NMS World/Vector to Bukkit Location
787- + * @param world
788- + * @param pos
789- + * @param yaw
790- + * @param pitch
791- + * @return
792- + */
793- + public static org.bukkit.Location toLocation(net.minecraft.world.level.Level world, Vec3 pos, float yaw, float pitch) {
794- + return new org.bukkit.Location(world.getWorld(), pos.x(), pos.y(), pos.z(), yaw, pitch);
795- + }
796- + // Folia end - TODO MERGE INTO MCUTIL
797- +
798- public static BlockPos toBlockPos(Position pos) {
799- return new BlockPos(pos.blockX(), pos.blockY(), pos.blockZ());
800- }
801770diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
802771index 1da86b25e3b89c79d4f3920c8d2ef10ee2757f65..1e605345b2911193b4500a7f84ea8ace318842e5 100644
803772--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
0 commit comments