bunch more general fixes

This commit is contained in:
Jake Potrebic 2024-10-31 20:35:06 -07:00
parent 1de01302d4
commit 16d7d73bd5
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
13 changed files with 504 additions and 40 deletions

View file

@ -85,10 +85,10 @@ index 0000000000000000000000000000000000000000..2512dba27edfdccbc4430815b6cba048
+}
diff --git a/src/main/java/io/papermc/paper/registry/RegistryKey.java b/src/main/java/io/papermc/paper/registry/RegistryKey.java
new file mode 100644
index 0000000000000000000000000000000000000000..8410d7213370f01cbedbf7fac29bac96f150c49a
index 0000000000000000000000000000000000000000..fdef87eec3765523b00c987d4c1ccc289882e95d
--- /dev/null
+++ b/src/main/java/io/papermc/paper/registry/RegistryKey.java
@@ -0,0 +1,179 @@
@@ -0,0 +1,188 @@
+package io.papermc.paper.registry;
+
+import net.kyori.adventure.key.Keyed;
@ -204,6 +204,17 @@ index 0000000000000000000000000000000000000000..8410d7213370f01cbedbf7fac29bac96
+ * @see io.papermc.paper.registry.keys.MenuTypeKeys
+ */
+ RegistryKey<MenuType> MENU = create("menu");
+ /**
+ * Built-in registry for attributes.
+ * @see io.papermc.paper.registry.keys.AttributeKeys
+ */
+ RegistryKey<Attribute> ATTRIBUTE = create("attribute");
+ /**
+ * Built-in registry for fluids.
+ * @see io.papermc.paper.registry.keys.FluidKeys
+ */
+ RegistryKey<Fluid> FLUID = create("fluid");
+
+
+
+ /* ********************** *
@ -260,13 +271,11 @@ index 0000000000000000000000000000000000000000..8410d7213370f01cbedbf7fac29bac96
+ * API-only Registries *
+ * ******************* */
+ RegistryKey<Art> PAINTING_VARIANT = create("painting_variant");
+ RegistryKey<Attribute> ATTRIBUTE = create("attribute");
+ 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<MemoryKey<?>> MEMORY_MODULE_TYPE = create("memory_module_type");
+ RegistryKey<Fluid> FLUID = create("fluid");
+}
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