Compiler issues v4

This commit is contained in:
Bjarne Koll
2024-10-25 17:08:48 +02:00
parent 319032e137
commit f3f59e196d
11 changed files with 68 additions and 30 deletions

View File

@@ -4098,11 +4098,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import java.util.function.Supplier;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.Vec3i;
+import net.minecraft.resources.ResourceKey;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.world.level.ChunkPos;
+import net.minecraft.world.level.Level;
+import net.minecraft.world.phys.Vec3;
+import org.bukkit.Location;
+import org.bukkit.NamespacedKey;
+import org.bukkit.craftbukkit.util.CraftNamespacedKey;
+import org.bukkit.craftbukkit.util.Waitable;
+
+public final class MCUtil {
@@ -4256,6 +4259,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public static void scheduleAsyncTask(Runnable run) {
+ asyncExecutor.execute(run);
+ }
+
+ public static <T> ResourceKey<T> toResourceKey(
+ final ResourceKey<? extends net.minecraft.core.Registry<T>> registry,
+ final NamespacedKey namespacedKey
+ ) {
+ return ResourceKey.create(registry, CraftNamespacedKey.toMinecraft(namespacedKey));
+ }
+
+ public static NamespacedKey fromResourceKey(final ResourceKey<?> key) {
+ return CraftNamespacedKey.fromMinecraft(key.location());
+ }
+}
diff --git a/src/main/java/io/papermc/paper/util/StackWalkerUtil.java b/src/main/java/io/papermc/paper/util/StackWalkerUtil.java
new file mode 100644