aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0009-MC-Utils.patch
diff options
context:
space:
mode:
authorLulu13022002 <[email protected]>2024-11-23 20:09:34 +0100
committerGitHub <[email protected]>2024-11-23 20:09:34 +0100
commit751e9bd125ef85704351f92b0a3781f6e6d5918f (patch)
tree83f67284d1aa1dd2fbc5a028a482091dd80181d8 /patches/server/0009-MC-Utils.patch
parent915637df5cac63362bdea1db8613068b4983de88 (diff)
downloadPaper-751e9bd125ef85704351f92b0a3781f6e6d5918f.tar.gz
Paper-751e9bd125ef85704351f92b0a3781f6e6d5918f.zip
Fix jukebox component (#11642)
Diffstat (limited to 'patches/server/0009-MC-Utils.patch')
-rw-r--r--patches/server/0009-MC-Utils.patch15
1 files changed, 2 insertions, 13 deletions
diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch
index 5e156e9126..1912c615e2 100644
--- a/patches/server/0009-MC-Utils.patch
+++ b/patches/server/0009-MC-Utils.patch
@@ -4691,16 +4691,15 @@ index 0000000000000000000000000000000000000000..197224e31175252d8438a8df585bbb65
+}
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
new file mode 100644
-index 0000000000000000000000000000000000000000..e85e544506b4c762503a1cb490e6c0f5b1d563f4
+index 0000000000000000000000000000000000000000..9d97c9afa31bed6d2e6b7778bfe4cc41cea31c4d
--- /dev/null
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
-@@ -0,0 +1,220 @@
+@@ -0,0 +1,209 @@
+package io.papermc.paper.util;
+
+import com.google.common.collect.Collections2;
+import com.google.common.collect.Lists;
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
-+import io.papermc.paper.adventure.PaperAdventure;
+import io.papermc.paper.math.BlockPosition;
+import io.papermc.paper.math.FinePosition;
+import io.papermc.paper.math.Position;
@@ -4716,15 +4715,10 @@ index 0000000000000000000000000000000000000000..e85e544506b4c762503a1cb490e6c0f5
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Supplier;
-+import net.kyori.adventure.key.Key;
+import net.minecraft.core.BlockPos;
-+import net.minecraft.core.Holder;
+import net.minecraft.core.Vec3i;
-+import net.minecraft.core.registries.BuiltInRegistries;
+import net.minecraft.resources.ResourceKey;
-+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.server.MinecraftServer;
-+import net.minecraft.sounds.SoundEvent;
+import net.minecraft.world.level.ChunkPos;
+import net.minecraft.world.level.Level;
+import net.minecraft.world.phys.Vec3;
@@ -4896,11 +4890,6 @@ index 0000000000000000000000000000000000000000..e85e544506b4c762503a1cb490e6c0f5
+ return CraftNamespacedKey.fromMinecraft(key.location());
+ }
+
-+ public static Holder<SoundEvent> keyToSound(Key key) {
-+ ResourceLocation soundId = PaperAdventure.asVanilla(key);
-+ return BuiltInRegistries.SOUND_EVENT.wrapAsHolder(BuiltInRegistries.SOUND_EVENT.getOptional(soundId).orElse(SoundEvent.createVariableRangeEvent(soundId)));
-+ }
-+
+ public static <A, M> List<A> transformUnmodifiable(final List<? extends M> nms, final Function<? super M, ? extends A> converter) {
+ return Collections.unmodifiableList(Lists.transform(nms, converter::apply));
+ }