Jump to content

Recommended Posts

Posted

Hello, so im working on a mod of mine adding support for a few other mods, i added support for tech reborn's ores (20 of them) but whenever the mod is added my game loads just fine, but when i load a world it errors other mods aswell and says:

19:56:13] [server thread/ERROR] [reborncore]: Skipping event FMLServerStoppedEvent and marking errored mod reborncore since required dependency Forge has errored

[19:56:13] [server thread/ERROR] [techreborn]: Skipping event FMLServerStoppedEvent and marking errored mod techreborn since required dependency Forge has errored

it was working fine before that, and when ic2 is installed the game just crashes because of the error

 

ModBlocks:

package abused_master.SuperOres;

import abused_master.Config.Config;
import abused_master.Ores.ModSupport;
import abused_master.Ores.blockSuperCoal;
import abused_master.Ores.blockSuperDiamond;
import abused_master.Ores.blockSuperGold;
import abused_master.Ores.blockSuperIron;
import abused_master.Ores.blockSuperLapis;
import abused_master.Ores.blockSuperRedstone;
import abused_master.itemOres.ItemBlockSuperOre;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;

public class ModBlocks { 


public static Block blockSuperCoal = new blockSuperCoal("blockSuperCoal");
public static Block blockSuperIron = new blockSuperIron("blockSuperIron");
public static Block blockSuperGold = new blockSuperGold("blockSuperGold");
public static Block blockSuperDiamond = new blockSuperDiamond("blockSuperDiamond");
public static Block blockSuperRedstone = new blockSuperRedstone("blockSuperRedstone");
public static Block blockSuperLapis = new blockSuperLapis("blockSuperLapis");

public static Block SuperAluminumOre;
public static Block SuperCopperOre;
public static Block SuperNickelOre;
public static Block SuperSteelOre;
public static Block SuperLeadOre;
public static Block SuperSilverOre;
public static Block SuperTinOre;
public static Block SuperUraniumOre;
public static Block SuperOsmiumOre;


public static Block ZincOre;
public static Block MercuryOre;
public static Block PlatinumOre;
public static Block CadmiumOre;
public static Block ChromiumOre;
public static Block MaganeseOre;
public static Block NichromeOre;
public static Block PlutoniumOre;
public static Block RutileOre;
public static Block TantalumOre;
public static Block TitaniumOre;
public static Block ZirconiumOre;
public static Block RubyOre;
public static Block SapphireOre;
public static Block PyriteOre;
public static Block CinnabarOre;
public static Block SphaleriteOre;
public static Block SodaliteOre;
public static Block PeridotOre;
public static Block TungstenOre;
public static Block AnglesiteOre;
public static Block BenitoiteOre;
public static Block YelloriteOre;
public static Block compressedStone;

public static void init()
{

	//TO-DO, change the registry of the vanilla resources
	if (Config.SuperCoalOre) {
		GameRegistry.register(blockSuperCoal.setRegistryName("blockSuperCoal"));
		GameRegistry.register(new ItemBlockSuperOre(blockSuperCoal).setRegistryName(blockSuperCoal.getRegistryName()));
	}

	if (Config.SuperIronOre) {
		GameRegistry.register(blockSuperIron.setRegistryName("blockSuperIron"));
		GameRegistry.register(new ItemBlockSuperOre(blockSuperIron).setRegistryName(blockSuperIron.getRegistryName()));
	}

	if (Config.SuperGoldOre) {
		GameRegistry.register(blockSuperGold.setRegistryName("blockSuperGold"));
		GameRegistry.register(new ItemBlockSuperOre(blockSuperGold).setRegistryName(blockSuperGold.getRegistryName()));
	}

	if (Config.SuperDiamondOre) {
		GameRegistry.register(blockSuperDiamond.setRegistryName("blockSuperDiamond"));
		GameRegistry.register(new ItemBlockSuperOre(blockSuperDiamond).setRegistryName(blockSuperDiamond.getRegistryName()));
	}

	if (Config.SuperRedstoneOre) {
		GameRegistry.register(blockSuperRedstone.setRegistryName("blockSuperRedstone"));
		GameRegistry.register(new ItemBlockSuperOre(blockSuperRedstone).setRegistryName(blockSuperRedstone.getRegistryName()));
	}

	if (Config.SuperLapisOre) {
		GameRegistry.register(blockSuperLapis.setRegistryName("blockSuperLapis"));
		GameRegistry.register(new ItemBlockSuperOre(blockSuperLapis).setRegistryName(blockSuperLapis.getRegistryName()));
	}


	/**
	 * Mod Support
	 */

	if(Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("IC2")) {
		if (Config.SuperLeadOre) {
		SuperLeadOre = regOreBlock("LeadOre", 2.5F, 2);
		}

		if (Config.SuperSilverOre) {
			SuperSilverOre = regOreBlock("SilverOre", 2.5F, 3);
		}

		if (Config.SuperSteelOre) {
			SuperSteelOre = regOreBlock("SteelOre", 2.5F, 2);
		}

		if (Config.SuperUraniumOre) {
			SuperUraniumOre = regOreBlock("UraniumOre", 2.0F, 3);
	}
	  }
	/*
	if (Loader.isModLoaded("Mekanism")) {
		if (Config.SuperOsmiumOre) {
			SuperOsmiumOre = regOreBlock("OsmiumOre", 2.0F, 2);
		}
	}
	*/
	if (Loader.isModLoaded("immersiveengineering")) {
		if (Config.SuperNickelOre) {
			SuperNickelOre = regOreBlock("NickelOre", 2.0F, 1);
		}

		if (Config.SuperAluminumOre) {
			SuperAluminumOre = regOreBlock("AluminumOre", 2.0F, 1);
		}
	}


	if(Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("IC2") || Loader.isModLoaded("forestry") || Loader.isModLoaded("Mekanism")) {

		if(Config.SuperCopperOre) {
			SuperCopperOre = regOreBlock("CopperOre", 2.0F, 1);
		}

		if (Config.SuperTinOre) {
			SuperTinOre = regOreBlock("TinOre", 1.5F, 1);
		}
	}

	if (Loader.isModLoaded("bigreactors")) {
		if(Config.YelloriteOre) {
			YelloriteOre = regOreBlock("YelloriteOre", 1.5F, 1);
		}

		if(Config.BenitoiteOre) {
			BenitoiteOre = regOreBlock("BenitoiteOre", 1.5F, 2);
		}

		if(Config.AnglesiteOre) {
			AnglesiteOre = regOreBlock("AnglesiteOre", 1.5F, 2);

		}
	}


	if (Loader.isModLoaded("techreborn")) {
		if(Config.RubyOre) {
			RubyOre = regOreBlock("RubyOre", 1.5F, 2);
		}
		if(Config.SapphireOre) {
			SapphireOre = regOreBlock("SapphireOre", 1.5F, 2);
		}

		if(Config.CinnabarOre) {
			CinnabarOre = regOreBlock("CinnabarOre", 1.5F, 2);
		}

		if(Config.PyriteOre) {
			PyriteOre = regOreBlock("PyriteOre", 1.5F, 2);
		}

		if(Config.SphaleriteOre) {
			SphaleriteOre = regOreBlock("SphaleriteOre", 1.5F, 2);
		}

		if(Config.SodaliteOre) {
			SodaliteOre = regOreBlock("SodaliteOre", 1.5F, 2);
		}

		if(Config.PeridotOre) {
			PeridotOre = regOreBlock("PeridotOre", 1.5F, 2);
		}

		if(Config.TungstenOre) {
			TungstenOre = regOreBlock("TungstenOre", 1.5F, 2);
		}

		if(Config.MercuryOre) {
			MercuryOre = regOreBlock("MercuryOre", 1.5F, 2);
		}			
		if(Config.PlatinumOre) {
			PlatinumOre = regOreBlock("PlatinumOre", 1.5F, 2);
		}			
		if(Config.CadmiumOre) {
			CadmiumOre = regOreBlock("CadmiumOre", 1.5F, 2);
		}			
		if(Config.ChromiumOre) {
			ChromiumOre = regOreBlock("ChromiumOre", 1.5F, 2);
		}			
		if(Config.MaganeseOre) {
			MaganeseOre = regOreBlock("MaganeseOre", 1.5F, 2);
		}			
		if(Config.NichromeOre) {
			NichromeOre = regOreBlock("NichromeOre", 1.5F, 2);	
		}	
		if(Config.PlutoniumOre) {
			PlutoniumOre = regOreBlock("PlutoniumOre", 1.5F, 2);
		}			
		if(Config.RutileOre) {
			RutileOre = regOreBlock("RutileOre", 1.5F, 2);
		}			
		if(Config.TantalumOre) {
			TantalumOre = regOreBlock("TantalumOre", 1.5F, 2);
		}			
		if(Config.TitaniumOre) {
			TitaniumOre = regOreBlock("TitaniumOre", 1.5F, 2);
		}			
		if(Config.ZirconiumOre) {
			ZirconiumOre = regOreBlock("ZirconiumOre", 1.5F, 2);
		}
		if(Config.ZincOre) {
			ZincOre = regOreBlock("ZincOre", 1.5F, 2);
		}
	}
}

private static Block regOreBlock(String regName, float hardness, int level) {     
	final Block oreBlock = new ModSupport(regName, hardness, level);     
	final ItemBlock itemBlock = new ItemBlock(oreBlock);     
	return regBlock(regName, itemBlock, oreBlock);
	}

private static Block regBlock(String regName, ItemBlock itemBlock, Block block) {     
	block.setRegistryName(regName);     
	GameRegistry.register(block);
	itemBlock.setRegistryName(regName);     
	GameRegistry.register(itemBlock);    
	return block;
	}
}


 

