I am trying to build a mod and I have created 2 items. Steel ingots and Platinum Ingots. When I setup everything I launched and try it. First try was only the steel ingot. The name appeared correctly but, when I added the platinum ingot, the name of the 2 ingots just say "item.ultimategears.steel_ingot" and "item.ultimategears.platinum_ingot". Can anyone help me?[/p]
This is my main code:[/p]
[/pre]
package user.mod;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import user.mod.list.ItemList;
@Mod("ultimategears")
public class modIsGood {
public static modIsGood instance;
public static final String modid= "ultimategears";
private static final Logger logger = LogManager.getLogger(modid);
public modIsGood() {
instance = this;
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientRegistries);
MinecraftForge.EVENT_BUS.register(this);
}
private void setup(final FMLCommonSetupEvent event) {
logger.info("Setup method registered.");
}
private void clientRegistries(final FMLClientSetupEvent event) {
logger.info("clientRegistries method registered.");
}
@Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
public static class RegistryEvents {
@SubscribeEvent
public static void registries(final RegistryEvent.Register<Item> event) { //ITEM REGISTER
event.getRegistry().registerAll(ItemList.steel_ingot = new Item(new Item.Properties().group(ItemGroup.MISC)).setRegistryName(location("steel_ingot"))); //Steel Ingot
event.getRegistry().registerAll(ItemList.platinum_ingot = new Item(new Item.Properties().group(ItemGroup.MISC)).setRegistryName(location("platinum_ingot"))); //Platinum Ingot
logger.info("Items registered.");
}
private static ResourceLocation location(String name) {
return new ResourceLocation(modid, name);
}
}
}<code class="_34q3PgLsx9zIU5BiSOjFoM">
</code>
[/pre]
This is my Item List:[/p]
package user.mod.list;
import net.minecraft.item.Item;
public class ItemList {
public static Item steel_ingot;
public static Item platinum_ingot;
}
[/pre]
This is my en_us.json lang file:[/p]
{
"item.ultimategears.steel_ingot" : "Steel Ingot",
"item.ultimategears.platinum_ingot" : "Platinum Ingot",
}
[/p]
[/pre]
[/pre]
If anyone can help me, I would be very appreciated![/p]
This is my main code:[/p] [/pre]
[/pre]
This is my Item List:[/p]
[/pre]
This is my en_us.json lang file:[/p] {
"item.ultimategears.steel_ingot" : "Steel Ingot",
"item.ultimategears.platinum_ingot" : "Platinum Ingot",
}
[/p] [/pre]
[/pre]
If anyone can help me, I would be very appreciated![/p]
Lang file should end with .lang not .json
And
I'm pretty sure in your lang file should be something like this: