mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
correctly change enchantment registry to a 'delayed' version
This commit is contained in:
@@ -219,11 +219,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
* Custom boss bars.
|
||||
*
|
||||
@@ -0,0 +0,0 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Server enchantments.
|
||||
*
|
||||
* @see Enchantment
|
||||
+ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#ENCHANTMENT}
|
||||
*/
|
||||
- Registry<Enchantment> ENCHANTMENT = Objects.requireNonNull(Bukkit.getRegistry(Enchantment.class), "No registry present for Enchantment. This is a bug.");
|
||||
+ Registry<Enchantment> ENCHANTMENT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.ENCHANTMENT); // Paper
|
||||
+ @Deprecated(since = "1.21")
|
||||
+ Registry<Enchantment> ENCHANTMENT = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(Enchantment.class), "No registry present for Enchantment. This is a bug."); // Paper
|
||||
/**
|
||||
* Server entity types.
|
||||
*
|
||||
@@ -305,10 +308,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
* Jukebox songs.
|
||||
*
|
||||
* @see JukeboxSong
|
||||
+ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#JUKEBOX_SONG}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
- Registry<JukeboxSong> JUKEBOX_SONG = Objects.requireNonNull(Bukkit.getRegistry(JukeboxSong.class), "No registry present for JukeboxSong. This is a bug.");
|
||||
+ Registry<JukeboxSong> JUKEBOX_SONG = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.JUKEBOX_SONG); // Paper
|
||||
+ @Deprecated(since = "1.21")
|
||||
+ Registry<JukeboxSong> JUKEBOX_SONG = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(JukeboxSong.class), "No registry present for JukeboxSong. This is a bug."); // Paper
|
||||
/**
|
||||
* Villager profession.
|
||||
*
|
||||
|
Reference in New Issue
Block a user