Block Render Registry:

package abused_master.SuperOres;

import abused_master.Config.Config;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.oredict.OreDictionary;

public class BlockRenderRegister {


public static void registerBlockRenderer() {

	if(Config.SuperCoalOre) {
	reg(ModBlocks.blockSuperCoal);
	}

	if (Config.SuperDiamondOre) {
	reg(ModBlocks.blockSuperDiamond);
	}

	if (Config.SuperGoldOre) {
	reg(ModBlocks.blockSuperGold);
	}

	if (Config.SuperIronOre) {
	reg(ModBlocks.blockSuperIron);
	}

	if (Config.SuperLapisOre) {
	reg(ModBlocks.blockSuperLapis);
	}

	if (Config.SuperRedstoneOre) {
	reg(ModBlocks.blockSuperRedstone);
	}

	//Mod Support

		//if (Loader.isModLoaded("Mekanism")) {
			//if (Config.SuperOsmiumOre) {
				//reg(ModBlocks.SuperOsmiumOre);
			//}
		//}

		if (Loader.isModLoaded("immersiveengineering")) {
			if (Config.SuperNickelOre) {
				reg(ModBlocks.SuperNickelOre);
			}

			if (Config.SuperAluminumOre) {
				reg(ModBlocks.SuperAluminumOre);
			}
		}


		if(Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("IC2") || Loader.isModLoaded("forestry") || Loader.isModLoaded("Mekanism")) {

			if(Config.SuperCopperOre) {
				reg(ModBlocks.SuperCopperOre);
			}

			if (Config.SuperTinOre) {
				reg(ModBlocks.SuperTinOre);
			}
		}

		if(Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("IC2")) {
			if (Config.SuperLeadOre) {
				reg(ModBlocks.SuperLeadOre);
			}

			if (Config.SuperSilverOre) {
				reg(ModBlocks.SuperSilverOre);
			}

			if (Config.SuperSteelOre) {
				reg(ModBlocks.SuperSteelOre);
			}

			if (Config.SuperUraniumOre) {
				reg(ModBlocks.SuperUraniumOre);
		}
		  }


		if (Loader.isModLoaded("bigreactors")) {
			if(Config.YelloriteOre) {
				reg(ModBlocks.YelloriteOre);
			}

			if(Config.BenitoiteOre) {
				reg(ModBlocks.BenitoiteOre);
			}

			if(Config.AnglesiteOre) {
				reg(ModBlocks.AnglesiteOre);

			}
		}

		if (Loader.isModLoaded("techreborn")) {
			if(Config.RubyOre) {
				reg(ModBlocks.RubyOre);
			}
			if(Config.SapphireOre) {
				reg(ModBlocks.SapphireOre);
			}

			if(Config.CinnabarOre) {
				reg(ModBlocks.CinnabarOre);
			}

			if(Config.PyriteOre) {
				reg(ModBlocks.PyriteOre);
			}

			if(Config.SphaleriteOre) {
				reg(ModBlocks.SphaleriteOre);
			}

			if(Config.SodaliteOre) {
				reg(ModBlocks.SodaliteOre);
			}

			if(Config.PeridotOre) {
				reg(ModBlocks.PeridotOre);
			}

			if(Config.TungstenOre) {
				reg(ModBlocks.TungstenOre);
			}

			if(Config.ZincOre) {
				reg(ModBlocks.ZincOre);
			}
			if(Config.MercuryOre) {
				reg(ModBlocks.MercuryOre);
			}
			if(Config.CadmiumOre) {
				reg(ModBlocks.CadmiumOre);
			}
			if(Config.ChromiumOre) {
				reg(ModBlocks.ChromiumOre);
			}
			if(Config.NichromeOre) {
				reg(ModBlocks.NichromeOre);
			}
			if(Config.PlutoniumOre) {
				reg(ModBlocks.PlutoniumOre);
			}
			if(Config.RutileOre) {
				reg(ModBlocks.RutileOre);
			}
			if(Config.ZirconiumOre) {
				reg(ModBlocks.ZirconiumOre);
			}

			if(Config.PlatinumOre) {
				reg(ModBlocks.PlatinumOre);
			}

			if(Config.PlatinumOre) {
				reg(ModBlocks.PlatinumOre);
			}
			if(Config.TantalumOre) {
				reg(ModBlocks.TantalumOre);
			}
			if(Config.TitaniumOre) {
				reg(ModBlocks.TitaniumOre);
			}
		}

	}

