Skip to content

Commit

Permalink
RegistryParser - fix pulling from the lang file on custom entries (#7540
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ShaneBeee authored Feb 1, 2025
1 parent 16e1953 commit 757b5e7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,17 @@ private void refresh() {
String namespace = namespacedKey.getNamespace();
String key = namespacedKey.getKey();
String keyWithSpaces = key.replace("_", " ");
String languageKey = languageNode + "." + key;
String languageKey;

// Put the full namespaced key as a pattern
parseMap.put(namespacedKey.toString(), registryObject);

// If the object is a vanilla Minecraft object, we'll add the key with spaces as a pattern
if (namespace.equalsIgnoreCase(NamespacedKey.MINECRAFT)) {
parseMap.put(keyWithSpaces, registryObject);
languageKey = languageNode + "." + key;
} else {
languageKey = namespacedKey.toString();
}

String[] options = Language.getList(languageKey);
Expand Down

0 comments on commit 757b5e7

Please sign in to comment.