24 lines
1.0 KiB
Diff
24 lines
1.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
|
Date: Sat, 24 May 2025 04:27:17 +0800
|
|
Subject: [PATCH] Add BlockPos transform to Position support
|
|
|
|
|
|
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
|
index ff6d200c3c3ecb958086f11dff39357dc0bf70fc..16d95bd30c33d831fd495c65748f6633df5971aa 100644
|
|
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
|
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
|
@@ -160,6 +160,12 @@ public final class MCUtil {
|
|
return new Location(world.getWorld(), pos.x(), pos.y(), pos.z());
|
|
}
|
|
|
|
+ // Luminol start - add BlockPos support
|
|
+ public static org.bukkit.Location toLocation(net.minecraft.world.level.Level world, BlockPos pos) {
|
|
+ return new org.bukkit.Location(world.getWorld(), pos.getX(), pos.getY(), pos.getZ());
|
|
+ }
|
|
+ // Luminol end - add BlockPos support
|
|
+
|
|
/**
|
|
* Converts a NMS World/Vector to Bukkit Location
|
|
*/
|