  public static void reg(Block block) {
	        Item item = Item.getItemFromBlock(block);

	        Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
	             .register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));

   }
}

ModCrafting:

package abused_master.SuperOres;

import java.util.List;

import abused_master.Config.Config;
import net.minecraft.block.Block;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;

public class ModCrafting {

public static void initCrafting() {

	if (Config.SuperCoalOre) {
	GameRegistry.addSmelting(ModBlocks.blockSuperCoal, new ItemStack(Items.COAL, 12), 3.0F);
	}

	if (Config.SuperIronOre) {
		GameRegistry.addSmelting(ModBlocks.blockSuperIron, new ItemStack(Items.IRON_INGOT, 6), 3.0F);
	}

	if (Config.SuperGoldOre) {
		GameRegistry.addSmelting(ModBlocks.blockSuperGold, new ItemStack(Items.GOLD_INGOT, 6), 4.0F);
	}

	if (Config.SuperDiamondOre) {
		GameRegistry.addSmelting(ModBlocks.blockSuperDiamond, new ItemStack(Items.DIAMOND, 5), 5.0F);
	}

	if (Config.SuperLapisOre) {
		GameRegistry.addSmelting(ModBlocks.blockSuperLapis, new ItemStack(Items.DYE, 22, 4), 4.0F);
	}

	if (Config.SuperRedstoneOre) {
		GameRegistry.addSmelting(ModBlocks.blockSuperRedstone, new ItemStack(Items.REDSTONE, 18), 4.0F);
	}




	if(Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("IC2")) {
		if (Config.SuperLeadOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.SuperLeadOre), getOreDictItemWithMeta("ingotLead", 4), 4.0F);
		}

		if (Config.SuperSilverOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.SuperSilverOre), getOreDictItemWithMeta("ingotSilver", 4), 4.0F);

		}

		if (Config.SuperSteelOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.SuperSteelOre), getOreDictItemWithMeta("ingotSteel", 3), 4.0F);

		}

		if (Config.SuperUraniumOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.SuperUraniumOre), getOreDictItemWithMeta("oreUranium", 3), 4.0F);

	  }
	  }
	/**
	if (Loader.isModLoaded("Mekanism")) {
		if (Config.SuperOsmiumOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.SuperOsmiumOre), getOreDictItemWithMeta("ingotOsmium", 4), 4.0F);
		}
	}
	*/
	if (Loader.isModLoaded("immersiveengineering")) {
		if (Config.SuperNickelOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.SuperNickelOre), getOreDictItemWithMeta("ingotNickel", 3), 4.0F);

		}

		if (Config.SuperAluminumOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.SuperAluminumOre), getOreDictItemWithMeta("ingotAluminum", 4), 4.0F);

		}
	}


	if(Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("IC2") || Loader.isModLoaded("forestry") || Loader.isModLoaded("Mekanism")) {

		if(Config.SuperCopperOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.SuperCopperOre), getOreDictItemWithMeta("ingotCopper", 4), 4.0F);

		}

		if (Config.SuperTinOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.SuperTinOre), getOreDictItemWithMeta("ingotTin", 6), 4.0F);

		}
	}
	/*
	if (Loader.isModLoaded("bigreactors")) {
		if(Config.YelloriteOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.YelloriteOre), getOreDictItemWithMeta("ingotYellorium", 3), 2.0F);
		}

		if(Config.BenitoiteOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.BenitoiteOre), getOreDictItemWithMeta("oreBenitoite", 2), 2.0F);
		}

		if(Config.AnglesiteOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.AnglesiteOre), getOreDictItemWithMeta("oreAnglesite", 2), 2.0F);

		}
	}
	*/

	if (Loader.isModLoaded("techreborn")) {

		if(Config.RubyOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.RubyOre), getOreDictItemWithMeta("oreRuby", 2), 2.0F);
		}
		if(Config.SapphireOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.SapphireOre), getOreDictItemWithMeta("oreSapphire", 3), 2.0F);
		}

		if(Config.CinnabarOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.CinnabarOre), getOreDictItemWithMeta("oreCinnabar", 3), 2.0F);
		}

		if(Config.PyriteOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.PyriteOre), getOreDictItemWithMeta("orePyrite", 2), 2.0F);
		}

		if(Config.SphaleriteOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.SphaleriteOre), getOreDictItemWithMeta("oreSphalerite", 2), 2.0F);
		}

		if(Config.SodaliteOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.SodaliteOre), getOreDictItemWithMeta("oreSodalite", 4), 2.0F);
		}

		if(Config.PeridotOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.PeridotOre), getOreDictItemWithMeta("orePeridot", 4), 2.0F);
		}

		if(Config.TungstenOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.TungstenOre), getOreDictItemWithMeta("oreTungsten", 4), 2.0F);
		}

		if(Config.ZincOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.ZincOre), getOreDictItemWithMeta("oreZinc", 4), 2.0F);

		}

		if(Config.MercuryOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.MercuryOre), getOreDictItemWithMeta("oreMercury", 4), 2.0F);

		}

		if(Config.PlatinumOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.PlatinumOre), getOreDictItemWithMeta("orePlatinum", 4), 2.0F);

		}

		if(Config.CadmiumOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.CadmiumOre), getOreDictItemWithMeta("oreCadmium", 4), 2.0F);

		}
		if(Config.ChromiumOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.ChromiumOre), getOreDictItemWithMeta("oreChromium", 4), 2.0F);

		}
		if(Config.MaganeseOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.MaganeseOre), getOreDictItemWithMeta("oreMaganese", 4), 2.0F);

		}
		if(Config.NichromeOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.NichromeOre), getOreDictItemWithMeta("oreNichrome", 4), 2.0F);

		}
		if(Config.PlutoniumOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.PlutoniumOre), getOreDictItemWithMeta("orePlutonium", 4), 2.0F);

		}
		if(Config.RutileOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.RutileOre), getOreDictItemWithMeta("oreRutile", 4), 2.0F);

		}
		if(Config.TantalumOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.TantalumOre), getOreDictItemWithMeta("oreTantalum", 4), 2.0F);

		}
		if(Config.TitaniumOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.TitaniumOre), getOreDictItemWithMeta("oreTitanium", 4), 2.0F);

		}
		if(Config.ZirconiumOre) {
			registerSmelting(Item.getItemFromBlock(ModBlocks.ZirconiumOre), getOreDictItemWithMeta("oreZirconium", 4), 2.0F);

		}
	}
}


