Fixup NamespacedKey handling

This commit is contained in:
Nassim Jahnke
2024-01-06 14:31:00 +01:00
parent 21837e419b
commit 898bf90054
9 changed files with 26 additions and 6 deletions

View File

@@ -33,6 +33,7 @@ public class CraftAttribute implements Attribute, Handleable<net.minecraft.world
string = FieldRename.convertAttributeName(ApiVersion.CURRENT, string);
string = string.toLowerCase(Locale.ROOT);
NamespacedKey key = NamespacedKey.fromString(string);
if (key == null) return null; // Paper - Fixup NamespacedKey handling
// Now also convert from when keys where saved
return CraftRegistry.get(Registry.ATTRIBUTE, key, ApiVersion.CURRENT);