Paper/patches/server/0567-Fix-CraftSound-backwards-compatibility.patch
Shane Freeder aa52bf9e33
Remove "Implement-Chunk-Priority-Urgency-System-for-Chunks" (Fixes #5980)
Mojang made some changes to priorities in 1.17 and it seems that these changes
conflict with the changes made in this patch, which in some cases appears to
cause excessive rescheduling of tasks.

This, however, is not confirmed as such but seems to be the behavior that we're
seeing to cause this issue, if mojang has adopted the changes we suggested,
then a good chunk of this patch may be unneeded, but, this needs a much better
look than I'm currently able to do
2021-08-14 14:55:55 +01:00

22 Zeilen
937 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Thu, 17 Dec 2020 15:25:49 -0600
Subject: [PATCH] Fix CraftSound backwards compatibility
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
index 266563e72b563fd9db85f17bca710bbe45e8a22d..b2667c5f0794d521766203fea3299f12e21f5c76 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
@@ -26,4 +26,10 @@ public class CraftSound {
public static Sound getBukkit(SoundEvent soundEffect) {
return Registry.SOUNDS.get(CraftNamespacedKey.fromMinecraft(net.minecraft.core.Registry.SOUND_EVENT.getKey(soundEffect)));
}
+
+ // Paper start
+ public static String getSound(Sound sound) {
+ return sound.getKey().getKey();
+ }
+ // Paper end
}