public static ItemStack getOreDictItemWithMeta(String oreIdName, int num) {
	List<ItemStack> res = OreDictionary.getOres(oreIdName);
	if (res != null) {
		ItemStack[] res2 = res.toArray(new ItemStack[res.size()]);
		for (int i = 0; i < res.size(); ++i) {
			return new ItemStack(res2[i].getItem(), num, res2[i].getItemDamage());
		}
	}
	return null;
}

public static ItemStack OreDictName(String oreIdName, int num) {
	List<ItemStack> res = OreDictionary.getOres(oreIdName);
	return null;
}

private static void registerSmelting(Item item, ItemStack stack, float xp) {     
	FurnaceRecipes.instance().addSmelting(item, stack, xp);
	}
}

Config:

package abused_master.Config;

import java.io.File;

import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

public class Config {

private static final String MOD_ORES = "Super Ores";
private static final String MOD_SUPPORT = "Modded Ores";
private static final String MOD_GENERATION = "Mod Generation";

public static String configpath;
public static Configuration config;

public static boolean SuperDiamondOre;
public static boolean SuperGoldOre;
public static boolean SuperIronOre;
public static boolean SuperLapisOre;
public static boolean SuperRedstoneOre;
public static boolean SuperCoalOre;

public static int SuperDiamondRate;
public static int SuperGoldRate;
public static int SuperIronRate;
public static int SuperLapisRate;
public static int SuperCoalRate;
public static int SuperRedstoneRate;

//Mod Support:

public static boolean SuperCopperOre;
public static boolean SuperLeadOre;
public static boolean SuperTinOre;
public static boolean SuperSilverOre;
public static boolean SuperSteelOre;
public static boolean SuperUraniumOre;
public static boolean SuperOsmiumOre;
public static boolean SuperAluminumOre;
public static boolean SuperNickelOre;

public static int SuperCopperRate;
public static int SuperLeadRate;
public static int SuperTinRate;
public static int SuperSilverRate;
public static int SuperSteelRate;
public static int SuperUraniumRate;
public static int SuperOsmiumRate;
public static int SuperAluminumRate;
public static int SuperNickelRate;




public static boolean ZincOre;
public static boolean MercuryOre;
public static boolean PlatinumOre;
public static boolean CadmiumOre;
public static boolean ChromiumOre;
public static boolean MaganeseOre;
public static boolean NichromeOre;
public static boolean PlutoniumOre;
public static boolean RutileOre;
public static boolean TantalumOre;
public static boolean TitaniumOre;
public static boolean TungstenOre;
public static boolean ZirconiumOre;
public static boolean RubyOre;
public static boolean SapphireOre;
public static boolean PyriteOre;
public static boolean CinnabarOre;
public static boolean SphaleriteOre;
public static boolean SodaliteOre;
public static boolean PeridotOre;
public static boolean AnglesiteOre;
public static boolean BenitoiteOre;
public static boolean YelloriteOre;

public static int ZincRate;
public static int MercuryRate;
public static int PlatinumRate;
public static int CadmiumRate;
public static int ChromiumRate;
public static int MaganeseRate;
public static int NichromeRate;
public static int PlutoniumRate;
public static int RutileRate;
public static int TantalumRate;
public static int TitaniumRate;
public static int TungstenRate;
public static int ZirconiumRate;
public static int RubyRate;
public static int SapphireRate;
public static int PyriteRate;
public static int CinnabarRate;
public static int SphaleriteRate;
public static int SodaliteRate;
public static int PeridotRate;
//public static int AnglesiteRate;
//public static int BenitoiteRate;
//public static int YelloriteRate;




public static void init(FMLPreInitializationEvent event) {

	configpath = event.getModConfigurationDirectory().getAbsolutePath() + File.separator;
	config = new Configuration(new File(configpath + "SuperOres.cfg"));
	try {
		config.load();
		Config.configure(config);
	} catch (Exception e1) {
		System.out.println("Error Loading Config File: SuperOres.cfg");
	} finally {
		if (config.hasChanged()) {
			config.save();
		}
	}
}

public static void configure(Configuration config) {

	config.addCustomCategoryComment(MOD_ORES, "Super Ores Mod Ores");
	SuperDiamondOre = config.getBoolean("SuperDiamondOre", MOD_ORES, true, "Set to false if you want Super Diamond Ore Disabled");
	SuperGoldOre = config.getBoolean("SuperGoldOre", MOD_ORES, true, "Set to false if you want Super Gold Ore Disabled");
	SuperIronOre = config.getBoolean("SuperIronOre", MOD_ORES, true, "Set to false if you want Super Iron Ore Disabled");
	SuperRedstoneOre = config.getBoolean("SuperRedstoneOre", MOD_ORES, true, "Set to false if you want Super Redstone Ore Disabled");
	SuperCoalOre = config.getBoolean("SuperCoalOre", MOD_ORES, true, "Set to false if you want Super Coal Ore Disabled");
	SuperLapisOre = config.getBoolean("SuperLapisOre", MOD_ORES, true, "Set to false if you want Super Lapis Ore Disabled");

	//Mod Support

	if (Loader.isModLoaded("IC2") || Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("forestry") || Loader.isModLoaded("Mekanism")) {
	config.addCustomCategoryComment(MOD_SUPPORT, "Mod Support");
	}

	if(Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("IC2")) {
	SuperSilverOre = config.getBoolean("SuperSilverOre", MOD_SUPPORT, true, "Set to false if you want Super Silver Ore Disabled");
	SuperLeadOre = config.getBoolean("SuperLeadOre", MOD_SUPPORT, true, "Set to false if you want Super Lead Ore Disabled");
	SuperUraniumOre = config.getBoolean("SuperUraniumOre", MOD_SUPPORT, true, "Set to false if you want Super Uranium Ore Disabled");
	SuperSteelOre = config.getBoolean("SuperSteelOre", MOD_SUPPORT, true, "Set to false if you want Super Steel Ore Disabled");
	}

	if (Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("IC2") || Loader.isModLoaded("forestry") || Loader.isModLoaded("Mekanism")) {
	SuperCopperOre = config.getBoolean("SuperCopperOre", MOD_SUPPORT, true, "Set to false if you want Super Copper Ore Disabled");
	SuperTinOre = config.getBoolean("SuperTinOre", MOD_SUPPORT, true, "Set to false if you want Super Tin Ore Disabled");
	}

	//if (Loader.isModLoaded("Mekanism")) {
		//SuperOsmiumOre = config.getBoolean("SuperOsmiumOre", MOD_SUPPORT, true, "Set to false if you want Super Osmium Ore Disabled");
	//}

	if (Loader.isModLoaded("immersiveengineering")) {
		SuperAluminumOre = config.getBoolean("SuperAluminumOre", MOD_SUPPORT, true, "Set to false if you want Super Aluminum Ore Disabled");
		SuperNickelOre = config.getBoolean("SuperNickelOre", MOD_SUPPORT, true, "Set to false if you want Super Nickel Ore Disabled");
	}
        


	if (Loader.isModLoaded("bigreactors")) {
		AnglesiteOre = config.getBoolean("AnglesiteOre", MOD_SUPPORT, true, "Set to false to disable Super Anglesite Ore");
		BenitoiteOre = config.getBoolean("BenitoiteOre", MOD_SUPPORT, true, "Set to false to disable Super BenitoiteOre Ore");
		YelloriteOre = config.getBoolean("YelloriteOre", MOD_SUPPORT, true, "Set to false to disable Super Yellorite Ore");
		}

		if (Loader.isModLoaded("techreborn")) {
		RubyOre = config.getBoolean("RubyOre", MOD_SUPPORT, true, "Set to false to disable Super Ruby Ore");
		SapphireOre = config.getBoolean("SapphireOre", MOD_SUPPORT, true, "Set to false to disable Super Sapphire Ore");
		PyriteOre = config.getBoolean("PyriteOre", MOD_SUPPORT, true, "Set to false to disable Super Pyrite Ore");
		CinnabarOre = config.getBoolean("CinnabarOre", MOD_SUPPORT, true, "Set to false to disable Super Chromium Ore");
		SphaleriteOre = config.getBoolean("SphaleriteOre", MOD_SUPPORT, true, "Set to false to disable Super Sphalerite Ore");
		SodaliteOre = config.getBoolean("Sodalite", MOD_SUPPORT, true, "Set to false to disable Super Sodalite Ore");
		PeridotOre = config.getBoolean("PeridotOre", MOD_SUPPORT, true, "Set to false to disable Super Peridot Ore");
		TungstenOre = config.getBoolean("TungstenOre", MOD_SUPPORT, true, "Set to false to disable Super Tungsten Ore");

		ZincOre = config.getBoolean("ZincOre", MOD_SUPPORT, true, "Set to false to disable Super Zinc Ore");
		MercuryOre = config.getBoolean("MercuryOre", MOD_SUPPORT, true, "Set to false to disable Super Mercury Ore");
		PlatinumOre = config.getBoolean("PlatinumOre", MOD_SUPPORT, true, "Set to false to disable Super Platinum Ore");
		CadmiumOre = config.getBoolean("CadmiumOre", MOD_SUPPORT, true, "Set to false to disable Super Cadmium Ore");
		ChromiumOre = config.getBoolean("ChromiumOre", MOD_SUPPORT, true, "Set to false to disable Super Chromium Ore");
		MaganeseOre = config.getBoolean("MaganeseOre", MOD_SUPPORT, true, "Set to false to disable Super Maganese Ore");
		NichromeOre = config.getBoolean("NichromeOre", MOD_SUPPORT, true, "Set to false to disable Super Nichrome Ore");
		PlutoniumOre = config.getBoolean("PlutoniumOre", MOD_SUPPORT, true, "Set to false to disable Super Plutonium Ore");
		RutileOre = config.getBoolean("RutileOre", MOD_SUPPORT, true, "Set to false to disable Super Rutile Ore");
		TantalumOre = config.getBoolean("TantalumOre", MOD_SUPPORT, true, "Set to false to disable Super Tantalum Ore");
		TitaniumOre = config.getBoolean("TitaniumOre", MOD_SUPPORT, true, "Set to false to disable Super Titanium Ore");
		ZirconiumOre = config.getBoolean("ZirconiumOre", MOD_SUPPORT, true, "Set to false to disable Super Zirconium Ore");

		}

	config.addCustomCategoryComment(MOD_GENERATION, "Mod Generation");
	SuperDiamondRate = config.getInt("SuperDiamondRate", MOD_GENERATION, 20, 0, 100, "Set the spawn rate for Super Diamond Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");
	SuperGoldRate = config.getInt("SuperGoldRate", MOD_GENERATION, 20, 0, 100, "Set the spawn rate for Super Gold Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");
	SuperIronRate = config.getInt("SuperIronRate", MOD_GENERATION, 20, 0, 100, "Set the spawn rate for Super Iron Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");
	SuperCoalRate = config.getInt("SuperCoalRate", MOD_GENERATION, 20, 0, 100, "Set the spawn rate for Super Coal Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");
	SuperLapisRate = config.getInt("SuperLapisRate", MOD_GENERATION, 20, 0, 100, "Set the spawn rate for Super Lapis Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");
	SuperRedstoneRate = config.getInt("SuperRedstoneRate", MOD_GENERATION, 20, 0, 100, "Set the spawn rate for Super Redstone Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");



	if(Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("IC2")) {
		SuperSilverRate = config.getInt("SuperSilverRate", MOD_GENERATION, 10, 0, 100, "Set the spawn rate for Super Silver Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");
		SuperLeadRate = config.getInt("SuperLeadRate", MOD_GENERATION, 10, 0, 100, "Set the spawn rate for Super Lead Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");
		SuperUraniumRate = config.getInt("SuperUraniumRate", MOD_GENERATION, 10, 0, 100, "Set the spawn rate for Super Uranium Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");
		SuperSteelRate = config.getInt("SuperSteelRate", MOD_GENERATION, 10, 0, 100, "Set the spawn rate for Super Steel Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");

	}

	if(Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("IC2") || Loader.isModLoaded("forestry") || Loader.isModLoaded("Mekanism")) {
	SuperCopperRate = config.getInt("SuperCopperRate", MOD_GENERATION, 10, 0, 100, "Set the spawn rate for Super Silver Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");
	SuperTinRate = config.getInt("SuperTinRate", MOD_GENERATION, 10, 0, 100, "Set the spawn rate for Super Tin Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");
	}

	//if (Loader.isModLoaded("Mekanism")) {
		//SuperOsmiumRate = config.getInt("SuperOsmiumRate", MOD_GENERATION, 10, 0, 100, "Set the spawn rate for Super Osmium Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");
	//}

	if (Loader.isModLoaded("immersiveengineering")) {
		SuperAluminumRate = config.getInt("SuperAluminumRate", MOD_GENERATION, 10, 0, 100, "Set the spawn rate for Super Aluminum Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");
		SuperNickelRate = config.getInt("SuperNickelRate", MOD_GENERATION, 10, 0, 100, "Set the spawn rate for Super Nickel Ore (DO NOT GO OVER 100) (ignore if ore is disabled)");
	}
	/**
	if (Loader.isModLoaded("bigreactors")) {
		AnglesiteRate = config.getInt("AnglesiteRate", MOD_GENERATION, true, "Set to false to disable Super Anglesite Rate");
		BenitoiteRate = config.getInt("BenitoiteRate", MOD_GENERATION, true, "Set to false to disable Super BenitoiteRate Rate");
		YelloriteRate = config.getInt("YelloriteRate", MOD_GENERATION, true, "Set to false to disable Super Yellorite Rate");
		}
		*/

		if (Loader.isModLoaded("techreborn")) {
		RubyRate = config.getInt("RubyRate", MOD_GENERATION,  15, 0, 100, "Set the spawn rate for Super Ruby Ore (DO NOT GO OVER 100) (ignore if ore is disabled");
		SapphireRate = config.getInt("SapphireRate", MOD_GENERATION,  15, 0, 100, "Set the spawn rate for Super Sapphire Ore (DO NOT GO OVER 100) (ignore if ore is disabled");
		PyriteRate = config.getInt("PyriteRate", MOD_GENERATION,  15, 0, 100, "Set the spawn rate for Super Pyrite Ore (DO NOT GO OVER 100) (ignore if ore is disabled");
		CinnabarRate = config.getInt("CinnabarRate", MOD_GENERATION,  15, 0, 100, "Set the spawn rate for Super Cinnabar Ore (DO NOT GO OVER 100) (ignore if ore is disabled");
		SphaleriteRate = config.getInt("SphaleriteRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Sphalerite Ore (DO NOT GO OVER 100) (ignore if ore is disabled");
		SodaliteRate = config.getInt("SodaliteRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Sodalite Ore (DO NOT GO OVER 100) (ignore if ore is disabled");
		PeridotRate = config.getInt("PeridotRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Peridot Ore (DO NOT GO OVER 100) (ignore if ore is disabled");
		TungstenRate = config.getInt("TungstenRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Tungsten Ore (DO NOT GO OVER 100) (ignore if ore is disabled");

		ZincRate = config.getInt("ZincRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Zinc Ore (DO NOT GO OVER 100) (ignore if Ore is disabled");
		MercuryRate = config.getInt("MercuryRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Mercury Ore (DO NOT GO OVER 100) (ignore if Ore is disabled");
		PlatinumRate = config.getInt("PlatinumRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Platinum Ore (DO NOT GO OVER 100) (ignore if Ore is disabled");
		CadmiumRate = config.getInt("CadmiumRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Cadmium Ore (DO NOT GO OVER 100) (ignore if Ore is disabled");
		ChromiumRate = config.getInt("ChromiumRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Chromium Ore (DO NOT GO OVER 100) (ignore if Ore is disabled");
		MaganeseRate = config.getInt("MaganeseRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Maganese Ore (DO NOT GO OVER 100) (ignore if Ore is disabled");
		NichromeRate = config.getInt("NichromeRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Nichrome Ore (DO NOT GO OVER 100) (ignore if Ore is disabled");
		PlutoniumRate = config.getInt("PlutoniumRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Plutonium Ore (DO NOT GO OVER 100) (ignore if Ore is disabled");
		RutileRate = config.getInt("RutileRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Rutile Ore (DO NOT GO OVER 100) (ignore if Ore is disabled");
		TantalumRate = config.getInt("TantalumRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Tantalum Ore (DO NOT GO OVER 100) (ignore if Ore is disabled");
		TitaniumRate = config.getInt("TitaniumRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Titanium Ore (DO NOT GO OVER 100) (ignore if Ore is disabled");
		ZirconiumRate = config.getInt("ZirconiumRate", MOD_GENERATION, 15, 0, 100, "Set the spawn rate for Super Zirconium Ore (DO NOT GO OVER 100) (ignore if Ore is disabled");
	}
}
}

 

