1

Name Not Working

314owen's Avatar 314owen9/30/13 7:10 pm
1 emeralds 177 3
10/1/2013 3:50 pm
314owen's Avatar 314owen
I am making a mod, and when i made my first item, the name was not showing up in game.

Code:
package yogscastmod;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod (modid= "yogscast mod", name = "Yogscast Mod", version= "1.0.1")
@NetworkMod (clientSideRequired=true, serverSideRequired=false)

public class yogscastmod {
//Items
public final static Item simonshovel = new simonshovel(3000).setCreativeTab(CreativeTabs.tabTools).setMaxStackSize(1).setTextureName("yogscastmod:shovel");





public void preInit(FMLPreInitializationEvent event)
{

//Names

LanguageRegistry.addName(simonshovel, "simonshovel");

}
}
Posted by 314owen's Avatar
314owen
Level 48 : Master Modder
241

Create an account or sign in to comment.

3

1
10/01/2013 3:50 pm
Level 48 : Master Modder
314owen
314owen's Avatar
getting no errors with jdf2's code, but it will not rename the item in-game
1
09/30/2013 7:21 pm
Level 25 : Expert Network
4377699683
4377699683's Avatar
Your code should be something like this:

package yogscastmod;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod (modid= "yogscast mod", name = "Yogscast Mod", version= "1.0.1")
@NetworkMod (clientSideRequired=true, serverSideRequired=false)

public class yogscastmod {
//Items
public final static Item simonshovel = new simonshovel(3000).setCreativeTab(CreativeTabs.tabTools).setMaxStackSize(1).setTextureName("yogscastmod:shovel");





public void preInit(FMLPreInitializationEvent event)
{

}
//Names
@EventHandler
public void load(FMLInitializationEvent event) {
LanguageRegistry.addName(simonshovel, "Simon Shovel");
}


}
1
09/30/2013 7:11 pm
Level 48 : Master Modder
314owen
314owen's Avatar
The name in game: item.null.name
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome