I am attempting to make an item using the latest version of Forge. For some reason, the setTextureName method gives me an error that says:
The method setTextureName(String) is undefined for the type ItemKey
I have been trying to fix this for a while, and notice that when I remove the quotation marks from the colon the error for setTextureName disappears, but I get an error on the colon that says:
Syntax error on token ":", delete this token
an error on the + sign that says
The operator + is undefined for the argument type(s) String
and finally an error on "key" that says
The method setTextureName(String) is undefined for the type ItemKey
This is my first time trying to make an item, so help would be greatly appreciated.
EDIT: I just figured out that if I change MODID to modid in the setTextureName method I stop getting an error message for setTextureName but instead get an error for modid saying that
modid cannot be resolved or is not a field
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);
}
}