WorldGen:

package abused_master.worldgen;

import java.util.Random;

import abused_master.Config.Config;
import abused_master.SuperOres.ModBlocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkGenerator;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraftforge.fml.common.IWorldGenerator;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.oredict.OreDictionary;

public class SuperOresGeneration implements IWorldGenerator {


private WorldGenerator BlockSuperCoal;
private WorldGenerator BlockSuperDiamond;
private WorldGenerator BlockSuperGold;
private WorldGenerator BlockSuperIron;
private WorldGenerator BlockSuperLapis;
private WorldGenerator BlockSuperRedstone;

private WorldGenerator CopperOre;
private WorldGenerator SteelOre;
private WorldGenerator TinOre;
private WorldGenerator LeadOre;
private WorldGenerator NickelOre;
private WorldGenerator OsmiumOre;
private WorldGenerator AluminumOre;
private WorldGenerator UraniumOre;
private WorldGenerator SilverOre;

private WorldGenerator ZincOre;
private WorldGenerator MercuryOre;
private WorldGenerator PlatinumOre;
private WorldGenerator CadmiumOre;
private WorldGenerator ChromiumOre;
private WorldGenerator MaganeseOre;
private WorldGenerator NichromeOre;
private WorldGenerator PlutoniumOre;
private WorldGenerator RutileOre;
private WorldGenerator TantalumOre;
private WorldGenerator TitaniumOre;
private WorldGenerator TungstenOre;
private WorldGenerator ZirconiumOre;
private WorldGenerator RubyOre;
private WorldGenerator SapphireOre;
private WorldGenerator PyriteOre;
private WorldGenerator CinnabarOre;
private WorldGenerator SphaleriteOre;
private WorldGenerator SodaliteOre;
private WorldGenerator PeridotOre;

public SuperOresGeneration() {
    	if(Config.SuperCoalOre) {
    this.BlockSuperCoal = new WorldGenMinable(ModBlocks.blockSuperCoal.getDefaultState(), 7);
    	}
    	
    	if(Config.SuperDiamondOre) {
    this.BlockSuperDiamond = new WorldGenMinable(ModBlocks.blockSuperDiamond.getDefaultState(), 4);
    	}
    	
    	if(Config.SuperGoldOre) {
    this.BlockSuperGold = new WorldGenMinable(ModBlocks.blockSuperGold.getDefaultState(), 5);
    	}
    	
    	if(Config.SuperIronOre) {
    this.BlockSuperIron = new WorldGenMinable(ModBlocks.blockSuperIron.getDefaultState(), 6);
    	}
    	
    	if(Config.SuperLapisOre) {
    this.BlockSuperLapis = new WorldGenMinable(ModBlocks.blockSuperLapis.getDefaultState(), 6);
    	}
    	
    	if(Config.SuperRedstoneOre) {
    this.BlockSuperRedstone = new WorldGenMinable(ModBlocks.blockSuperRedstone.getDefaultState(), 6);
    	}



	//if (Loader.isModLoaded("Mekanism")) {
		//if (Config.SuperOsmiumOre) {
			//this.OsmiumOre = new WorldGenMinable(ModBlocks.SuperOsmiumOre.getDefaultState(), 6);
		//}
	//}

	if (Loader.isModLoaded("immersiveengineering")) {
		if (Config.SuperNickelOre) {
			this.NickelOre = new WorldGenMinable(ModBlocks.SuperNickelOre.getDefaultState(), 6);
		}

		if (Config.SuperAluminumOre) {
			this.AluminumOre = new WorldGenMinable(ModBlocks.SuperAluminumOre.getDefaultState(), 6);
		}
	}


	if(Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("IC2") || Loader.isModLoaded("forestry") || Loader.isModLoaded("Mekanism")) {

		if(Config.SuperCopperOre) {
			this.CopperOre = new WorldGenMinable(ModBlocks.SuperCopperOre.getDefaultState(), 6);
		}

		if (Config.SuperTinOre) {
			this.TinOre = new WorldGenMinable(ModBlocks.SuperTinOre.getDefaultState(), 6);
		}
	}

	if(Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("IC2")) {
		if (Config.SuperLeadOre) {
			this.LeadOre = new WorldGenMinable(ModBlocks.SuperLeadOre.getDefaultState(), 6);
		}

		if (Config.SuperSilverOre) {
			this.SilverOre = new WorldGenMinable(ModBlocks.SuperSilverOre.getDefaultState(), 6);
		}

		if (Config.SuperSteelOre) {
			this.SteelOre = new WorldGenMinable(ModBlocks.SuperSteelOre.getDefaultState(), 6);
		}

		if (Config.SuperUraniumOre) {
			this.UraniumOre = new WorldGenMinable(ModBlocks.SuperUraniumOre.getDefaultState(), 6);
	}
}


	if (Loader.isModLoaded("techreborn")) {
		if(Config.RubyOre) {
			this.RubyOre = new WorldGenMinable(ModBlocks.RubyOre.getDefaultState(), 6);
		}
		if(Config.SapphireOre) {
			this.SapphireOre = new WorldGenMinable(ModBlocks.SapphireOre.getDefaultState(), 6);
		}

		if(Config.CinnabarOre) {
			this.CinnabarOre = new WorldGenMinable(ModBlocks.CinnabarOre.getDefaultState(), 6);
		}

		if(Config.PyriteOre) {
			this.PyriteOre = new WorldGenMinable(ModBlocks.PyriteOre.getDefaultState(), 6);
		}

		if(Config.SphaleriteOre) {
			this.SphaleriteOre = new WorldGenMinable(ModBlocks.SphaleriteOre.getDefaultState(), 6);
		}

		if(Config.SodaliteOre) {
			this.SodaliteOre = new WorldGenMinable(ModBlocks.SodaliteOre.getDefaultState(), 6);
		}

		if(Config.PeridotOre) {
			this.PeridotOre = new WorldGenMinable(ModBlocks.PeridotOre.getDefaultState(), 6);
		}

		if(Config.TungstenOre) {
			this.TungstenOre = new WorldGenMinable(ModBlocks.TungstenOre.getDefaultState(), 6);
		}

	}
    	
}
    
