I'm trying to create a config file, i've written this:
Main class
package SackCastellon.craftablehorsearmor.common;
import java.util.Iterator;
import java.util.List;
import SackCastellon.craftablehorsearmor.common.core.*;
import SackCastellon.craftablehorsearmor.common.item.*;
import SackCastellon.craftablehorsearmor.common.tabs.*;
import SackCastellon.craftablehorsearmor.lib.*;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.*;
import net.minecraft.item.Item;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.*;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.network.*;
import cpw.mods.fml.common.registry.*;
@Mod(modid="SKC-CraftableHorseArmor", name="Craftable Horse Armor", version="1.0.2.1")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class CraftableHorseArmor {
public static String texturePath = "craftablehorsearmor:";
@Instance("CraftableHorseArmor")
public static CraftableHorseArmor instance;
public static final CreativeTabs tabCraftableHorseArmor = new CreativeTabCraftableHorseArmor(CreativeTabs.getNextID(), "CraftableHorseArmor");
public static Item Knot = new ItemKnot(ConfigHandler.KnotID);
@SidedProxy(clientSide="SackCastellon.craftablehorsearmor.client.core.ClientProxy", serverSide="SackCastellon.craftablehorsearmor.common.core.CommonProxy")
public static CommonProxy proxy;
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
ConfigHandler.init(event);
}
@EventHandler
public void load(FMLInitializationEvent event) {
proxy.registerRenderers();
LanguageRegistry.addName(Knot, Names.Item_Knot_name);
}
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
}
}
ConfigHandler class
package SackCastellon.craftablehorsearmor.lib;
import java.io.File;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import SackCastellon.craftablehorsearmor.common.item.ItemKnot;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.Property;
public class ConfigHandler {
public static int KnotID;
public static Configuration config;
public static void init(FMLPreInitializationEvent event) {
config = new Configuration(event.getSuggestedConfigurationFile());
config.load();
KnotID = config.getItem("Knot ID", 10001).getInt();
config.save();
}
}
But when i run minecraft (on eclipse) the console shows this:
2013-07-31 10:57:24 [iNFO] [sTDOUT] CONFLICT @ 0 item slot already occupied by net.minecraft.item.ItemSpade@2afda72a while adding SackCastellon.craftablehorsearmor.common.item.ItemKnot@72e9cc72
2013-07-31 10:57:24 [iNFO] [fml.ItemTracker] The mod SKC-CraftableHorseArmor is overwriting existing item at 256 (net.minecraft.item.ItemSpade from Minecraft) with SackCastellon.craftablehorsearmor.common.item.ItemKnot
And the item has the ID #256 which corresponds to the iron shovel as you can see here: