Posted October 28, 201212 yr Hey guys im new to modding and im trying out the meta data ive got the blocks to show up in game but the names are blank i have been using the command LanguageRegistry.instance().addStringLocalization("tile.glass.first.name", "first"); the ItemBlockGlass looks like this: package TheCivilizationMod; import net.minecraft.src.Block; import net.minecraft.src.ItemBlock; import net.minecraft.src.ItemStack; public class ItemBlockOres extends ItemBlock { public ItemBlockOres(int par1, Block block) { super(par1); setHasSubtypes(true); } public String getItemNameIS(ItemStack itemstack) { String name = ""; switch(itemstack.getItemDamage()) { case 0: { name = "ore"; break; } case 1: { name = "netherore"; break; } default: name = "ore"; } return getItemName() + "." + name; } public int getMetadata(int par1) { return par1; } } and the glass looks like this: package TheCivilizationMod; import java.util.List; import java.util.Random; import cpw.mods.fml.common.Side; import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.src.Block; import net.minecraft.src.CreativeTabs; import net.minecraft.src.Item; import net.minecraft.src.ItemStack; import net.minecraft.src.Material; public class glass extends Block { public glass(int par1, int par2) { super(par1, par2, Material.rock); this.setCreativeTab(CreativeTabs.tabBlock); this.setRequiresSelfNotify(); } public int getBlockTextureFromSideAndMetadata(int par1, int par2) { switch (par2) { case 0: return 0; case 1: return 1; default: return 0; } } public String getTextureFile() { return "/TutTextures.png"; } @SideOnly(Side.CLIENT) public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) { for (int var4 = 0; var4 < 2; ++var4) { par3List.add(new ItemStack(par1, 1, var4)); } } } and the item list thing looks like this: Item.itemsList[oreblockId] = new ItemBlockGlass(onewayglassId-256, onewayglass).setItemName("glass"); My youtube channel for forge tutorials: http://www.youtube.com/user/TheGrovesyProject101?feature=mhee if i helped please press thank you
October 29, 201212 yr Author no it still doesnt work My youtube channel for forge tutorials: http://www.youtube.com/user/TheGrovesyProject101?feature=mhee if i helped please press thank you
October 29, 201212 yr try using LanguageRegistry.instance().addStringLocalization("tile.first", "first")
November 4, 201212 yr Author sorry i ve not replied but no its still not working i am appreciating your help though if you have any more ideas please do tell me My youtube channel for forge tutorials: http://www.youtube.com/user/TheGrovesyProject101?feature=mhee if i helped please press thank you
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.