    private void runGenerator(WorldGenerator generator, World world, Random rand, int chunk_X, int chunk_Z, int chancesToSpawn, int minHeight, int maxHeight) {
        if (minHeight < 0 || maxHeight > 256 || minHeight > maxHeight)
            throw new IllegalArgumentException("Illegal Height Arguments for WorldGenerator");

        int heightDiff = maxHeight - minHeight + 1;
        for (int i = 0; i < chancesToSpawn; i ++) {
            int x = chunk_X * 16 + rand.nextInt(16);
            int y = minHeight + rand.nextInt(heightDiff);
            int z = chunk_Z * 16 + rand.nextInt(16);
            generator.generate(world, rand, new BlockPos(x, y, z));
        }
    }

@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator,
		IChunkProvider chunkProvider) {

        switch (world.provider.getDimension()) {
        case 0: //Overworld
        	if(Config.SuperCoalOre) {
        	this.runGenerator(this.BlockSuperCoal, world, random, chunkX, chunkZ, Config.SuperCoalRate, 0, 64);
        	}
        	
        	if(Config.SuperDiamondOre) {
        	this.runGenerator(this.BlockSuperDiamond, world, random, chunkX, chunkZ, Config.SuperDiamondRate, 0, 16);
        	}
        	
        	if(Config.SuperGoldOre) {
        	this.runGenerator(this.BlockSuperGold, world, random, chunkX, chunkZ, Config.SuperGoldRate, 0, 32);
        	}
        	
        	if(Config.SuperIronOre) {
        	this.runGenerator(this.BlockSuperIron, world, random, chunkX, chunkZ, Config.SuperIronRate, 0, 64);
        	}
        	
        	if(Config.SuperLapisOre) {
        	this.runGenerator(this.BlockSuperLapis, world, random, chunkX, chunkZ, Config.SuperLapisRate, 0, 32);
        	}
        	
        	if(Config.SuperRedstoneOre) {
        	this.runGenerator(this.BlockSuperRedstone, world, random, chunkX, chunkZ, Config.SuperRedstoneRate, 0, 32);
        	}
    			
    			/**
    			 * Modded Gen
    			 */
    			
    			//if (Loader.isModLoaded("Mekanism")) {
    				//if (Config.SuperOsmiumOre) {
        				//this.runGenerator(this.OsmiumOre, world, random, chunkX, chunkZ, Config.SuperOsmiumRate, 0, 36);
    				//}
    			//}
    			
    			if (Loader.isModLoaded("immersiveengineering")) {
    				if (Config.SuperNickelOre) {
        				this.runGenerator(this.NickelOre, world, random, chunkX, chunkZ, Config.SuperNickelRate, 0, 54);
    				}
    				
    				if (Config.SuperAluminumOre) {
        				this.runGenerator(this.AluminumOre, world, random, chunkX, chunkZ, Config.SuperAluminumRate, 0, 54);
    				}
    			}
    			
    			
    			if(Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("IC2") || Loader.isModLoaded("forestry") || Loader.isModLoaded("Mekanism")) {
    				
    				if(Config.SuperCopperOre) {
        				this.runGenerator(this.CopperOre, world, random, chunkX, chunkZ, Config.SuperCopperRate, 0, 54);
    				}
    				
    				if (Config.SuperTinOre) {
        				this.runGenerator(this.TinOre, world, random, chunkX, chunkZ, Config.SuperTinRate, 0, 54);
    				}
    			}
    			
    			if(Loader.isModLoaded("immersiveengineering") || Loader.isModLoaded("IC2")) {
    				if (Config.SuperLeadOre) {
        				this.runGenerator(this.LeadOre, world, random, chunkX, chunkZ, Config.SuperLeadRate, 0, 43);
    				}
    				
    				if (Config.SuperSilverOre) {
        				this.runGenerator(this.SilverOre, world, random, chunkX, chunkZ, Config.SuperSilverRate, 0, 35);
    				}
    				
    				if (Config.SuperSteelOre) {
        				this.runGenerator(this.SteelOre, world, random, chunkX, chunkZ, Config.SuperSteelRate, 0, 24);
    				}
    				
    				if (Config.SuperUraniumOre) {
        				this.runGenerator(this.UraniumOre, world, random, chunkX, chunkZ, Config.SuperUraniumRate, 0, 54);
    			}
    			  }
    			
    			
    			
    			if (Loader.isModLoaded("techreborn")) {
    				if(Config.RubyOre) {
        				this.runGenerator(this.RubyOre, world, random, chunkX, chunkZ, Config.RubyRate, 0, 54);
    				}
    				if(Config.SapphireOre) {
        				this.runGenerator(this.UraniumOre, world, random, chunkX, chunkZ, Config.SapphireRate, 0, 54);
    				}
    				
    				if(Config.CinnabarOre) {
        				this.runGenerator(this.UraniumOre, world, random, chunkX, chunkZ, Config.CinnabarRate, 0, 54);
    				
    				if(Config.PyriteOre) {
        				this.runGenerator(this.UraniumOre, world, random, chunkX, chunkZ, Config.PyriteRate, 0, 54);
    				}
    				
    				if(Config.SphaleriteOre) {
        				this.runGenerator(this.UraniumOre, world, random, chunkX, chunkZ, Config.SphaleriteRate, 0, 54);
    				}
    				
    				if(Config.SodaliteOre) {
        				this.runGenerator(this.UraniumOre, world, random, chunkX, chunkZ, Config.SodaliteRate, 0, 54);
    				}
    				
    				if(Config.PeridotOre) {
        				this.runGenerator(this.UraniumOre, world, random, chunkX, chunkZ, Config.PeridotRate, 0, 54);
    				}
    				
    				if(Config.TungstenOre) {
        				this.runGenerator(this.UraniumOre, world, random, chunkX, chunkZ, Config.TungstenRate, 0, 54);
    				}
    			}
    		}
        	break;
        case -1: //Nether

            break;
        case 1: //End

            break;
        }
    }
}

 

