I'm new with modding and I wanted to create a Item. Now, this is my Item Class
ItemObsidianingot
package items;
import com.FlinnX.MoreMaterials.Reference;
import net.minecraft.item.Item;
public class ItemObsidianingot extends Item {
public ItemObsidianingot() {
setUnlocalizedName(Reference.MoreMaterialsItems.OBSIDIANINGOT.getUnlocalizedName());
setRegistryName(Reference.MoreMaterialsItems.OBSIDIANINGOT.getRegistryName());
}
}
And this is my References Class
package com.FlinnX.MoreMaterials;
public class Reference {
//Fundemental Mod Variables
public static final String MOD_ID = "fmm"; //ID of the Mod: FlinnxMOreMAterials
public static final String NAME = "More Materials Mod"; //The Name
public static final String VERSION = "0.1-alpha"; //The Version of the Mod
public static final String ACCEPTED_VERSIONS = "[1.11.2]"; //The Version it will be playable on
public static final String CLIENT_PROXY_CLASS = "com.FlinnX.MoreMaterials.proxy.ClientProxy"; //Client Proxy Location
public static final String SERVER_PROXY_CLASS = "com.FlinnX.MoreMaterials.proxy.ServerProxy"; //Server Proxy Location
public static enum MoreMaterialsItems {
OBSIDIANINGOT("obsidianingot", "ItemObsidianingot");
private String unlocalizedName;
private String registryName;
MoreMaterialsItems(String unlocalizedName, String registryName) {
this.unlocalizedName = unlocalizedName;
this.registryName = registryName;
}
}
}
This is my Error:
The method getRegistryName() is undefined for the type Reference.MoreMaterialsItems
The method getUnlocalizedName() is undefined for the type Reference.MoreMaterilasItems
I saw that another user had this error and someone suggested that he should rename the enum. I tried this out too but it didn't worked.