Custom slag lang key not working properly
brachy84 opened this issue ยท 4 comments
Issue Description
- I can't get lang keys to work. In Custom Slag file:
{
"registryName" : "brown_limonite",
"langKey" : "material.brown_limonite",
"color" : "944306"
},
So I thought I use Custom Ore File which just crashes and I can't find the issue:
"oreBrownLimonite": {
"slagColor": "944306",
"langKey": [
"material.brown_limonite"
],
"output": [
"minecraft:iron_nugget"
]
},
What Happens
-
Custom Slag: The Slag does only get named Slag
-
Custom Ore crashes the game
What You Expect to Happen
I expected it to work?
Script
Crash Log
Crash from Custom ore
https://pastebin.com/zKRhG8LW
Affected Versions
Do not use latest
; please supply accurate version numbers.
- Minecraft: 1.12.2
- Forge: 2847
- Pyrotech: 1.4.34
- Athenaeum: 1.19.1
-
I don't know why the custom slag lang key is not working. I will have to look at it.
-
The custom ore is crashing because it expects the lang key to have a mod id prefix such as
minecraft:
. Compare it to the file generated by Pyrotech:
"oredict": {
"oreGold": {
"slagColor": "fcee4b",
"langKey": [
"minecraft:tile.oreGold"
],
"output": [
"minecraft:gold_nugget:0"
]
},
"oreIron": {
"slagColor": "d8af93",
"langKey": [
"minecraft:tile.oreIron"
],
"output": [
"minecraft:iron_nugget:0"
]
}
}
The mod id prefix has actually been made optional in the latest 1.5.0
release candidate which you can find on the Discord, discord.codetaylor.com, or you can wait a few days and it will be up on CurseForge.
Ok gregtech:material.brown_limonite
does not crash, but it still does not get named correctly
This is because Pyrotech makes the assumption that lang keys will follow the naming convention set by Vanilla. The convention is that lang keys will have .name
appended in the lang file yet the item will return the unlocalized name without the .name
suffix.
GregTech does not follow this convention for material.brown_limonite
as well as others.
This assumption has been discarded and the lang key handling has been changed to work with lang keys that do not follow convention.
Confirmed both slag file and ore file are working as expected in 1.12.2-1.5.0-RC8
using the two json objects given in the initial report.