Console Log:

http://pastebin.com/C2HmwZih

Posted
java.lang.NullPointerException

    at abused_master.worldgen.SuperOresGeneration.runGenerator(SuperOresGeneration.java:177) ~[superOresGeneration.class:?]

    at abused_master.worldgen.SuperOresGeneration.generate(SuperOresGeneration.java:268) ~[superOresGeneration.class:?]

    at net.minecraftforge.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:120) ~[GameRegistry.class:?]

 

Lines 267-269 of

SuperOresGeneration

:

if(Config.SapphireOre) {
this.runGenerator(this.UraniumOre, world, random, chunkX, chunkZ, Config.SapphireRate, 0, 54);
}

 

this.UraniumOre

is almost certainly the wrong field to use here.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

java.lang.NullPointerException

    at abused_master.worldgen.SuperOresGeneration.runGenerator(SuperOresGeneration.java:177) ~[superOresGeneration.class:?]

    at abused_master.worldgen.SuperOresGeneration.generate(SuperOresGeneration.java:268) ~[superOresGeneration.class:?]

    at net.minecraftforge.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:120) ~[GameRegistry.class:?]

 

Lines 267-269 of

SuperOresGeneration

:

if(Config.SapphireOre) {
this.runGenerator(this.UraniumOre, world, random, chunkX, chunkZ, Config.SapphireRate, 0, 54);
}

 

this.UraniumOre

is almost certainly the wrong field to use here.

oh wow, did not see that, yeah just copied - pasted for times sake, silly mistakes

Posted
java.lang.NullPointerException

    at net.minecraft.stats.StatList.initCraftableStats(StatList.java:161) ~[forgeSrc-1.10.2-12.18.2.2118.jar:?]

    at net.minecraft.stats.StatList.reinit(StatList.java:358) ~[forgeSrc-1.10.2-12.18.2.2118.jar:?]

    at net.minecraftforge.common.ForgeModContainer.mappingChanged(ForgeModContainer.java:471) ~[forgeSrc-1.10.2-12.18.2.2118.jar:?]

 

Lines 159-162 of

StatList

:

for (ItemStack itemstack : FurnaceRecipes.instance().getSmeltingList().values())
{
    set.add(itemstack.getItem());
}

 

Someone added a furnace recipe with a

null

output.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.