Don't use delayed registries in impl anywhere (#11918)
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package org.bukkit;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import io.papermc.paper.registry.RegistryAccess;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -44,7 +46,7 @@ public abstract class MusicInstrument implements Keyed, net.kyori.adventure.tran
|
||||
|
||||
@NotNull
|
||||
private static MusicInstrument getInstrument(@NotNull String key) {
|
||||
return Registry.INSTRUMENT.getOrThrow(NamespacedKey.minecraft(key));
|
||||
return RegistryAccess.registryAccess().getRegistry(RegistryKey.INSTRUMENT).getOrThrow(NamespacedKey.minecraft(key));
|
||||
}
|
||||
|
||||
// Paper start - deprecate getKey
|
||||
|
||||
Reference in New Issue
Block a user