Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.