Don't use delayed registries in impl anywhere (#11918)

This commit is contained in:
Jake Potrebic
2025-01-11 11:02:28 -08:00
committed by GitHub
parent 19ddbeff9e
commit ac3aaa248b
55 changed files with 145 additions and 133 deletions

View File

@ -2,6 +2,7 @@ package org.bukkit;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import io.papermc.paper.registry.RegistryKey;
import java.util.Locale;
import org.bukkit.packs.DataPack;
import org.bukkit.util.OldEnum;
@ -1687,7 +1688,7 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
@NotNull
@Deprecated(since = "1.21.3")
static Sound valueOf(@NotNull String name) {
Sound sound = Bukkit.getUnsafe().get(Registry.SOUNDS, NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
Sound sound = Bukkit.getUnsafe().get(RegistryKey.SOUND_EVENT, NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
if (sound != null) {
return sound;
}