Skip to content

Commit 8bde0ad

Browse files
committed
Update Paper
1 parent 5f4e40d commit 8bde0ad

File tree

2 files changed

+3
-34
lines changed

2 files changed

+3
-34
lines changed

folia-server/paper-patches/features/0001-Region-Threading-Base.patch

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
758758
diff --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-
}
801770
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
802771
index 1da86b25e3b89c79d4f3920c8d2ef10ee2757f65..1e605345b2911193b4500a7f84ea8ace318842e5 100644
803772
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ group=dev.folia
22
version=1.21.5-R0.1-SNAPSHOT
33
mcVersion=1.21.5
44

5-
paperRef=a033e3b9ef78cfe85be807ac3fd1dd956274d4db
5+
paperRef=2ba1675c7506cadd8a540ea452e5dafb79ae8947
66

77
org.gradle.configuration-cache=true
88
org.gradle.caching=true

0 commit comments

Comments
 (0)