Posted June 10, 201411 yr In the new update I'm making a simple mod, and right now the problem is I cant get the language file to work. Heres how I have it saved: src/main/resources/assets/colormod/lang/en_US.lang here is my lang file: item.greenPickaxe.name =Green Pickaxe and here is my mod file: package com.mjj.colormod; import com.mjj.colormod.handler.ItemHandler; import com.mjj.colormod.items.GreenPickaxe; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraftforge.common.util.EnumHelper; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = ColorMod.modid , version = ColorMod.version) public class ColorMod { public static final String modid = "colormod"; public static final String version = "1.7.2"; @EventHandler public void preInit(FMLPreInitializationEvent event) { //Item handler, handles all items ItemHandler.loadItems(); } } Heres my pickaxe code: package com.mjj.colormod.items; import com.mjj.colormod.ColorMod; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemPickaxe; public class GreenPickaxe extends ItemPickaxe { public GreenPickaxe(ToolMaterial material) { super(material); setUnlocalizedName("greenPickaxe"); setTextureName(ColorMod.modid + ":" + getUnlocalizedName().substring(5)); setCreativeTab(CreativeTabs.tabTools); } } And just in case you need it here is my ItemHandler: package com.mjj.colormod.handler; import com.mjj.colormod.items.GreenPickaxe; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraftforge.common.util.EnumHelper; public class ItemHandler { //Tools public static Item greenPickaxe; //Items //Armor //Materials static ToolMaterial greenMaterial = EnumHelper.addToolMaterial("greenMaterial", 2, 255, 6.0F, 2.0F, 15); public static void loadItems() { //Tools greenPickaxe = new GreenPickaxe(greenMaterial); GameRegistry.registerItem(greenPickaxe, "greenPickaxe"); //Items //Armor } } The problem is in game the weapon name is: item.greenPickaxe.name As far as I know I have everything correct, thats why im confused. If you need anymore of my code posted please respond and I will send it. Thanks ~vandy22
June 10, 201411 yr item.greenPickaxe.name =Green Pickaxe Have you tried item.greenPickaxe.name=Green Pickaxe (without the space before the equals). We all stuff up sometimes... But I seem to be at the bottom of that pot.
June 11, 201411 yr Thank you it worked . Such a dumb mistake Actually it is a dumb implementation -- it shouldn't be sensitive to final white space near the = assignment. Pretty much every person does this wrong the first time, and then again later when they forget. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
June 11, 201411 yr Yes, it is quite annoying. But then again... At any rate, it could be implemented a bit better, that is for sure. We all stuff up sometimes... But I seem to be at the bottom of that pot.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.