diff --git a/patches/api/Code-Generation.patch b/patches/api/Code-Generation.patch index c359cb00c2..5217548235 100644 --- a/patches/api/Code-Generation.patch +++ b/patches/api/Code-Generation.patch @@ -337,7 +337,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ +@ApiStatus.Experimental +@NullMarked -+public sealed interface TypedKey<T> extends Keyed permits TypedKeyImpl { ++public sealed interface TypedKey<T> extends Key permits TypedKeyImpl { + + /** + * Gets the key for the value in the registry. @@ -381,6 +381,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + +@NullMarked +record TypedKeyImpl<T>(Key key, RegistryKey<T> registryKey) implements TypedKey<T> { ++ // Wrap key methods to make this easier to use ++ @Override ++ public String namespace() { ++ return this.key.namespace(); ++ } ++ ++ @Override ++ public String value() { ++ return this.key.value(); ++ } ++ ++ @Override ++ public String asString() { ++ return this.key.asString(); ++ } +} diff --git a/src/main/java/org/bukkit/MinecraftExperimental.java b/src/main/java/org/bukkit/MinecraftExperimental.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644