_bau5 Posted August 22, 2012 Posted August 22, 2012 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(); } } Quote
tobytse99 Posted August 22, 2012 Posted August 22, 2012 The block ID is stored in the save, so when you reload the world with iron chests being other ID, the chests in the world is not of a valid block ID, so it simply disappears. Quote
Recommended Posts
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.