I'm toying around with the config file idea, looked after cpw's IronChests source to figure it out. I noticed though that if I change the blockID or Item id from the file and go into a world where I had already, whatever item or block's ID I had changed would disappear.
Perhaps something is wrong in the code? Thanks!
Config loading code:
@PreInit
public void preLoad(FMLPreInitializationEvent event)
{
Configuration config = new Configuration(event.getSuggestedConfigurationFile());
try
{
config.load();
BnmStoneID = config.getOrCreateBlockIdProperty("Nightmare Stone Block", 145).getInt(145);
InmAxe = config.getOrCreateIntProperty("Shifting Axe", Props.config.CATEGORY_ITEM, 6200).getInt(6200);
InmPickAxe = config.getOrCreateIntProperty("Shifting Pick Axe", Props.config.CATEGORY_ITEM, 6201).getInt(6201);
InmSword = config.getOrCreateIntProperty("Shifting Sword", Props.config.CATEGORY_ITEM, 6202).getInt(6202);
InmMulti1 = config.getOrCreateIntProperty("Shifting Residue", Props.config.CATEGORY_ITEM, 6203).getInt(6203);
InmOrb = config.getOrCreateIntProperty("Shifting Orb", Props.config.CATEGORY_ITEM, 6204).getInt(6204);
InmSphere = config.getOrCreateIntProperty("Shifting Sphere", Props.config.CATEGORY_ITEM, 6205).getInt(6205);
} catch(Exception e)
{
FMLLog.log(Level.SEVERE, e, "Alptraum: Difficulties loading config.");
} finally
{
config.save();
}
}