Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Changing Item or Block ID seems to remove them from the game.


Recommended Posts

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();
	}
}

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.