Posted December 29, 201213 yr My config file is being created and all properly but the Item ids are not being used and block ids are. Moonrock.cfg # Configuration file # Generated on 29/12/12 14:49 #################### # block #################### block { I:"MoonRock ID"=1000 } #################### # item #################### item { I:"MoonAxe ID"=4005 I:"MoonBoots ID"=4003 I:"MoonChest ID"=4001 I:"MoonHelm ID"=4000 I:"MoonHoe ID"=4007 I:"MoonLegs ID"=4002 I:"MoonPickaxe ID"=4004 I:"MoonShovel ID"=4008 I:"MoonSword ID"=4006 } pre init public void Preload(FMLPreInitializationEvent event){ Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); MoonRockID = config.getBlock("MoonRock ID", 1000).getInt(); MoonHelmetID = config.getItem("MoonHelm ID", 4000).getInt(); MoonChestID = config.getItem("MoonChest ID", 4001).getInt(); MoonLeggingsID = config.getItem("MoonLegs ID", 4002).getInt(); MoonBootsID = config.getItem("MoonBoots ID", 4003).getInt(); MoonPickaxeID = config.getItem("MoonPickaxe ID", 4004).getInt(); MoonAxeID = config.getItem("MoonAxe ID", 4005).getInt(); MoonSwordID = config.getItem("MoonSword ID", 4006).getInt(); MoonHoeID = config.getItem("MoonHoe ID", 4007).getInt(); MoonShovelID = config.getItem("MoonShovel ID", 4008).getInt(); config.save(); } ModBlocks(only part) Moonrock1 = (new MoonBlock(Moonrock.MoonRockID, 1, Material.rock)).setHardness(3.0F).setLightOpacity(3).setStepSound(Block.soundGlassFootstep).setBlockName("Moonrock").setCreativeTab(CreativeTabs.tabBlock); ModItems(only part) //Armour MoonHelmet = new MoonArmor(Moonrock.MoonHelmetID, MOON, 3, 0).setIconCoord(0,0).setItemName("moonhelm") ; MoonChest = new MoonArmor(Moonrock.MoonChestID, MOON, 3, 1).setIconCoord(1,0).setItemName("moonchest"); MoonLeggings = new MoonArmor(Moonrock.MoonLeggingsID, MOON, 3, 2).setIconCoord(2,0).setItemName("moonleg"); MoonBoots = new MoonArmor(Moonrock.MoonBootsID, MOON, 3, 3).setIconCoord(3,0).setItemName("moonboots"); //tools MoonPickaxe = new MoonPickaxe(Moonrock.MoonPickaxeID, MOONT).setIconCoord(0, 1).setItemName("MoonPick"); MoonAxe = new MoonAxe(Moonrock.MoonAxeID, MOONT).setIconCoord(0, 2).setItemName("Moonaxe"); MoonSword = new MoonSword(Moonrock.MoonSwordID, MOONT).setIconCoord(0, 3).setItemName("Moonsword"); MoonHoe = new MoonHoe(Moonrock.MoonHoeID, MOONT).setIconCoord(0, 4).setItemName("Moonhoe"); MoonShovel = new MoonShovel(Moonrock.MoonShovelID, MOONT).setIconCoord(0, 5).setItemName("Moonshovel"); Thanks, Mrmishboy
December 29, 201213 yr Author Sorry guys I was being a noob. I just looked into the Item class and it shows that it adds 256
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.