Item names not rendering properly in Forge 1.12.2 mod

Viewed 279

I am creating a forge mod for 1.12.2. I am using eclipse as my IDE, and the recomended Forge MDK. My items appear in the world just fine, and are even textured, but the names are not showing up the way they are defined in the .lang file. Here is the ModItems class

  import com.maligant.testmod.items.ItemBase;


import net.minecraft.item.*;
import java.util.ArrayList;
import java.util.List;




public class ModItems {
    
    public static final List<Item> ITEMS = new ArrayList <Item>();
    
    public static final Item COPPER_INGOT = new ItemBase("copper_ingot");
}

And the lang file

item.copper_ingot.name=Copper Ingot

This file is named en_US.lang


Summary:

The mod should display the unlocalized item copper_ingot as "Copper Ingot" in game, but instead displays it as "item..copper_ingot.name". I can provide any other code as needed. Any help is appreciated.

1 Answers

Alright, it turned out to be very simple. As of the time of this writing, all resource files for forge have to be lowercase, including the language file, despite what any documentation may tell you. So, it should be en_us.lang, not en_US.lang. You can verify this by looking at the pack.mcmeta file.

Related