Add missing key files and cleanup registry definition order
This commit is contained in:
@@ -172,6 +172,36 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ */
|
||||
+ @ApiStatus.Internal
|
||||
+ RegistryKey<ItemType> ITEM = create("item");
|
||||
+ /**
|
||||
+ * Built-in registry for cat variants.
|
||||
+ * @see io.papermc.paper.registry.keys.CatVariantKeys
|
||||
+ */
|
||||
+ RegistryKey<Cat.Type> CAT_VARIANT = create("cat_variant");
|
||||
+ /**
|
||||
+ * Built-in registry for frog variants.
|
||||
+ * @see io.papermc.paper.registry.keys.FrogVariantKeys
|
||||
+ */
|
||||
+ RegistryKey<Frog.Variant> FROG_VARIANT = create("frog_variant");
|
||||
+ /**
|
||||
+ * Built-in registry for villager professions.
|
||||
+ * @see io.papermc.paper.registry.keys.VillagerProfessionKeys
|
||||
+ */
|
||||
+ RegistryKey<Villager.Profession> VILLAGER_PROFESSION = create("villager_profession");
|
||||
+ /**
|
||||
+ * Built-in registry for villager types.
|
||||
+ * @see io.papermc.paper.registry.keys.VillagerTypeKeys
|
||||
+ */
|
||||
+ RegistryKey<Villager.Type> VILLAGER_TYPE = create("villager_type");
|
||||
+ /**
|
||||
+ * Built-in registry for map decoration types.
|
||||
+ * @see io.papermc.paper.registry.keys.MapDecorationTypeKeys
|
||||
+ */
|
||||
+ RegistryKey<MapCursor.Type> MAP_DECORATION_TYPE = create("map_decoration_type");
|
||||
+ /**
|
||||
+ * Built-in registry for menu types.
|
||||
+ * @see io.papermc.paper.registry.keys.MenuTypeKeys
|
||||
+ */
|
||||
+ RegistryKey<MenuType> MENU = create("menu");
|
||||
+
|
||||
+
|
||||
+ /* ********************** *
|
||||
@@ -214,9 +244,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ RegistryKey<Enchantment> ENCHANTMENT = create("enchantment");
|
||||
+ /**
|
||||
+ * Data-driven registry for jukebox songs.
|
||||
+ * @see io.papermc.paper.registry.keys.JukeboxSongKeys
|
||||
+ */
|
||||
+ @ApiStatus.Experimental
|
||||
+ RegistryKey<JukeboxSong> JUKEBOX_SONG = create("jukebox_song");
|
||||
+ /**
|
||||
+ * Data-driven registry for banner patterns.
|
||||
+ * @see io.papermc.paper.registry.keys.BannerPatternKeys
|
||||
+ */
|
||||
+ RegistryKey<PatternType> BANNER_PATTERN = create("banner_pattern");
|
||||
+
|
||||
+
|
||||
+ /* ******************* *
|
||||
@@ -224,19 +259,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * ******************* */
|
||||
+ RegistryKey<Art> PAINTING_VARIANT = create("painting_variant");
|
||||
+ RegistryKey<Attribute> ATTRIBUTE = create("attribute");
|
||||
+ RegistryKey<PatternType> BANNER_PATTERN = create("banner_pattern");
|
||||
+ RegistryKey<Cat.Type> CAT_VARIANT = create("cat_variant");
|
||||
+ RegistryKey<EntityType> ENTITY_TYPE = create("entity_type");
|
||||
+ RegistryKey<Particle> PARTICLE_TYPE = create("particle_type");
|
||||
+ RegistryKey<PotionType> POTION = create("potion");
|
||||
+ RegistryKey<Sound> SOUND_EVENT = create("sound_event");
|
||||
+ RegistryKey<Villager.Profession> VILLAGER_PROFESSION = create("villager_profession");
|
||||
+ RegistryKey<Villager.Type> VILLAGER_TYPE = create("villager_type");
|
||||
+ RegistryKey<MemoryKey<?>> MEMORY_MODULE_TYPE = create("memory_module_type");
|
||||
+ RegistryKey<Fluid> FLUID = create("fluid");
|
||||
+ RegistryKey<Frog.Variant> FROG_VARIANT = create("frog_variant");
|
||||
+ RegistryKey<MapCursor.Type> MAP_DECORATION_TYPE = create("map_decoration_type");
|
||||
+ RegistryKey<MenuType> MENU = create("menu");
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/registry/RegistryKeyImpl.java b/src/main/java/io/papermc/paper/registry/RegistryKeyImpl.java
|
||||
new file mode 100644
|
||||
|
||||
@@ -19,8 +19,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
+ // Paper start - deprecate getKey
|
||||
+ /**
|
||||
+ * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#ART}. Painting variants
|
||||
+ * can exist without a key.
|
||||
+ * @deprecated use {@link Registry#getKey(Keyed)}, {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)},
|
||||
+ * and {@link io.papermc.paper.registry.RegistryKey#PAINTING_VARIANT}. Painting variants can exist without a key.
|
||||
+ */
|
||||
+ @Deprecated(since = "1.21")
|
||||
+ // Paper end - deprecate getKey
|
||||
@@ -173,8 +173,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
+ // Paper start - deprecate getKey
|
||||
+ /**
|
||||
+ * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#BANNER_PATTERN}. PatternTypes
|
||||
+ * can exist without a key.
|
||||
+ * @deprecated use {@link Registry#getKey(Keyed)}, {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)},
|
||||
+ * and {@link io.papermc.paper.registry.RegistryKey#BANNER_PATTERN}. PatternTypes can exist without a key.
|
||||
+ */
|
||||
+ @Deprecated(since = "1.20.5")
|
||||
+ // Paper end - deprecate getKey
|
||||
@@ -210,8 +210,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ // Paper start - Registry#getKey
|
||||
+ /**
|
||||
+ * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#TRIM_MATERIAL}. TrimMaterials
|
||||
+ * can exist without a key.
|
||||
+ * @deprecated use {@link Registry#getKey(Keyed)}, {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)},
|
||||
+ * and {@link io.papermc.paper.registry.RegistryKey#TRIM_MATERIAL}. TrimMaterials can exist without a key.
|
||||
+ */
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.4")
|
||||
+ @Override
|
||||
@@ -229,8 +229,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ // Paper start - Registry#getKey
|
||||
+ /**
|
||||
+ * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#TRIM_PATTERN}. TrimPatterns
|
||||
+ * can exist without a key.
|
||||
+ * @deprecated use {@link Registry#getKey(Keyed)}, {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)},
|
||||
+ * and {@link io.papermc.paper.registry.RegistryKey#TRIM_PATTERN}. TrimPatterns can exist without a key.
|
||||
+ */
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.4")
|
||||
+ @Override
|
||||
|
||||
@@ -19,8 +19,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- @ApiStatus.Internal
|
||||
+ @ApiStatus.Experimental // Paper - already required for registry builders
|
||||
RegistryKey<ItemType> ITEM = create("item");
|
||||
|
||||
|
||||
/**
|
||||
* Built-in registry for cat variants.
|
||||
diff --git a/src/main/java/io/papermc/paper/registry/data/EnchantmentRegistryEntry.java b/src/main/java/io/papermc/paper/registry/data/EnchantmentRegistryEntry.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
|
||||
Reference in New Issue
Block a user