Posted June 25, 201510 yr I am trying to make my first item, but for some reason the setTextureName method gives me an error that says "The method setTextureName(String) is undefined for the type ItemKey". But, when I do certain things to the code such as change "MODID" in the setTextureName method to "modid", the error for setTextureName disappears and I instead get an error for modid, (which makes sense). Also, if I remove the quotation marks from the colon in the setTextureName method, the error on setTextureName once again goes away, but I get errors on the colon, + sign, and "key". Since I am relatively new to modding I might be missing something obvious. package com.arti.artismod; import net.minecraft.item.Item; import net.minecraft.creativetab.CreativeTabs; public class ItemKey extends Item { private String name = "key"; public ItemKey() { setUnlocalizedName(ArtisMod.MODID + "_" + "key"); setTextureName(ArtisMod.MODID + ":" + "key"); setCreativeTab(CreativeTabs.tabMisc); } }
June 25, 201510 yr Author I agree, it seems to be a bug or something, but I took the code that I posted and copied it into the file and the error is still there.
June 25, 201510 yr Author Minecraft 1.8.7, and the latest recommended version of Forge, which is 11.14.3.1450.
June 26, 201510 yr Author I found this webpage and made the changes that were suggested, and I don't get any errors, but when I try to enter my minecraft world I get this error, "Forge Mod Loader detected missing blocks/items. There are 1 missing blocks and items in this save. If you continue the missing blocks/items will get removed. A world backup will be automatically created in your saves directory. Missing Blocks/Items: arti_artismod:Key" The webpage: http://www.wuppy29.com/minecraft/1-8-tutorial/updating-1-7-to-1-8-part-2-basic-items/#sthash.jYdavYL4.dpbs
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.