Jump to content

Recommended Posts

Posted

I have been working on making a config file for my mod(doing just ID's at the moment). When I go to load the the game it just says slot 0 is already taken... when trying to add...

 

Theses are my declarations.

 
public static int denseCoalOreID;
public static int titaniumOreID;

 

These are the initializers

int denseCoalOre = config.getBlock(Configuration.CATEGORY_BLOCK, "Dense Coal Ore", 500).getInt();
int titaniumOreID = config.getBlock(Configuration.CATEGORY_BLOCK, "Titanium Ore ID", 501).getInt();

 

Them being used in the assigning the ID

Block denseCoalOre = new denseCoalOre(denseCoalID, Material.rock); //the rest of the attribute are in its class.
Block titanium = new titanium(titaniumOreID, Material.rock);//same with this one.

 

This is there error

java.lang.IllegalArgumentException: Slot 0 is already occupied by bigbaddevil7.supernova.blocks.denseCoalOre@302ff81c when adding bigbaddevil7.supernova.blocks.titanium@1d4a0efb

 

 

 

Also Since I'm only learning I knew this exact thing was going to happen, but my main class became massive. What would be the best way to setup the main class, or what is the more common method of organizing the class.

 

This my main class. Even I know its not pretty site which is why I'm asking for suggestions. I've looked at open source mods on the site but I understand it better when someone explains it.

Here is a pastebin as well http://pastebin.com/w67VexAC

 

package bigbaddevil7.supernova;

import bigbaddevil7.supernova.blocks.*;
import bigbaddevil7.supernova.crafting.HydrogenSeperatorRecipes;
import bigbaddevil7.supernova.crafting.OreRecipes;
import bigbaddevil7.supernova.crafting.OxidizerRecipes;
import bigbaddevil7.supernova.event.EventManager;
import bigbaddevil7.supernova.gui.GuiHandler;
import bigbaddevil7.supernova.items.*;
import bigbaddevil7.supernova.renderer.*;
import bigbaddevil7.supernova.tileentity.*;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import net.minecraft.stats.AchievementList;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@Mod(modid = SuperNovaInfo.ID, name = SuperNovaInfo.NAME, version = SuperNovaInfo.VERSION)
@NetworkMod(clientSideRequired = true, serverSideRequired = false)

public class SuperNova
{
    /**Gui Id for the the oxidizer*/
    public static final int guiIdOxidizer = 0;
    public static final int guiIdFragmenter = 1;
    public static final int guiIdCarbonGenerator = 2;
    public static final int guiIdHydrogenSeperator = 3;
    public static final int guiIdCarbonWeaver = 4;

    /**Event Managers*/
    EventManager oreManager = new EventManager();

    /**Register guiHandler*/
    GuiHandler guiHandler = new GuiHandler();

    /**Custom Creative Tabs*/
    public static CreativeTabs tabSupernova = new CreativeTabs("supernova")
    {
        @SideOnly(Side.CLIENT)
        public int getTabIconItemIndex()
        {
            return SuperNova.oxidizerIdle.blockID;
        }
    };
    
    public static int titaniumOreID;
    public static int aluminumOreID;
    public static int denseCoalOreID;
    public static int oxidizerIdleID;
    public static int oxidizerActiveID;
    public static int fragmenterIdleID;
    public static int fragmenterActiveID;
    public static int carbonGeneratorIdleID;
    public static int carbonGeneratorActiveID;
    public static int hydrogenSeperatorIdleID;
    public static int hydrogenSeperatorActiveID;
    public static int carbonWeaverIdleID;
    public static int carbonWeaverActiveID;
    
    
    public static int carbonFiberClothID;
    public static int carbonStrandID;
    public static int carbontaniumStrandID;
    public static int carbontaniumClothID;
    public static int CFPPlateID;
    public static int CFPRodID;
    public static int CTPlateID;
    public static int CTRodID;
    public static int CFPSwordID;
    public static int CFPAxeID;
    public static int CFPPickaxeID;
    public static int CFPShovelID;
    public static int CFPHoeID;
    public static int CTSwordID;
    public static int CTAxeID;
    public static int CTPickaxeID;
    public static int CTShovelID;
    public static int CTHoeID;
    public static int ironFragmentsID;
    public static int goldFragmentsID;
    public static int titaniumFragmentsID;
    public static int aluminumFragmentsID;
    public static int coalDustID;
    public static int aluminumIngotsID;
    public static int titaniumIngotsID;
    public static int denseCoalID;
    public static int carbonFuelID;
    public static int carbonBatteryID;
    public static int mediumPowerCellID;
    public static int cellID;
    public static int airCellID;
    public static int waterCellID;
    public static int smallPowerCoreID;
    public static int mediumPowerCoreID;
    public static int largePowerCoreID;
    public static int glassShardID;
    public static int upgradeID;
    

    /**Custom Blocks*/
    public static Block denseCoalOre;
    public static Block titanium;
    public static Block aluminum;
    public static Block oxidizerIdle;
    public static Block oxidizerActive;
    public static Block fragmenterIdle;
    public static Block fragmenterActive; 
    public static Block carbonGeneratorIdle;
    public static Block carbonGeneratorActive;
    public static Block hydrogenSeperatorIdle; 
    public static Block hydrogenSeperatorActive; 
    public static Block carbonWeaverIdle; 
    public static Block carbonWeaverActive; 
    
    /**Custom Materials*/
    public static EnumToolMaterial CFP = EnumHelper.addToolMaterial("CFP", 3, 1600, 11.0F, 6.0F, 10);
    public static EnumToolMaterial CT = EnumHelper.addToolMaterial("CT", 3, 1800, 13.0F, 8.0F, 7);

    /**Custom Items*/
    public static Item carbonFiberCloth;
    public static Item CFPSword;
    public static Item CFPAxe;
    public static Item CFPPickaxe;
    public static Item CFPShovel;
    public static Item CFPHoe;
    public static Item CTSword;
    public static Item CTAxe;
    public static Item CTPickaxe;
    public static Item CTShovel;
    public static Item CTHoe;
    public static Item ironFragments;
    public static Item goldFragments;
    public static Item titaniumFragments;
    public static Item aluminumFragments;
    public static Item coalDust; 
    public static Item aluminumIngots; 
    public static Item CFPPlate;
    public static Item CFPRod;
    public static Item carbontaniumCloth;
    public static Item CTPlate;
    public static Item CTRod; 
    public static Item denseCoal;
    public static Item carbonFuel;
    public static Item carbontaniumStrand;
    public static Item carbonStrand;
    public static Item titaniumIngots; 
    public static Item carbonBattery;
    public static Item airCell; 
    public static Item waterCell;
    public static Item smallPowerCore;
    public static Item mediumPowerCore;
    public static Item largePowerCore; 
    public static Item mediumPowerCell;
    public static Item cell; 
    public static Item glassShard; 
    public static Item upgrade;
    
    
    // The instance of your mod that Forge uses.
    @Instance("SuperNova")
    public static SuperNova instance;

    // Says where the client and server 'proxy' code is loaded.
    @SidedProxy(clientSide = SuperNovaInfo.CLIENTPROXY + "ClientProxy", serverSide = SuperNovaInfo.COMMONPROXY + "CommonProxy")
    public static CommonProxy proxy;

    @EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
        Configuration config = new Configuration(event.getSuggestedConfigurationFile());
        
        config.load();
        int titaniumOreID = config.getBlock(Configuration.CATEGORY_BLOCK, "Titanium Ore ID", 501).getInt();
        int aluminumOreID = config.getBlock(Configuration.CATEGORY_BLOCK, "Aluminum Ore ID", 502).getInt();
        int denseCoalOre = config.getBlock(Configuration.CATEGORY_BLOCK, "Dense Coal Ore", 500).getInt();
        int oxidizerIdleID = config.getBlock(Configuration.CATEGORY_BLOCK, "Oxidizer Idle ID", 600).getInt();
        int oxidizerActiveID = config.getBlock(Configuration.CATEGORY_BLOCK, "Oxidixer Active ID", 601).getInt();
        int fragmenterIdleID = config.getBlock(Configuration.CATEGORY_BLOCK, "Fragmenter Idle ID", 602).getInt();
        int fragmenterActiveID = config.getBlock(Configuration.CATEGORY_BLOCK, "Fragmenter Active ID", 603).getInt();
        int carbonGeneratorIdleID = config.getBlock(Configuration.CATEGORY_BLOCK, "Carbon Generator Idle ID", 604).getInt();
        int carbonGeneratorActiveID = config.getBlock(Configuration.CATEGORY_BLOCK, "Carbon Generator Active ID", 605).getInt();
        int hydrogenSeperatorIdleID = config.getBlock(Configuration.CATEGORY_BLOCK, "Hydrogen Seperator Idle ID", 606).getInt();
        int hydrogenSeperatorActiveID = config.getBlock(Configuration.CATEGORY_BLOCK, "Hydrogen Seperator Active ID", 607).getInt();
        int carbonWeaverIdleID = config.getBlock(Configuration.CATEGORY_BLOCK, "Carbon Weaver Idle ID", 608).getInt();
        int carbonWeaverActiveID = config.getBlock(Configuration.CATEGORY_BLOCK, "Carbon Weaver Active ID", 609).getInt();
        
        
        int carbonFiberClothID = config.getItem(Configuration.CATEGORY_ITEM, "Carbon Fiber Cloth ID", 5001).getInt();
        int carbonStrandID = config.getItem(Configuration.CATEGORY_ITEM, "Carbon Strand ID", 5024).getInt();
        int carbontaniumStrandID = config.getItem(Configuration.CATEGORY_ITEM, "Carbontanium Strand ID", 5025).getInt();
        int carbontaniumClothID = config.getItem(Configuration.CATEGORY_ITEM, "Carbontainum Cloth ID", 5019).getInt();
        int CFPPlateID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Plate ID", 5020).getInt();
        int CFPRodID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Rod ID", 5021).getInt();
        int CTPlateID = config.getItem(Configuration.CATEGORY_ITEM, "CT Plate ID", 5022).getInt();
        int CTRodID = config.getItem(Configuration.CATEGORY_ITEM, "CT Rod ID", 5023).getInt();
        int CFPSwordID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Sword ID", 5002).getInt();
        int CFPAxeID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Axe ID", 5003).getInt();
        int CFPPickaxeID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Pickaxe ID", 5004).getInt();
        int CFPShovelID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Shovel ID", 5005).getInt();
        int CFPHoeID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Hoe ID", 5006).getInt();
        int CTSwordID = config.getItem(Configuration.CATEGORY_ITEM, "CT Sword ID", 5007).getInt();
        int CTAxeID = config.getItem(Configuration.CATEGORY_ITEM, "CT Axe ID", 5008).getInt();
        int CTPickaxeID = config.getItem(Configuration.CATEGORY_ITEM, "CT Pickaxe ID", 5009).getInt();
        int CTShovelID = config.getItem(Configuration.CATEGORY_ITEM, "CT Shovel ID", 5010).getInt();
        int CTHoeID = config.getItem(Configuration.CATEGORY_ITEM, "CT Hoe ID", 5011).getInt();
        int ironFragmentsID = config.getItem(Configuration.CATEGORY_ITEM, "Iron Fragments ID", 5012).getInt();
        int goldFragmentsID = config.getItem(Configuration.CATEGORY_ITEM, "Gold Fragments ID", 5013).getInt();
        int titaniumFragmentsID = config.getItem(Configuration.CATEGORY_ITEM, "Titnium Fragments ID", 5014).getInt();
        int aluminumFragmentsID = config.getItem(Configuration.CATEGORY_ITEM, "Aluminum Fragments ID", 5015).getInt();
        int coalDustID = config.getItem(Configuration.CATEGORY_ITEM, "Coal Dust ID", 5016).getInt();
        int aluminumIngotsID = config.getItem(Configuration.CATEGORY_ITEM, "Aluminum Ingot ID", 5017).getInt();
        int titaniumIngotsID = config.getItem(Configuration.CATEGORY_ITEM, "Titanium Ingot ID", 5018).getInt();
        int denseCoalID = config.getItem(Configuration.CATEGORY_ITEM, "Dense Coal ID", 5026).getInt();
        int carbonFuelID = config.getItem(Configuration.CATEGORY_ITEM, "Carbon Fuel ID", 5027).getInt();
        int carbonBatteryID = config.getItem(Configuration.CATEGORY_ITEM, "Small Power Cell ID", 5028).getInt();
        int mediumPowerCellID = config.getItem(Configuration.CATEGORY_ITEM, "Medium Power Cell ID", 5029).getInt();
        int cellID = config.getItem(Configuration.CATEGORY_ITEM, "Cell ID", 5030).getInt();
        int airCellID = config.getItem(Configuration.CATEGORY_ITEM, "Air Cell ID", 5031).getInt();
        int waterCellID = config.getItem(Configuration.CATEGORY_ITEM, "Water Cell ID", 5032).getInt();
        int smallPowerCoreID = config.getItem(Configuration.CATEGORY_ITEM, "Small Power Core ID", 5033).getInt();
        int mediumPowerCoreID = config.getItem(Configuration.CATEGORY_ITEM, "Medium Power Core ID", 5034).getInt();
        int largePowerCoreID = config.getItem(Configuration.CATEGORY_ITEM, "Large Power Core ID", 5035).getInt();
        int glassShardID = config.getItem(Configuration.CATEGORY_ITEM, "Glass Shard ID", 5035).getInt();
        int upgradeID = config.getItem(Configuration.CATEGORY_ITEM, "Upgrade ID", 5036).getInt();
        
        
        
        
        config.save();
    }

    @EventHandler
    public void load(FMLInitializationEvent event)
    {
        proxy.registerRenderers();
        
        
        
        /**Custom Blocks*/
         Block denseCoalOre = new denseCoalOre(denseCoalID, Material.rock);
         Block titanium = new titanium(titaniumOreID, Material.rock);
         Block aluminum =  new aluminum(aluminumOreID, Material.rock);
         Block oxidizerIdle = new Oxidizer(oxidizerIdleID, false).setUnlocalizedName("oxidizerIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
         Block oxidizerActive = new Oxidizer(oxidizerActiveID, true).setUnlocalizedName("oxidizerActive").setHardness(3.5F);
         Block fragmenterIdle = new Fragmenter(fragmenterIdleID, false).setUnlocalizedName("fragementerIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
         Block fragmenterActive = new Fragmenter(fragmenterActiveID, true).setUnlocalizedName("fragementerActive").setHardness(3.5F);
         Block carbonGeneratorIdle = new CarbonGenerator(carbonGeneratorIdleID, false).setUnlocalizedName("carbonGeneratorIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
         Block carbonGeneratorActive = new CarbonGenerator(carbonGeneratorActiveID, true).setUnlocalizedName("carbonGeneratorActive").setHardness(3.5F);
         Block hydrogenSeperatorIdle = new HydrogenSeperator(hydrogenSeperatorIdleID, false).setUnlocalizedName("hydrogenSeperatorIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
         Block hydrogenSeperatorActive = new HydrogenSeperator(hydrogenSeperatorActiveID, true).setUnlocalizedName("hydrogenSeperatorActive").setHardness(3.5F);
         Block carbonWeaverIdle = new CarbonWeaver(carbonWeaverIdleID, false).setUnlocalizedName("carbonWeaverIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
         Block carbonWeaverActive = new CarbonWeaver(carbonWeaverActiveID, true).setUnlocalizedName("carbonweaverActive").setHardness(3.5F);
        
        /**Custom Materials*/
         EnumToolMaterial CFP = EnumHelper.addToolMaterial("CFP", 3, 1600, 11.0F, 6.0F, 10);
         EnumToolMaterial CT = EnumHelper.addToolMaterial("CT", 3, 1800, 13.0F, 8.0F, 7);

       
	/**Custom Items*/
        carbonFiberCloth = new carbonFiberCloth(carbonFiberClothID);
        CFPSword = new CFPSword(CFPSwordID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPSword").setTextureName("supernova:cfpsword");
        CFPAxe = new CFPAxe(CFPAxeID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPAxe").setTextureName("supernova:cfpaxe");
        CFPPickaxe = new CFPPickaxe(CFPPickaxeID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPPickaxe").setTextureName("supernova:cfppickaxe");
        CFPShovel = new CFPShovel(CFPShovelID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPShovel").setTextureName("supernova:cfpshovel");
        CFPHoe = new CFPHoe(CFPHoeID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPHoe").setTextureName("supernova:cfphoe");
        CTSword = new CTSword(CTSwordID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTSword").setTextureName("supernova:ctsword");
        CTAxe = new CTAxe(CTAxeID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTAxe").setTextureName("supernova:ctaxe");
        CTPickaxe = new CTPickaxe(CTPickaxeID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTPickaxe").setTextureName("supernova:ctpickaxe");
        CTShovel = new CTShovel(CTShovelID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTShovel").setTextureName("supernova:ctshovel");
        CTHoe = new CTHoe(CTHoeID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTHoe").setTextureName("supernova:cthoe");
        ironFragments = new ironFragments(ironFragmentsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("ironfragments").setTextureName("supernova:ironfragments");
        goldFragments = new goldFragments(goldFragmentsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("goldFragemnts").setTextureName("supernova:goldfragments");
        titaniumFragments = new titaniumFragments(titaniumFragmentsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("titaniumFragments").setTextureName("supernova:titaniumfragments");
        aluminumFragments = new aluminumFragments(aluminumFragmentsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("aluminumFragments").setTextureName("supernova:aluminumfragments");
        coalDust = new coalDust(coalDustID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("coalDust").setTextureName("supernova:coaldust");
        aluminumIngots = new aluminumIngot(aluminumIngotsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("aluminumIngots").setTextureName("supernova:aluminumingot");
        CFPPlate = new CFPPlate(CFPPlateID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPPlate").setTextureName("supernova:cfpplate");
        CFPRod = new CFPRod(CFPRodID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPRod").setTextureName("supernova:cfprod");
        carbontaniumCloth = new carbontaniumCloth(carbontaniumClothID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbontaniumCloth").setTextureName("supernova:carbontaniumcloth");
        CTPlate = new CTPlate(CTPlateID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTPlate").setTextureName("supernova:ctplate");
        CTRod = new CTRod(CTRodID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTRod").setTextureName("supernova:ctrod");
        denseCoal = new densecoal(denseCoalID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("densecoal").setTextureName("supernova:densecoal");
        carbonFuel = new CarbonFuel(carbonFuelID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbonfuel").setTextureName("supernova:carbonfuel");
        carbontaniumStrand = new CarbontainumStrand(carbontaniumStrandID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbontainumstrand").setTextureName("supernova:tcarbonstrand");
        carbonStrand = new CarbonStrand(carbonStrandID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbonstrand").setTextureName("supernova:carbonstrand");
        titaniumIngots = new titaniumIngot(titaniumIngotsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("titaniumIngots").setTextureName("supernova:titaniumingot");
        carbonBattery = new CarbonBattery(carbonBatteryID, 1000).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbonBattery").setTextureName("supernova:battery");
        airCell = new AirCell(airCellID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("aircell").setTextureName("supernova:aircell");
        waterCell = new WaterCell(waterCellID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("watercell").setTextureName("supernova:watercell");
        smallPowerCore = new SmallPowerCore(smallPowerCoreID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("smallpowercore").setTextureName("supernova:smallpowercore");
        mediumPowerCore = new MediumPowerCore(mediumPowerCoreID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("mediumpowercore").setTextureName("supernova:mediumpowercore");
        largePowerCore = new LargePowerCore(largePowerCoreID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("largepowercore").setTextureName("supernova:largepowercore");
        mediumPowerCell = new MediumPowerCell(mediumPowerCellID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("mediumPowerCell").setTextureName("supernova:mediumpowercell");
        cell = new Cell(cellID).setCreativeTab(tabSupernova).setUnlocalizedName("cell").setTextureName("supernova:cell");
        glassShard = new GlassShard(glassShardID).setCreativeTab(tabSupernova).setUnlocalizedName("glassshard").setTextureName("supernova:glassshard");
        upgrade = new Upgrade(upgradeID).setCreativeTab(tabSupernova).setUnlocalizedName("upgrade").setTextureName("supernova:upgrade");
        
        
        
        LanguageRegistry.instance().addStringLocalization(tabSupernova.getTranslatedTabLabel(), "SuperNova");
        /**Register Tile Entity*/
        GameRegistry.registerTileEntity(TileEntityOxidizer.class, "oxidizer");
        GameRegistry.registerTileEntity(TileEntityFragmenter.class, "fragmenter");
        GameRegistry.registerTileEntity(TileEntityCarbonGenerator.class, "carbonGenerator");
        GameRegistry.registerTileEntity(TileEntityHydrogenSeperator.class, "hydrogenseperator");
        GameRegistry.registerTileEntity(TileEntityCarbonWeaver.class, "carbonWeaver");
        
        
        
        /**Register Renderer*/
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityOxidizer.class, new RendererOxidizer());
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCarbonGenerator.class, new RendererCarbonGenerator());
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHydrogenSeperator.class, new RendererHydrogenSeperator());
        
        /**Network Register*/
        NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler());
        
        
        /**Gui Language Registry*/
        LanguageRegistry.instance().addStringLocalization("container.oxidizer", "Oxidizer");
        LanguageRegistry.instance().addStringLocalization("container.fragmenter", "Fragmenter");
        LanguageRegistry.instance().addStringLocalization("container.carbonGenerator", "Carbon Generator");
        /**Register Generators*/
        GameRegistry.registerWorldGenerator(oreManager);
        /**Register Blocks*/
        GameRegistry.registerBlock(denseCoalOre, "denseCoalOre");
        GameRegistry.registerBlock(aluminum, "aluminum");
        GameRegistry.registerBlock(titanium, "titanium");
        GameRegistry.registerBlock(oxidizerIdle, "oxidizerIdle");
        GameRegistry.registerBlock(oxidizerActive, "oxidizerActive");
        GameRegistry.registerBlock(fragmenterIdle, "fragmenterIdle");
        GameRegistry.registerBlock(fragmenterActive, "fragmenterActive");
        GameRegistry.registerBlock(carbonGeneratorActive, "carbonGeneratorActive");
        GameRegistry.registerBlock(carbonGeneratorIdle, "carbonGeneratorIdle");
        GameRegistry.registerBlock(hydrogenSeperatorActive, "hydrogenSeperatorActive");
        GameRegistry.registerBlock(hydrogenSeperatorIdle, "hydrogenSeperatorIdle");
        GameRegistry.registerBlock(carbonWeaverActive, "carbonWeaverActive");
        GameRegistry.registerBlock(carbonWeaverIdle, "carbonWeaverIdle");
        
        
        LanguageRegistry.addName(denseCoalOre, "Dense Coal Ore");
        LanguageRegistry.addName(aluminum, "Aluminum");
        LanguageRegistry.addName(titanium, "Titanium");
        LanguageRegistry.addName(oxidizerIdle, "Oxidizer");
        LanguageRegistry.addName(fragmenterIdle, "Fragmentalizer");
        LanguageRegistry.addName(fragmenterActive, "FragmentalizerActive");
        LanguageRegistry.addName(carbonGeneratorIdle, "Carbon Generator");
        LanguageRegistry.addName(hydrogenSeperatorIdle, "Hydrogen Seperator");
        LanguageRegistry.addName(carbonWeaverIdle, "Carbon Weaver");
        
        
        /**Set Harvest Level*/
        MinecraftForge.setBlockHarvestLevel(aluminum, "pickaxe", 2);
        MinecraftForge.setBlockHarvestLevel(denseCoalOre, "pickaxe", 2);
        MinecraftForge.setBlockHarvestLevel(titanium, "pickaxe", 2);
        
        
        
        /**Registering Custom Items*/
        GameRegistry.registerItem(carbonFiberCloth, "carbonFiberCloth");
        GameRegistry.registerItem(ironFragments, "ironFragments");
        GameRegistry.registerItem(goldFragments, "goldFragments");
        GameRegistry.registerItem(titaniumFragments, "titaniumFragments");
        GameRegistry.registerItem(aluminumFragments, "aluminumFragments");
        GameRegistry.registerItem(aluminumIngots, "aluminumIngots");
        GameRegistry.registerItem(titaniumIngots, "titaniumIngots");
        GameRegistry.registerItem(CFPPlate, "CFPPlates");
        GameRegistry.registerItem(CFPRod, "CFPRod");
        GameRegistry.registerItem(carbontaniumCloth, "carbontaniumCloth");
        GameRegistry.registerItem(CTPlate, "CTPlate");
        GameRegistry.registerItem(CTRod, "CTRod");
        GameRegistry.registerItem(coalDust, "coalDust");
        GameRegistry.registerItem(CFPSword, "CFPSword");
        GameRegistry.registerItem(CFPAxe, "CFPAxe");
        GameRegistry.registerItem(CFPPickaxe, "CFPPickaxe");
        GameRegistry.registerItem(CFPShovel, "CFPShovel");
        GameRegistry.registerItem(CFPHoe, "CFPHoe");
        GameRegistry.registerItem(CTSword, "CTSword");
        GameRegistry.registerItem(CTAxe, "CTAxe");
        GameRegistry.registerItem(CTPickaxe, "CTPickaxe");
        GameRegistry.registerItem(CTShovel, "CTShovel");
        GameRegistry.registerItem(CTHoe, "CTHoe");
        GameRegistry.registerItem(denseCoal, "densecoal");
        GameRegistry.registerItem(carbonFuel, "carbonFuel");
        GameRegistry.registerItem(carbontaniumStrand, "carbontaniumStrand");
        GameRegistry.registerItem(carbonStrand, "carbonStrand");
        GameRegistry.registerItem(carbonBattery, "carbonBattery");
        GameRegistry.registerItem(airCell, "airCell");
        GameRegistry.registerItem(waterCell, "waterCell");
        GameRegistry.registerItem(smallPowerCore, "smallPowerCore");
        GameRegistry.registerItem(mediumPowerCore, "mediumPowerCore");
        GameRegistry.registerItem(largePowerCore, "largePowerCore");
        GameRegistry.registerItem(mediumPowerCell, "mediumPowerCell");
        GameRegistry.registerItem(cell, "cell");
        GameRegistry.registerItem(glassShard, "glassShard");
        GameRegistry.registerItem(upgrade, "upgrade");
        
        
        
        LanguageRegistry.addName(carbonBattery, "Small Power Cell");
        LanguageRegistry.addName(carbonFiberCloth, "Carbon Fiber Polymer");
        LanguageRegistry.addName(ironFragments, "Iron Fragemnts");
        LanguageRegistry.addName(goldFragments, "Gold Fragments");
        LanguageRegistry.addName(titaniumFragments, "Titanium Fragments");
        LanguageRegistry.addName(aluminumFragments, "Aluminum Fragments");
        LanguageRegistry.addName(aluminumIngots, "Aluminum Ingots");
        LanguageRegistry.addName(titaniumIngots, "Titanium Ingots");
        LanguageRegistry.addName(CFPPlate, "CFP Plate");
        LanguageRegistry.addName(CFPRod, "CFP Rod");
        LanguageRegistry.addName(carbontaniumCloth, "Carbontaium Cloth");
        LanguageRegistry.addName(CTPlate, "CT Plate");
        LanguageRegistry.addName(CTRod, "CT Rod");
        LanguageRegistry.addName(coalDust, "Coal Dust");
        LanguageRegistry.addName(CFPSword, "CFP Sword");
        LanguageRegistry.addName(CFPAxe, "CFP Axe");
        LanguageRegistry.addName(CFPPickaxe, "CFP Pickaxe");
        LanguageRegistry.addName(CFPShovel, "CFP Shovel");
        LanguageRegistry.addName(CFPHoe, "CFP Hoe");
        LanguageRegistry.addName(CTSword, "CT Sword");
        LanguageRegistry.addName(CTAxe, "CT Axe");
        LanguageRegistry.addName(CTPickaxe, "CT Pickaxe");
        LanguageRegistry.addName(CTShovel, "CT Shovel");
        LanguageRegistry.addName(CTHoe, "CT Hoe");
        LanguageRegistry.addName(denseCoal, "Dense Coal");
        LanguageRegistry.addName(carbonFuel, "Carbon Fuel");
        LanguageRegistry.addName(carbonStrand, "Carbon Strand");
        LanguageRegistry.addName(carbontaniumStrand, "Carbontanium Strand");
        LanguageRegistry.addName(airCell, "Air Cell");
        LanguageRegistry.addName(waterCell, "Water Cell");
        LanguageRegistry.addName(smallPowerCore, "Small Power Core");
        LanguageRegistry.addName(mediumPowerCore, "Medium Power Core");
        LanguageRegistry.addName(largePowerCore, "Large Power Core");
        LanguageRegistry.addName(mediumPowerCell, "Medium Power Cell");
        LanguageRegistry.addName(cell, "Cell");
        LanguageRegistry.addName(glassShard, "Glass Shard");
        LanguageRegistry.addName(upgrade, "Increased Speed Upgrade");
        
        /**Register Recipes*/
        ItemStack carbonplate = new ItemStack(SuperNova.CFPPlate);
        ItemStack tcarbonplate = new ItemStack(SuperNova.CTPlate);
        ItemStack carbonrod = new ItemStack(SuperNova.CFPRod);
        ItemStack tcarbonrod = new ItemStack(SuperNova.CTRod);
        ItemStack carbonpick = new ItemStack(SuperNova.CFPPickaxe);
        ItemStack carbonshovel = new ItemStack(SuperNova.CFPShovel);
        ItemStack carbonhoe = new ItemStack(SuperNova.CFPHoe);
        ItemStack carbonaxe = new ItemStack(SuperNova.CFPAxe);
        ItemStack carbonsword = new ItemStack(SuperNova.CFPSword);
        ItemStack tcarbonsword = new ItemStack(SuperNova.CTSword);
        ItemStack tcarbonaxe = new ItemStack(SuperNova.CTAxe);
        ItemStack tcarbonpickaxe = new ItemStack(SuperNova.CTPickaxe);
        ItemStack tcarbonhoe = new ItemStack(SuperNova.CTHoe);
        ItemStack tcarbonshovel = new ItemStack(SuperNova.CTShovel);
        ItemStack carboncloth = new ItemStack(SuperNova.carbonFiberCloth);
        ItemStack tcarboncloth = new ItemStack(SuperNova.carbontaniumCloth);
        ItemStack CarbonStrand = new ItemStack(SuperNova.carbonStrand);
        ItemStack carbontaniumStrand = new ItemStack(SuperNova.carbontaniumStrand);
        ItemStack aluminumingot = new ItemStack(SuperNova.aluminumIngots);
        ItemStack smallpowercore = new ItemStack(SuperNova.smallPowerCore);
        ItemStack mediumpowercore = new ItemStack(SuperNova.mediumPowerCore);
        ItemStack largepowercore = new ItemStack(SuperNova.largePowerCore);
        
        /**Ore Dictionary*/
        OreDictionary.registerOre("oreDenseCoal", denseCoal);
        OreDictionary.registerOre("oreAluminum", aluminum);
        OreDictionary.registerOre("oreTitanium", titanium);
        OreDictionary.registerOre("ingotAluminum", aluminumIngots);
        OreDictionary.registerOre("ingotTitanium", titaniumIngots);
        
        
        GameRegistry.addRecipe(carbonpick, "XXX", " Y ", " Y ", 'X', carbonplate, 'Y', carbonrod);
        GameRegistry.addRecipe(carbonshovel, " X ", " Y ", " Y ", 'X', carbonplate, 'Y', carbonrod);
        GameRegistry.addRecipe(carbonaxe, " XX", " YX", " Y ", 'X', carbonplate, 'Y', carbonrod);
        GameRegistry.addRecipe(carbonaxe, "XX ", "XY ", " Y ", 'X', carbonplate, 'Y', carbonrod);
        GameRegistry.addRecipe(carbonhoe, " XX", " Y ", " Y ", 'X', carbonplate, 'Y', carbonrod);
        GameRegistry.addRecipe(carbonhoe, "XX ", " Y ", " Y ", 'X', carbonplate, 'Y', carbonrod);
        GameRegistry.addRecipe(carbonsword, " X ", " X ", " Y ", 'X', carbonplate, 'Y', carbonrod);
        GameRegistry.addRecipe(tcarbonsword, " X ", " X ", " Y ", 'X', tcarbonplate, 'Y', tcarbonrod);
        GameRegistry.addRecipe(tcarbonaxe, "XX ", "XY ", " Y ", 'X', tcarbonplate, 'Y', tcarbonrod);
        GameRegistry.addRecipe(tcarbonaxe, " XX", " YX", " Y ", 'X', tcarbonplate, 'Y', tcarbonrod);
        GameRegistry.addRecipe(tcarbonpickaxe, "XXX", " Y ", " Y ", 'X', tcarbonplate, 'Y', tcarbonrod);
        GameRegistry.addRecipe(carbonplate, "XXX", "XXX", "XXX", 'X', carboncloth);
        GameRegistry.addRecipe(tcarbonplate, "XXX", "XXX", "XXX", 'X', tcarboncloth);
        GameRegistry.addRecipe(carbonrod, " X ", " X ", " X ", 'X', carboncloth);
        GameRegistry.addRecipe(carbonrod, "X  ", "X  ", "X  ", 'X', carboncloth);
        GameRegistry.addRecipe(carbonrod, "  X", "  X", "  X", 'X', carboncloth);
        GameRegistry.addRecipe(tcarbonrod, "  X", "  X", "  X", 'X', tcarboncloth);
        GameRegistry.addRecipe(tcarbonrod, " X ", " X ", " X ", 'X', tcarboncloth);
        GameRegistry.addRecipe(tcarbonrod, "X  ", "X  ", "X  ", 'X', tcarboncloth);
        GameRegistry.addRecipe(tcarboncloth, "XXX", "XXX", "XXX", 'X', carbontaniumStrand);
        GameRegistry.addRecipe(carboncloth, "XXX", "XXX", "XXX", 'X', CarbonStrand);
        GameRegistry.addRecipe(smallpowercore, "XXX", "XYX", "XXX", 'X', new ItemStack(SuperNova.titaniumIngots), 'Y', new ItemStack(Block.blockRedstone) );
        GameRegistry.addRecipe(mediumpowercore, "XYX", "YXY", "XYX", 'X', titaniumIngots, 'Y', smallpowercore);
        GameRegistry.addRecipe(new ItemStack(carbonGeneratorIdle), new Object[]{"XYX", "RMR", "XYX", 'X', Block.blockIron, 'Y', Block.blockRedstone, 'R', carbonrod, 'M', mediumPowerCore});
        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(carbonBattery, 1, carbonBattery.getMaxDamage()),"RXR", "XYX", "RXR", 'X', "ingotTitanium", 'Y', mediumPowerCore, 'R', Item.redstone));
        GameRegistry.addRecipe(new ItemStack(fragmenterIdle), "PAP", "AXA", "PAP", 'P', Block.pistonBase, 'A', Item.pickaxeIron, 'X', Block.blockRedstone);
        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(mediumPowerCell, 1, mediumPowerCell.getMaxDamage()),"RXR", "XYX", "RXR", 'X', "ingotTitanium", 'Y', largePowerCore, 'R', Item.redstone));
        GameRegistry.addRecipe(new ItemStack(oxidizerIdle), "R R", "CIC", "BBB", 'R', Item.redstone, 'C', SuperNova.cell, 'I', Item.ingotIron, 'B', Block.blockIron);
        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(hydrogenSeperatorIdle), "XAX", "XAX", "YYY", 'X', SuperNova.cell, 'A', "ingotAluminum", 'Y', Item.ingotIron));
        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(carbonWeaverIdle), "RSR", "TTT", "CAC", 'R', Item.redstone, 'S', Item.silk, 'T', "ingotTitanium", 'C', Block.workbench, 'A', Block.anvil));
        GameRegistry.addRecipe(new ItemStack(upgrade), "XDX", "DXD", "XDX", 'X', SuperNova.CFPPlate, 'D', Item.diamond);
        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(cell), " X ", "X X", " X ", 'X', "ingotAluminum"));
        GameRegistry.addShapelessRecipe(new ItemStack(SuperNova.glassShard, 9), Block.glass);
        /**Furnace Recipes*/
        GameRegistry.addSmelting(SuperNova.aluminum.blockID, new ItemStack(aluminumIngots), 0F);
        GameRegistry.addSmelting(SuperNova.titanium.blockID, new ItemStack(titaniumIngots), 0F);
        
    }

    @EventHandler
    public void postInit(FMLPostInitializationEvent event)
    {
        OreRecipes.overrideRecipe(SuperNova.aluminum.blockID, new ItemStack(aluminumFragments), 1F);
        OreRecipes.overrideRecipe(SuperNova.titanium.blockID, new ItemStack(titaniumFragments), 1F);
        OreRecipes.overrideRecipe(Block.oreIron.blockID, new ItemStack(ironFragments), 1F);
        OreRecipes.overrideRecipe(Block.oreGold.blockID, new ItemStack(goldFragments), 1F);
        OreRecipes.overrideRecipe(Block.glass.blockID, new ItemStack(glassShard, 9), 0F);
        HydrogenSeperatorRecipes.overrideRecipe(waterCell.itemID, new ItemStack(airCell), 1F);
    }
}

 

 

Posted

Theses are my declarations.

 
public static int denseCoalOreID;
public static int titaniumOreID;

 

These are the initializers

int denseCoalOre = config.getBlock(Configuration.CATEGORY_BLOCK, "Dense Coal Ore", 500).getInt();
int titaniumOreID = config.getBlock(Configuration.CATEGORY_BLOCK, "Titanium Ore ID", 501).getInt();

 

Them being used in the assigning the ID

Block denseCoalOre = new denseCoalOre(denseCoalID, Material.rock); //the rest of the attribute are in its class.
Block titanium = new titanium(titaniumOreID, Material.rock);//same with this one.

 

You misspelled your denseCoreOreID in 2 different places. You got no compile errors because you redeclared the IDs as local variables. Newly declared variable of type int always get a value of 0. And the int value of Block is also 0.

 

You are declaring an entirely new variable every you put a type before a variable name at the beginning of an instruction:

int denseCoalID;
static int denseCoalOre;
int denseCoalOreID = blahBlahBlah;

All of the above represent completely separate and unassociated variables.

 

Posted

damn my fingers always getting in my way... Ok besides my poor typing skills. When ever I go to just make the preInit int titaniumOreID = config.getBlock(Configuration.CATEGORY_BLOCK, "Titanium Ore ID", 501).getInt(); it wont allow me to pass the information to the load Block titanium = new titanium(titaniumOreID, Material.rock); it wont pass even though I see it done in the tutorial. Says it cannot be resolved to variable.

Posted

It's not just the misspellings that have you stymied. You are not referring to the ID you have set up previously to hold the ID:

config.load();
        int titaniumOreID = config.getBlock(Configuration.CATEGORY_BLOCK, "Titanium Ore ID", 501).getInt();

Here you are assigning the ID to a completely separate variable. Not the class variable you set up here:

public static CreativeTabs tabSupernova = new CreativeTabs("supernova")
    {
        @SideOnly(Side.CLIENT)
        public int getTabIconItemIndex()
        {
            return SuperNova.oxidizerIdle.blockID;
        }
    };
    
    public static int titaniumOreID;

 

The first variable above is a method local variable. It is not visible and doesn't even exist outside the Preinit method. The second variable above is a class variable. It exists forever. It was never used or initialized in your code. Two separate variable with the same name, but different scopes. It might help you to learn java programming before delving too deeply into modding.

Posted

I understand the difference between a local and global variable. Which is why I'm getting so confused. I can send you a old part of this code that works fine and have everything defined but but lets say I went back to the way this use to be and got rid of all the dupes that I've put in trying to understand the confusion here. The tutorial i am following calls for the

int titaniumOreID = config.getBlock(Configuration.CATEGORY_BLOCK, "Titanium Ore ID", 501).getInt();

 

as is, it doesn't have the

public static int titaniumOreID;

above the class, which how all mine were defined. Old Code http://pastebin.com/X8csMtLj

 

But the confusion came when preInit class defines all the int titaniumOreID = config.getBlock and then passes it to the load class in the tutorial. Isn't that defined variable local to the preInit and won't be seen by the load class. Yet I'm looking at the tutorial do it and when I go to do it gives me the exact syntax error I would expect to get.

Posted

I'd use config.get instead of config.getBlock. It has the same parameters and you can just add it to the category CATEGORY_BLOCK in it. And I'd use your

 

public static int titaniumOreID;

 

because then it's static and can be used by other classes and methods.

 

Oh and don't add

 

int

 

before "titaniumOreID" when you define it. That should work and have no syntax errors then.

 

Hope that helped!

 

 

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
Posted

Is this what you had in mind?

 

 

package bigbaddevil7.supernova;

import bigbaddevil7.supernova.blocks.*;
import bigbaddevil7.supernova.crafting.HydrogenSeperatorRecipes;
import bigbaddevil7.supernova.crafting.OreRecipes;
import bigbaddevil7.supernova.crafting.OxidizerRecipes;
import bigbaddevil7.supernova.event.EventManager;
import bigbaddevil7.supernova.gui.GuiHandler;
import bigbaddevil7.supernova.items.*;
import bigbaddevil7.supernova.renderer.*;
import bigbaddevil7.supernova.tileentity.*;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import net.minecraft.stats.AchievementList;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@Mod(modid = SuperNovaInfo.ID, name = SuperNovaInfo.NAME, version = SuperNovaInfo.VERSION)
@NetworkMod(clientSideRequired = true, serverSideRequired = false)

public class SuperNova
{
    /**Gui Id for the the oxidizer*/
    public static final int guiIdOxidizer = 0;
    public static final int guiIdFragmenter = 1;
    public static final int guiIdCarbonGenerator = 2;
    public static final int guiIdHydrogenSeperator = 3;
    public static final int guiIdCarbonWeaver = 4;

    /**Event Managers*/
    EventManager oreManager = new EventManager();

    /**Register guiHandler*/
    GuiHandler guiHandler = new GuiHandler();

    /**Custom Creative Tabs*/
    public static CreativeTabs tabSupernova = new CreativeTabs("supernova")
    {
        @SideOnly(Side.CLIENT)
        public int getTabIconItemIndex()
        {
            return SuperNova.oxidizerIdle.blockID;
        }
    };
    
    public static int titaniumOreID;
    public static int aluminumOreID;
    public static int denseCoalOreID;
    public static int oxidizerIdleID;
    public static int oxidizerActiveID;
    public static int fragmenterIdleID;
    public static int fragmenterActiveID;
    public static int carbonGeneratorIdleID;
    public static int carbonGeneratorActiveID;
    public static int hydrogenSeperatorIdleID;
    public static int hydrogenSeperatorActiveID;
    public static int carbonWeaverIdleID;
    public static int carbonWeaverActiveID;
    
    
    public static int carbonFiberClothID;
    public static int carbonStrandID;
    public static int carbontaniumStrandID;
    public static int carbontaniumClothID;
    public static int CFPPlateID;
    public static int CFPRodID;
    public static int CTPlateID;
    public static int CTRodID;
    public static int CFPSwordID;
    public static int CFPAxeID;
    public static int CFPPickaxeID;
    public static int CFPShovelID;
    public static int CFPHoeID;
    public static int CTSwordID;
    public static int CTAxeID;
    public static int CTPickaxeID;
    public static int CTShovelID;
    public static int CTHoeID;
    public static int ironFragmentsID;
    public static int goldFragmentsID;
    public static int titaniumFragmentsID;
    public static int aluminumFragmentsID;
    public static int coalDustID;
    public static int aluminumIngotsID;
    public static int titaniumIngotsID;
    public static int denseCoalID;
    public static int carbonFuelID;
    public static int carbonBatteryID;
    public static int mediumPowerCellID;
    public static int cellID;
    public static int airCellID;
    public static int waterCellID;
    public static int smallPowerCoreID;
    public static int mediumPowerCoreID;
    public static int largePowerCoreID;
    public static int glassShardID;
    public static int upgradeID;
    

    /**Custom Blocks*/
    public static Block denseCoalOre;
    public static Block titanium;
    public static Block aluminum;
    public static Block oxidizerIdle;
    public static Block oxidizerActive;
    public static Block fragmenterIdle;
    public static Block fragmenterActive; 
    public static Block carbonGeneratorIdle;
    public static Block carbonGeneratorActive;
    public static Block hydrogenSeperatorIdle; 
    public static Block hydrogenSeperatorActive; 
    public static Block carbonWeaverIdle; 
    public static Block carbonWeaverActive; 
    
    /**Custom Materials*/
    public static EnumToolMaterial CFP = EnumHelper.addToolMaterial("CFP", 3, 1600, 11.0F, 6.0F, 10);
    public static EnumToolMaterial CT = EnumHelper.addToolMaterial("CT", 3, 1800, 13.0F, 8.0F, 7);

    /**Custom Items*/
    public static Item carbonFiberCloth;
    public static Item CFPSword;
    public static Item CFPAxe;
    public static Item CFPPickaxe;
    public static Item CFPShovel;
    public static Item CFPHoe;
    public static Item CTSword;
    public static Item CTAxe;
    public static Item CTPickaxe;
    public static Item CTShovel;
    public static Item CTHoe;
    public static Item ironFragments;
    public static Item goldFragments;
    public static Item titaniumFragments;
    public static Item aluminumFragments;
    public static Item coalDust; 
    public static Item aluminumIngots; 
    public static Item CFPPlate;
    public static Item CFPRod;
    public static Item carbontaniumCloth;
    public static Item CTPlate;
    public static Item CTRod; 
    public static Item denseCoal;
    public static Item carbonFuel;
    public static Item carbontaniumStrand;
    public static Item carbonStrand;
    public static Item titaniumIngots; 
    public static Item carbonBattery;
    public static Item airCell; 
    public static Item waterCell;
    public static Item smallPowerCore;
    public static Item mediumPowerCore;
    public static Item largePowerCore; 
    public static Item mediumPowerCell;
    public static Item cell; 
    public static Item glassShard; 
    public static Item upgrade;
    
    
    // The instance of your mod that Forge uses.
    @Instance("SuperNova")
    public static SuperNova instance;

    // Says where the client and server 'proxy' code is loaded.
    @SidedProxy(clientSide = SuperNovaInfo.CLIENTPROXY + "ClientProxy", serverSide = SuperNovaInfo.COMMONPROXY + "CommonProxy")
    public static CommonProxy proxy;

    @EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
        Configuration config = new Configuration(event.getSuggestedConfigurationFile());
        
        config.load();
        titaniumOreID = config.get(Configuration.CATEGORY_BLOCK, "Titanium Ore ID", 550).getInt();
        aluminumOreID = config.get(Configuration.CATEGORY_BLOCK, "Aluminum Ore ID", 502).getInt();
        denseCoalOreID = config.get(Configuration.CATEGORY_BLOCK, "Dense Coal Ore", 500).getInt();
        oxidizerIdleID = config.get(Configuration.CATEGORY_BLOCK, "Oxidizer Idle ID", 600).getInt();
        oxidizerActiveID = config.get(Configuration.CATEGORY_BLOCK, "Oxidixer Active ID", 601).getInt();
        fragmenterIdleID = config.get(Configuration.CATEGORY_BLOCK, "Fragmenter Idle ID", 602).getInt();
        fragmenterActiveID = config.get(Configuration.CATEGORY_BLOCK, "Fragmenter Active ID", 603).getInt();
        carbonGeneratorIdleID = config.get(Configuration.CATEGORY_BLOCK, "Carbon Generator Idle ID", 604).getInt();
        carbonGeneratorActiveID = config.get(Configuration.CATEGORY_BLOCK, "Carbon Generator Active ID", 605).getInt();
        hydrogenSeperatorIdleID = config.get(Configuration.CATEGORY_BLOCK, "Hydrogen Seperator Idle ID", 606).getInt();
        hydrogenSeperatorActiveID = config.get(Configuration.CATEGORY_BLOCK, "Hydrogen Seperator Active ID", 607).getInt();
        carbonWeaverIdleID = config.get(Configuration.CATEGORY_BLOCK, "Carbon Weaver Idle ID", 608).getInt();
        carbonWeaverActiveID = config.get(Configuration.CATEGORY_BLOCK, "Carbon Weaver Active ID", 609).getInt();
        
        
        carbonFiberClothID = config.getItem(Configuration.CATEGORY_ITEM, "Carbon Fiber Cloth ID", 5001).getInt();
        carbonStrandID = config.getItem(Configuration.CATEGORY_ITEM, "Carbon Strand ID", 5024).getInt();
        carbontaniumStrandID = config.getItem(Configuration.CATEGORY_ITEM, "Carbontanium Strand ID", 5025).getInt();
        carbontaniumClothID = config.getItem(Configuration.CATEGORY_ITEM, "Carbontainum Cloth ID", 5019).getInt();
        CFPPlateID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Plate ID", 5020).getInt();
        CFPRodID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Rod ID", 5021).getInt();
        CTPlateID = config.getItem(Configuration.CATEGORY_ITEM, "CT Plate ID", 5022).getInt();
        CTRodID = config.getItem(Configuration.CATEGORY_ITEM, "CT Rod ID", 5023).getInt();
        CFPSwordID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Sword ID", 5002).getInt();
        CFPAxeID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Axe ID", 5003).getInt();
        CFPPickaxeID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Pickaxe ID", 5004).getInt();
        CFPShovelID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Shovel ID", 5005).getInt();
        CFPHoeID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Hoe ID", 5006).getInt();
        CTSwordID = config.getItem(Configuration.CATEGORY_ITEM, "CT Sword ID", 5007).getInt();
        CTAxeID = config.getItem(Configuration.CATEGORY_ITEM, "CT Axe ID", 5008).getInt();
        CTPickaxeID = config.getItem(Configuration.CATEGORY_ITEM, "CT Pickaxe ID", 5009).getInt();
        CTShovelID = config.getItem(Configuration.CATEGORY_ITEM, "CT Shovel ID", 5010).getInt();
        CTHoeID = config.getItem(Configuration.CATEGORY_ITEM, "CT Hoe ID", 5011).getInt();
        ironFragmentsID = config.getItem(Configuration.CATEGORY_ITEM, "Iron Fragments ID", 5012).getInt();
        goldFragmentsID = config.getItem(Configuration.CATEGORY_ITEM, "Gold Fragments ID", 5013).getInt();
        titaniumFragmentsID = config.getItem(Configuration.CATEGORY_ITEM, "Titnium Fragments ID", 5014).getInt();
        aluminumFragmentsID = config.getItem(Configuration.CATEGORY_ITEM, "Aluminum Fragments ID", 5015).getInt();
        coalDustID = config.getItem(Configuration.CATEGORY_ITEM, "Coal Dust ID", 5016).getInt();
        aluminumIngotsID = config.getItem(Configuration.CATEGORY_ITEM, "Aluminum Ingot ID", 5017).getInt();
        titaniumIngotsID = config.getItem(Configuration.CATEGORY_ITEM, "Titanium Ingot ID", 5018).getInt();
        denseCoalID = config.getItem(Configuration.CATEGORY_ITEM, "Dense Coal ID", 5026).getInt();
        carbonFuelID = config.getItem(Configuration.CATEGORY_ITEM, "Carbon Fuel ID", 5027).getInt();
        carbonBatteryID = config.getItem(Configuration.CATEGORY_ITEM, "Small Power Cell ID", 5028).getInt();
        mediumPowerCellID = config.getItem(Configuration.CATEGORY_ITEM, "Medium Power Cell ID", 5029).getInt();
        cellID = config.getItem(Configuration.CATEGORY_ITEM, "Cell ID", 5030).getInt();
        airCellID = config.getItem(Configuration.CATEGORY_ITEM, "Air Cell ID", 5031).getInt();
        waterCellID = config.getItem(Configuration.CATEGORY_ITEM, "Water Cell ID", 5032).getInt();
        smallPowerCoreID = config.getItem(Configuration.CATEGORY_ITEM, "Small Power Core ID", 5033).getInt();
        mediumPowerCoreID = config.getItem(Configuration.CATEGORY_ITEM, "Medium Power Core ID", 5034).getInt();
        largePowerCoreID = config.getItem(Configuration.CATEGORY_ITEM, "Large Power Core ID", 5035).getInt();
        glassShardID = config.getItem(Configuration.CATEGORY_ITEM, "Glass Shard ID", 5035).getInt();
        upgradeID = config.getItem(Configuration.CATEGORY_ITEM, "Upgrade ID", 5036).getInt();
        
        
        
        
        config.save();
        
        //proxy.registerRenderers();
    }

    @EventHandler
    public void load(FMLInitializationEvent event)
    {
        
        
        
        /**Custom Blocks*/
         Block denseCoalOre = (new denseCoalOre(denseCoalOreID, Material.rock));
         Block titanium = new titanium(titaniumOreID, Material.rock);
         Block aluminum =  new aluminum(aluminumOreID, Material.rock);
         Block oxidizerIdle = new Oxidizer(oxidizerIdleID, false).setUnlocalizedName("oxidizerIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
         Block oxidizerActive = new Oxidizer(oxidizerActiveID, true).setUnlocalizedName("oxidizerActive").setHardness(3.5F);
         Block fragmenterIdle = new Fragmenter(fragmenterIdleID, false).setUnlocalizedName("fragementerIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
         Block fragmenterActive = new Fragmenter(fragmenterActiveID, true).setUnlocalizedName("fragementerActive").setHardness(3.5F);
         Block carbonGeneratorIdle = new CarbonGenerator(carbonGeneratorIdleID, false).setUnlocalizedName("carbonGeneratorIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
         Block carbonGeneratorActive = new CarbonGenerator(carbonGeneratorActiveID, true).setUnlocalizedName("carbonGeneratorActive").setHardness(3.5F);
         Block hydrogenSeperatorIdle = new HydrogenSeperator(hydrogenSeperatorIdleID, false).setUnlocalizedName("hydrogenSeperatorIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
         Block hydrogenSeperatorActive = new HydrogenSeperator(hydrogenSeperatorActiveID, true).setUnlocalizedName("hydrogenSeperatorActive").setHardness(3.5F);
         Block carbonWeaverIdle = new CarbonWeaver(carbonWeaverIdleID, false).setUnlocalizedName("carbonWeaverIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
         Block carbonWeaverActive = new CarbonWeaver(carbonWeaverActiveID, true).setUnlocalizedName("carbonweaverActive").setHardness(3.5F);
        
        /**Custom Materials*/
         EnumToolMaterial CFP = EnumHelper.addToolMaterial("CFP", 3, 1600, 11.0F, 6.0F, 10);
         EnumToolMaterial CT = EnumHelper.addToolMaterial("CT", 3, 1800, 13.0F, 8.0F, 7);

       
	/**Custom Items*/
        carbonFiberCloth = new carbonFiberCloth(carbonFiberClothID);
        CFPSword = new CFPSword(CFPSwordID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPSword").setTextureName("supernova:cfpsword");
        CFPAxe = new CFPAxe(CFPAxeID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPAxe").setTextureName("supernova:cfpaxe");
        CFPPickaxe = new CFPPickaxe(CFPPickaxeID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPPickaxe").setTextureName("supernova:cfppickaxe");
        CFPShovel = new CFPShovel(CFPShovelID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPShovel").setTextureName("supernova:cfpshovel");
        CFPHoe = new CFPHoe(CFPHoeID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPHoe").setTextureName("supernova:cfphoe");
        CTSword = new CTSword(CTSwordID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTSword").setTextureName("supernova:ctsword");
        CTAxe = new CTAxe(CTAxeID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTAxe").setTextureName("supernova:ctaxe");
        CTPickaxe = new CTPickaxe(CTPickaxeID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTPickaxe").setTextureName("supernova:ctpickaxe");
        CTShovel = new CTShovel(CTShovelID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTShovel").setTextureName("supernova:ctshovel");
        CTHoe = new CTHoe(CTHoeID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTHoe").setTextureName("supernova:cthoe");
        ironFragments = new ironFragments(ironFragmentsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("ironfragments").setTextureName("supernova:ironfragments");
        goldFragments = new goldFragments(goldFragmentsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("goldFragemnts").setTextureName("supernova:goldfragments");
        titaniumFragments = new titaniumFragments(titaniumFragmentsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("titaniumFragments").setTextureName("supernova:titaniumfragments");
        aluminumFragments = new aluminumFragments(aluminumFragmentsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("aluminumFragments").setTextureName("supernova:aluminumfragments");
        coalDust = new coalDust(coalDustID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("coalDust").setTextureName("supernova:coaldust");
        aluminumIngots = new aluminumIngot(aluminumIngotsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("aluminumIngots").setTextureName("supernova:aluminumingot");
        CFPPlate = new CFPPlate(CFPPlateID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPPlate").setTextureName("supernova:cfpplate");
        CFPRod = new CFPRod(CFPRodID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPRod").setTextureName("supernova:cfprod");
        carbontaniumCloth = new carbontaniumCloth(carbontaniumClothID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbontaniumCloth").setTextureName("supernova:carbontaniumcloth");
        CTPlate = new CTPlate(CTPlateID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTPlate").setTextureName("supernova:ctplate");
        CTRod = new CTRod(CTRodID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTRod").setTextureName("supernova:ctrod");
        denseCoal = new densecoal(denseCoalID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("densecoal").setTextureName("supernova:densecoal");
        carbonFuel = new CarbonFuel(carbonFuelID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbonfuel").setTextureName("supernova:carbonfuel");
        carbontaniumStrand = new CarbontainumStrand(carbontaniumStrandID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbontainumstrand").setTextureName("supernova:tcarbonstrand");
        carbonStrand = new CarbonStrand(carbonStrandID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbonstrand").setTextureName("supernova:carbonstrand");
        titaniumIngots = new titaniumIngot(titaniumIngotsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("titaniumIngots").setTextureName("supernova:titaniumingot");
        carbonBattery = new CarbonBattery(carbonBatteryID, 1000).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbonBattery").setTextureName("supernova:battery");
        airCell = new AirCell(airCellID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("aircell").setTextureName("supernova:aircell");
        waterCell = new WaterCell(waterCellID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("watercell").setTextureName("supernova:watercell");
        smallPowerCore = new SmallPowerCore(smallPowerCoreID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("smallpowercore").setTextureName("supernova:smallpowercore");
        mediumPowerCore = new MediumPowerCore(mediumPowerCoreID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("mediumpowercore").setTextureName("supernova:mediumpowercore");
        largePowerCore = new LargePowerCore(largePowerCoreID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("largepowercore").setTextureName("supernova:largepowercore");
        mediumPowerCell = new MediumPowerCell(mediumPowerCellID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("mediumPowerCell").setTextureName("supernova:mediumpowercell");
        cell = new Cell(cellID).setCreativeTab(tabSupernova).setUnlocalizedName("cell").setTextureName("supernova:cell");
        glassShard = new GlassShard(glassShardID).setCreativeTab(tabSupernova).setUnlocalizedName("glassshard").setTextureName("supernova:glassshard");
        upgrade = new Upgrade(upgradeID).setCreativeTab(tabSupernova).setUnlocalizedName("upgrade").setTextureName("supernova:upgrade");
        
        
        
        LanguageRegistry.instance().addStringLocalization(tabSupernova.getTranslatedTabLabel(), "SuperNova");
        /**Register Tile Entity*/
        GameRegistry.registerTileEntity(TileEntityOxidizer.class, "oxidizer");
        GameRegistry.registerTileEntity(TileEntityFragmenter.class, "fragmenter");
        GameRegistry.registerTileEntity(TileEntityCarbonGenerator.class, "carbonGenerator");
        GameRegistry.registerTileEntity(TileEntityHydrogenSeperator.class, "hydrogenseperator");
        GameRegistry.registerTileEntity(TileEntityCarbonWeaver.class, "carbonWeaver");
        
        
        
        /**Register Renderer*/
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityOxidizer.class, new RendererOxidizer());
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCarbonGenerator.class, new RendererCarbonGenerator());
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHydrogenSeperator.class, new RendererHydrogenSeperator());
        
        /**Network Register*/
        NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler());
        
        
        /**Gui Language Registry*/
        LanguageRegistry.instance().addStringLocalization("container.oxidizer", "Oxidizer");
        LanguageRegistry.instance().addStringLocalization("container.fragmenter", "Fragmenter");
        LanguageRegistry.instance().addStringLocalization("container.carbonGenerator", "Carbon Generator");
        /**Register Generators*/
        GameRegistry.registerWorldGenerator(oreManager);
        /**Register Blocks*/
        GameRegistry.registerBlock(denseCoalOre, "denseCoalOre");
        GameRegistry.registerBlock(aluminum, "aluminum");
        GameRegistry.registerBlock(titanium, "titanium");
        GameRegistry.registerBlock(oxidizerIdle, "oxidizerIdle");
        GameRegistry.registerBlock(oxidizerActive, "oxidizerActive");
        GameRegistry.registerBlock(fragmenterIdle, "fragmenterIdle");
        GameRegistry.registerBlock(fragmenterActive, "fragmenterActive");
        GameRegistry.registerBlock(carbonGeneratorActive, "carbonGeneratorActive");
        GameRegistry.registerBlock(carbonGeneratorIdle, "carbonGeneratorIdle");
        GameRegistry.registerBlock(hydrogenSeperatorActive, "hydrogenSeperatorActive");
        GameRegistry.registerBlock(hydrogenSeperatorIdle, "hydrogenSeperatorIdle");
        GameRegistry.registerBlock(carbonWeaverActive, "carbonWeaverActive");
        GameRegistry.registerBlock(carbonWeaverIdle, "carbonWeaverIdle");
        
        
        LanguageRegistry.addName(denseCoalOre, "Dense Coal Ore");
        LanguageRegistry.addName(aluminum, "Aluminum");
        LanguageRegistry.addName(titanium, "Titanium");
        LanguageRegistry.addName(oxidizerIdle, "Oxidizer");
        LanguageRegistry.addName(fragmenterIdle, "Fragmentalizer");
        LanguageRegistry.addName(fragmenterActive, "FragmentalizerActive");
        LanguageRegistry.addName(carbonGeneratorIdle, "Carbon Generator");
        LanguageRegistry.addName(hydrogenSeperatorIdle, "Hydrogen Seperator");
        LanguageRegistry.addName(carbonWeaverIdle, "Carbon Weaver");
        
        
        /**Set Harvest Level*/
        MinecraftForge.setBlockHarvestLevel(aluminum, "pickaxe", 2);
        MinecraftForge.setBlockHarvestLevel(denseCoalOre, "pickaxe", 2);
        MinecraftForge.setBlockHarvestLevel(titanium, "pickaxe", 2);
        
        
        
        /**Registering Custom Items*/
        GameRegistry.registerItem(carbonFiberCloth, "carbonFiberCloth");
        GameRegistry.registerItem(ironFragments, "ironFragments");
        GameRegistry.registerItem(goldFragments, "goldFragments");
        GameRegistry.registerItem(titaniumFragments, "titaniumFragments");
        GameRegistry.registerItem(aluminumFragments, "aluminumFragments");
        GameRegistry.registerItem(aluminumIngots, "aluminumIngots");
        GameRegistry.registerItem(titaniumIngots, "titaniumIngots");
        GameRegistry.registerItem(CFPPlate, "CFPPlates");
        GameRegistry.registerItem(CFPRod, "CFPRod");
        GameRegistry.registerItem(carbontaniumCloth, "carbontaniumCloth");
        GameRegistry.registerItem(CTPlate, "CTPlate");
        GameRegistry.registerItem(CTRod, "CTRod");
        GameRegistry.registerItem(coalDust, "coalDust");
        GameRegistry.registerItem(CFPSword, "CFPSword");
        GameRegistry.registerItem(CFPAxe, "CFPAxe");
        GameRegistry.registerItem(CFPPickaxe, "CFPPickaxe");
        GameRegistry.registerItem(CFPShovel, "CFPShovel");
        GameRegistry.registerItem(CFPHoe, "CFPHoe");
        GameRegistry.registerItem(CTSword, "CTSword");
        GameRegistry.registerItem(CTAxe, "CTAxe");
        GameRegistry.registerItem(CTPickaxe, "CTPickaxe");
        GameRegistry.registerItem(CTShovel, "CTShovel");
        GameRegistry.registerItem(CTHoe, "CTHoe");
        GameRegistry.registerItem(denseCoal, "densecoal");
        GameRegistry.registerItem(carbonFuel, "carbonFuel");
        GameRegistry.registerItem(carbontaniumStrand, "carbontaniumStrand");
        GameRegistry.registerItem(carbonStrand, "carbonStrand");
        GameRegistry.registerItem(carbonBattery, "carbonBattery");
        GameRegistry.registerItem(airCell, "airCell");
        GameRegistry.registerItem(waterCell, "waterCell");
        GameRegistry.registerItem(smallPowerCore, "smallPowerCore");
        GameRegistry.registerItem(mediumPowerCore, "mediumPowerCore");
        GameRegistry.registerItem(largePowerCore, "largePowerCore");
        GameRegistry.registerItem(mediumPowerCell, "mediumPowerCell");
        GameRegistry.registerItem(cell, "cell");
        GameRegistry.registerItem(glassShard, "glassShard");
        GameRegistry.registerItem(upgrade, "upgrade");
        
        
        
        LanguageRegistry.addName(carbonBattery, "Small Power Cell");
        LanguageRegistry.addName(carbonFiberCloth, "Carbon Fiber Polymer");
        LanguageRegistry.addName(ironFragments, "Iron Fragemnts");
        LanguageRegistry.addName(goldFragments, "Gold Fragments");
        LanguageRegistry.addName(titaniumFragments, "Titanium Fragments");
        LanguageRegistry.addName(aluminumFragments, "Aluminum Fragments");
        LanguageRegistry.addName(aluminumIngots, "Aluminum Ingots");
        LanguageRegistry.addName(titaniumIngots, "Titanium Ingots");
        LanguageRegistry.addName(CFPPlate, "CFP Plate");
        LanguageRegistry.addName(CFPRod, "CFP Rod");
        LanguageRegistry.addName(carbontaniumCloth, "Carbontaium Cloth");
        LanguageRegistry.addName(CTPlate, "CT Plate");
        LanguageRegistry.addName(CTRod, "CT Rod");
        LanguageRegistry.addName(coalDust, "Coal Dust");
        LanguageRegistry.addName(CFPSword, "CFP Sword");
        LanguageRegistry.addName(CFPAxe, "CFP Axe");
        LanguageRegistry.addName(CFPPickaxe, "CFP Pickaxe");
        LanguageRegistry.addName(CFPShovel, "CFP Shovel");
        LanguageRegistry.addName(CFPHoe, "CFP Hoe");
        LanguageRegistry.addName(CTSword, "CT Sword");
        LanguageRegistry.addName(CTAxe, "CT Axe");
        LanguageRegistry.addName(CTPickaxe, "CT Pickaxe");
        LanguageRegistry.addName(CTShovel, "CT Shovel");
        LanguageRegistry.addName(CTHoe, "CT Hoe");
        LanguageRegistry.addName(denseCoal, "Dense Coal");
        LanguageRegistry.addName(carbonFuel, "Carbon Fuel");
        LanguageRegistry.addName(carbonStrand, "Carbon Strand");
        LanguageRegistry.addName(carbontaniumStrand, "Carbontanium Strand");
        LanguageRegistry.addName(airCell, "Air Cell");
        LanguageRegistry.addName(waterCell, "Water Cell");
        LanguageRegistry.addName(smallPowerCore, "Small Power Core");
        LanguageRegistry.addName(mediumPowerCore, "Medium Power Core");
        LanguageRegistry.addName(largePowerCore, "Large Power Core");
        LanguageRegistry.addName(mediumPowerCell, "Medium Power Cell");
        LanguageRegistry.addName(cell, "Cell");
        LanguageRegistry.addName(glassShard, "Glass Shard");
        LanguageRegistry.addName(upgrade, "Increased Speed Upgrade");
        
        /**Register Recipes*/
        ItemStack carbonplate = new ItemStack(SuperNova.CFPPlate);
        ItemStack tcarbonplate = new ItemStack(SuperNova.CTPlate);
        ItemStack carbonrod = new ItemStack(SuperNova.CFPRod);
        ItemStack tcarbonrod = new ItemStack(SuperNova.CTRod);
        ItemStack carbonpick = new ItemStack(SuperNova.CFPPickaxe);
        ItemStack carbonshovel = new ItemStack(SuperNova.CFPShovel);
        ItemStack carbonhoe = new ItemStack(SuperNova.CFPHoe);
        ItemStack carbonaxe = new ItemStack(SuperNova.CFPAxe);
        ItemStack carbonsword = new ItemStack(SuperNova.CFPSword);
        ItemStack tcarbonsword = new ItemStack(SuperNova.CTSword);
        ItemStack tcarbonaxe = new ItemStack(SuperNova.CTAxe);
        ItemStack tcarbonpickaxe = new ItemStack(SuperNova.CTPickaxe);
        ItemStack tcarbonhoe = new ItemStack(SuperNova.CTHoe);
        ItemStack tcarbonshovel = new ItemStack(SuperNova.CTShovel);
        ItemStack carboncloth = new ItemStack(SuperNova.carbonFiberCloth);
        ItemStack tcarboncloth = new ItemStack(SuperNova.carbontaniumCloth);
        ItemStack CarbonStrand = new ItemStack(SuperNova.carbonStrand);
        ItemStack carbontaniumStrand = new ItemStack(SuperNova.carbontaniumStrand);
        ItemStack aluminumingot = new ItemStack(SuperNova.aluminumIngots);
        ItemStack smallpowercore = new ItemStack(SuperNova.smallPowerCore);
        ItemStack mediumpowercore = new ItemStack(SuperNova.mediumPowerCore);
        ItemStack largepowercore = new ItemStack(SuperNova.largePowerCore);
        
        /**Ore Dictionary*/
        OreDictionary.registerOre("oreDenseCoal", denseCoal);
        OreDictionary.registerOre("oreAluminum", aluminum);
        OreDictionary.registerOre("oreTitanium", titanium);
        OreDictionary.registerOre("ingotAluminum", aluminumIngots);
        OreDictionary.registerOre("ingotTitanium", titaniumIngots);
        
        
        GameRegistry.addRecipe(carbonpick, "XXX", " Y ", " Y ", 'X', carbonplate, 'Y', carbonrod);
        GameRegistry.addRecipe(carbonshovel, " X ", " Y ", " Y ", 'X', carbonplate, 'Y', carbonrod);
        GameRegistry.addRecipe(carbonaxe, " XX", " YX", " Y ", 'X', carbonplate, 'Y', carbonrod);
        GameRegistry.addRecipe(carbonaxe, "XX ", "XY ", " Y ", 'X', carbonplate, 'Y', carbonrod);
        GameRegistry.addRecipe(carbonhoe, " XX", " Y ", " Y ", 'X', carbonplate, 'Y', carbonrod);
        GameRegistry.addRecipe(carbonhoe, "XX ", " Y ", " Y ", 'X', carbonplate, 'Y', carbonrod);
        GameRegistry.addRecipe(carbonsword, " X ", " X ", " Y ", 'X', carbonplate, 'Y', carbonrod);
        GameRegistry.addRecipe(tcarbonsword, " X ", " X ", " Y ", 'X', tcarbonplate, 'Y', tcarbonrod);
        GameRegistry.addRecipe(tcarbonaxe, "XX ", "XY ", " Y ", 'X', tcarbonplate, 'Y', tcarbonrod);
        GameRegistry.addRecipe(tcarbonaxe, " XX", " YX", " Y ", 'X', tcarbonplate, 'Y', tcarbonrod);
        GameRegistry.addRecipe(tcarbonpickaxe, "XXX", " Y ", " Y ", 'X', tcarbonplate, 'Y', tcarbonrod);
        GameRegistry.addRecipe(carbonplate, "XXX", "XXX", "XXX", 'X', carboncloth);
        GameRegistry.addRecipe(tcarbonplate, "XXX", "XXX", "XXX", 'X', tcarboncloth);
        GameRegistry.addRecipe(carbonrod, " X ", " X ", " X ", 'X', carboncloth);
        GameRegistry.addRecipe(carbonrod, "X  ", "X  ", "X  ", 'X', carboncloth);
        GameRegistry.addRecipe(carbonrod, "  X", "  X", "  X", 'X', carboncloth);
        GameRegistry.addRecipe(tcarbonrod, "  X", "  X", "  X", 'X', tcarboncloth);
        GameRegistry.addRecipe(tcarbonrod, " X ", " X ", " X ", 'X', tcarboncloth);
        GameRegistry.addRecipe(tcarbonrod, "X  ", "X  ", "X  ", 'X', tcarboncloth);
        GameRegistry.addRecipe(tcarboncloth, "XXX", "XXX", "XXX", 'X', carbontaniumStrand);
        GameRegistry.addRecipe(carboncloth, "XXX", "XXX", "XXX", 'X', CarbonStrand);
        GameRegistry.addRecipe(smallpowercore, "XXX", "XYX", "XXX", 'X', new ItemStack(SuperNova.titaniumIngots), 'Y', new ItemStack(Block.blockRedstone) );
        GameRegistry.addRecipe(mediumpowercore, "XYX", "YXY", "XYX", 'X', titaniumIngots, 'Y', smallpowercore);
        GameRegistry.addRecipe(new ItemStack(carbonGeneratorIdle), new Object[]{"XYX", "RMR", "XYX", 'X', Block.blockIron, 'Y', Block.blockRedstone, 'R', carbonrod, 'M', mediumPowerCore});
        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(carbonBattery, 1, carbonBattery.getMaxDamage()),"RXR", "XYX", "RXR", 'X', "ingotTitanium", 'Y', mediumPowerCore, 'R', Item.redstone));
        GameRegistry.addRecipe(new ItemStack(fragmenterIdle), "PAP", "AXA", "PAP", 'P', Block.pistonBase, 'A', Item.pickaxeIron, 'X', Block.blockRedstone);
        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(mediumPowerCell, 1, mediumPowerCell.getMaxDamage()),"RXR", "XYX", "RXR", 'X', "ingotTitanium", 'Y', largePowerCore, 'R', Item.redstone));
        GameRegistry.addRecipe(new ItemStack(oxidizerIdle), "R R", "CIC", "BBB", 'R', Item.redstone, 'C', SuperNova.cell, 'I', Item.ingotIron, 'B', Block.blockIron);
        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(hydrogenSeperatorIdle), "XAX", "XAX", "YYY", 'X', SuperNova.cell, 'A', "ingotAluminum", 'Y', Item.ingotIron));
        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(carbonWeaverIdle), "RSR", "TTT", "CAC", 'R', Item.redstone, 'S', Item.silk, 'T', "ingotTitanium", 'C', Block.workbench, 'A', Block.anvil));
        GameRegistry.addRecipe(new ItemStack(upgrade), "XDX", "DXD", "XDX", 'X', SuperNova.CFPPlate, 'D', Item.diamond);
        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(cell), " X ", "X X", " X ", 'X', "ingotAluminum"));
        GameRegistry.addShapelessRecipe(new ItemStack(SuperNova.glassShard, 9), Block.glass);
        /**Furnace Recipes*/
        GameRegistry.addSmelting(SuperNova.aluminum.blockID, new ItemStack(aluminumIngots), 0F);
        GameRegistry.addSmelting(SuperNova.titanium.blockID, new ItemStack(titaniumIngots), 0F);
        
    }

    @EventHandler
    public void postInit(FMLPostInitializationEvent event)
    {
        OreRecipes.overrideRecipe(SuperNova.aluminum.blockID, new ItemStack(aluminumFragments), 1F);
        OreRecipes.overrideRecipe(SuperNova.titanium.blockID, new ItemStack(titaniumFragments), 1F);
        OreRecipes.overrideRecipe(Block.oreIron.blockID, new ItemStack(ironFragments), 1F);
        OreRecipes.overrideRecipe(Block.oreGold.blockID, new ItemStack(goldFragments), 1F);
        OreRecipes.overrideRecipe(Block.glass.blockID, new ItemStack(glassShard, 9), 0F);
        HydrogenSeperatorRecipes.overrideRecipe(waterCell.itemID, new ItemStack(airCell), 1F);
    }
}

 

 

It works except for anything that called for a blockID for example my postInit it gives me a null pointer along with anything else that calls for it. Is there something special I have to do for that? I would have thought that the .blockID would have been set to what I gave it in the constructor of the block class. Or is it something else?

Posted

Something is still null. Is there any more information in the crash?

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
Posted

Yes, that style is workable for your purposes.

 

However, you are again declaring local Blocks in your Initialization method. Stop doing that! Do not start the instruction with a type declarator (like "Block ..."). That only creates a new and separate variable that no other method has access to.

 

 

 

@SubscribeEvent
public static void preInit(FMLPreinitializationEvent event) {

    Configuration config = new Configuration(event.getSuggestedConfigurationFile());

    config.load();
    int titaniumOreID = config.getBlock(Configuration.CATEGORY_BLOCK, "Titanium Ore ID", 501).getInt();
    int aluminumOreID = config.getBlock(Configuration.CATEGORY_BLOCK, "Aluminum Ore ID", 502).getInt();
    int denseCoalOreID = config.getBlock(Configuration.CATEGORY_BLOCK, "Dense Coal Ore", 500).getInt();
    int oxidizerIdleID = config.getBlock(Configuration.CATEGORY_BLOCK, "Oxidizer Idle ID", 600).getInt();
    int oxidizerActiveID = config.getBlock(Configuration.CATEGORY_BLOCK, "Oxidixer Active ID", 601).getInt();

    /**Custom Blocks*/
    public static Block denseCoalOre = new denseCoalOre(denseCoalOreID, Material.rock);
    public static Block titanium = new titanium(titaniumOreID, Material.rock);
    public static Block aluminum =  new aluminum(aluminumOreID, Material.rock);
    public static Block oxidizerIdle = new Oxidizer(oxidizerIdleID, false).setUnlocalizedName("oxidizerIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
    public static Block oxidizerActive = new Oxidizer(oxidizerActiveID, true).setUnlocalizedName("oxidizerActive").setHardness(3.5F);

   yadda yadda yadda...

 

 

 

However, be aware that most of the time, the scope of the IDs you get from a config file should last as long as the mod container. That is why the IDs are usually declared in the class (outside any method). If you need to refer to the IDs from another of your classes, you cannot do it easily with the method you've chosen.

 

My suggestion, is learn to use class fields. Do not redeclare local variables with the same names. That is very confusing. But, if you must do it, use "this.variable" for the class field and just "variable" for the local variable (most often a parameter).

 

Example:

@Mod( ... )
public class Modone {
    private static final String CATEGORY_BLOCK = "block";
    int myOreBlockID;
    Block myOreBlock;

    @SubscribeEvent
    public static void Preinit(FMLPreinitializationEvent ev) {
        Configuration config = new Configuration(event.getSuggestedConfigurationFile());
        config.load();
        myOreBlockID = config.get(CATEGORY_BLOCK, "Titanium Ore ID", 501).getInt();
        myOreBlock = new MyOre(myOreBlockID,Material.rock);
        .
        :
        config.save();
        GameRegistry.registerBlock(myOreBlock, .... yadda yadda yadda );
    }

 

Notice how the IDs and Blocks are uninitialized fields of the class. I did not use a 'type ID' before any of the setting instructions, so the instructions referred to the fields already declared. That is what I am attempting to teach you.

 

Posted

I'd recommend Configuration.getBlock as it searchs for a free block id.

Also, it is unecessary to make the id as fields, since you already have the blocks themselves, and they keep the info through block.blockID. Same goes for items.

Posted

Ok... new day different outlook hopefully. So firstly the method I shown was how I was shown to set it up and it worked so I never questioned it. I have setup the file how you suggested now.

 

Here is the section I redid.

 

public class SuperNova
{
    /**Gui Id for the the oxidizer*/
    public static final int guiIdOxidizer = 0;
    public static final int guiIdFragmenter = 1;
    public static final int guiIdCarbonGenerator = 2;
    public static final int guiIdHydrogenSeperator = 3;
    public static final int guiIdCarbonWeaver = 4;

    /**Event Managers*/
    EventManager oreManager = new EventManager();

    /**Register guiHandler*/
    GuiHandler guiHandler = new GuiHandler();

    /**Custom Creative Tabs*/
    public static CreativeTabs tabSupernova = new CreativeTabs("supernova")
    {
        @SideOnly(Side.CLIENT)
        public int getTabIconItemIndex()
        {
            return SuperNova.oxidizerIdle.blockID;
        }
    };
    
    int titaniumOreID;
    int aluminumOreID;
    int denseCoalOreID;
    int oxidizerIdleID;
    int oxidizerActiveID;
    int fragmenterIdleID;
    int fragmenterActiveID;
    int carbonGeneratorIdleID;
    int carbonGeneratorActiveID;
    int hydrogenSeperatorIdleID;
    int hydrogenSeperatorActiveID;
    int carbonWeaverIdleID;
    int carbonWeaverActiveID;
    
    
    int carbonFiberClothID;
    int carbonStrandID;
    int carbontaniumStrandID;
    int carbontaniumClothID;
    int CFPPlateID;
    int CFPRodID;
    int CTPlateID;
    int CTRodID;
    int CFPSwordID;
    int CFPAxeID;
    int CFPPickaxeID;
    int CFPShovelID;
    int CFPHoeID;
    int CTSwordID;
    int CTAxeID;
    int CTPickaxeID;
    int CTShovelID;
    int CTHoeID;
    int ironFragmentsID;
    int goldFragmentsID;
    int titaniumFragmentsID;
    int aluminumFragmentsID;
    int coalDustID;
    int aluminumIngotsID;
    int titaniumIngotsID;
    int denseCoalID;
    int carbonFuelID;
    int carbonBatteryID;
    int mediumPowerCellID;
    int cellID;
    int airCellID;
    int waterCellID;
    int smallPowerCoreID;
    int mediumPowerCoreID;
    int largePowerCoreID;
    int glassShardID;
    int upgradeID;
    

    /**Custom Blocks*/
    Block denseCoalOre;
    Block titanium;
    Block aluminum;
    Block oxidizerIdle;
    Block oxidizerActive;
    Block fragmenterIdle;
    Block fragmenterActive; 
    Block carbonGeneratorIdle;
    Block carbonGeneratorActive;
    Block hydrogenSeperatorIdle; 
    Block hydrogenSeperatorActive; 
    Block carbonWeaverIdle; 
    Block carbonWeaverActive;
    
    /**Custom Materials*/
    EnumToolMaterial CFP = EnumHelper.addToolMaterial("CFP", 3, 1600, 11.0F, 6.0F, 10);
    EnumToolMaterial CT = EnumHelper.addToolMaterial("CT", 3, 1800, 13.0F, 8.0F, 7);

    /**Custom Items*/
    Item carbonFiberCloth;
    Item CFPSword;
    Item CFPAxe;
    Item CFPPickaxe;
    Item CFPShovel;
    Item CFPHoe;
    Item CTSword;
    Item CTAxe;
    Item CTPickaxe;
    Item CTShovel;
    Item CTHoe;
    Item ironFragments;
    Item goldFragments;
    Item titaniumFragments;
    Item aluminumFragments;
    Item coalDust; 
    Item aluminumIngots; 
    Item CFPPlate;
    Item CFPRod;
    Item carbontaniumCloth;
    Item CTPlate;
    Item CTRod; 
    Item denseCoal;
    Item carbonFuel;
    Item carbontaniumStrand;
    Item carbonStrand;
    Item titaniumIngots; 
    Item carbonBattery;
    Item airCell; 
    Item waterCell;
    Item smallPowerCore;
    Item mediumPowerCore;
    Item largePowerCore; 
    Item mediumPowerCell;
    Item cell; 
    Item glassShard; 
    Item upgrade;
    
    
    // The instance of your mod that Forge uses.
    @Instance("SuperNova")
    public static SuperNova instance;

    // Says where the client and server 'proxy' code is loaded.
    @SidedProxy(clientSide = SuperNovaInfo.CLIENTPROXY + "ClientProxy", serverSide = SuperNovaInfo.COMMONPROXY + "CommonProxy")
    public static CommonProxy proxy;

    @EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
        Configuration config = new Configuration(event.getSuggestedConfigurationFile());
        
        config.load();
        /**Config BLock IDs*/
        titaniumOreID = config.get(Configuration.CATEGORY_BLOCK, "Titanium Ore ID", 550).getInt();
        aluminumOreID = config.get(Configuration.CATEGORY_BLOCK, "Aluminum Ore ID", 502).getInt();
        denseCoalOreID = config.get(Configuration.CATEGORY_BLOCK, "Dense Coal Ore", 500).getInt();
        oxidizerIdleID = config.get(Configuration.CATEGORY_BLOCK, "Oxidizer Idle ID", 600).getInt();
        oxidizerActiveID = config.get(Configuration.CATEGORY_BLOCK, "Oxidixer Active ID", 601).getInt();
        fragmenterIdleID = config.get(Configuration.CATEGORY_BLOCK, "Fragmenter Idle ID", 602).getInt();
        fragmenterActiveID = config.get(Configuration.CATEGORY_BLOCK, "Fragmenter Active ID", 603).getInt();
        carbonGeneratorIdleID = config.get(Configuration.CATEGORY_BLOCK, "Carbon Generator Idle ID", 604).getInt();
        carbonGeneratorActiveID = config.get(Configuration.CATEGORY_BLOCK, "Carbon Generator Active ID", 605).getInt();
        hydrogenSeperatorIdleID = config.get(Configuration.CATEGORY_BLOCK, "Hydrogen Seperator Idle ID", 606).getInt();
        hydrogenSeperatorActiveID = config.get(Configuration.CATEGORY_BLOCK, "Hydrogen Seperator Active ID", 607).getInt();
        carbonWeaverIdleID = config.get(Configuration.CATEGORY_BLOCK, "Carbon Weaver Idle ID", 608).getInt();
        carbonWeaverActiveID = config.get(Configuration.CATEGORY_BLOCK, "Carbon Weaver Active ID", 609).getInt();
        
        /**Config Item IDs*/
        carbonFiberClothID = config.getItem(Configuration.CATEGORY_ITEM, "Carbon Fiber Cloth ID", 5001).getInt();
        carbonStrandID = config.getItem(Configuration.CATEGORY_ITEM, "Carbon Strand ID", 5024).getInt();
        carbontaniumStrandID = config.getItem(Configuration.CATEGORY_ITEM, "Carbontanium Strand ID", 5025).getInt();
        carbontaniumClothID = config.getItem(Configuration.CATEGORY_ITEM, "Carbontainum Cloth ID", 5019).getInt();
        CFPPlateID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Plate ID", 5020).getInt();
        CFPRodID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Rod ID", 5021).getInt();
        CTPlateID = config.getItem(Configuration.CATEGORY_ITEM, "CT Plate ID", 5022).getInt();
        CTRodID = config.getItem(Configuration.CATEGORY_ITEM, "CT Rod ID", 5023).getInt();
        CFPSwordID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Sword ID", 5002).getInt();
        CFPAxeID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Axe ID", 5003).getInt();
        CFPPickaxeID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Pickaxe ID", 5004).getInt();
        CFPShovelID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Shovel ID", 5005).getInt();
        CFPHoeID = config.getItem(Configuration.CATEGORY_ITEM, "CFP Hoe ID", 5006).getInt();
        CTSwordID = config.getItem(Configuration.CATEGORY_ITEM, "CT Sword ID", 5007).getInt();
        CTAxeID = config.getItem(Configuration.CATEGORY_ITEM, "CT Axe ID", 5008).getInt();
        CTPickaxeID = config.getItem(Configuration.CATEGORY_ITEM, "CT Pickaxe ID", 5009).getInt();
        CTShovelID = config.getItem(Configuration.CATEGORY_ITEM, "CT Shovel ID", 5010).getInt();
        CTHoeID = config.getItem(Configuration.CATEGORY_ITEM, "CT Hoe ID", 5011).getInt();
        ironFragmentsID = config.getItem(Configuration.CATEGORY_ITEM, "Iron Fragments ID", 5012).getInt();
        goldFragmentsID = config.getItem(Configuration.CATEGORY_ITEM, "Gold Fragments ID", 5013).getInt();
        titaniumFragmentsID = config.getItem(Configuration.CATEGORY_ITEM, "Titnium Fragments ID", 5014).getInt();
        aluminumFragmentsID = config.getItem(Configuration.CATEGORY_ITEM, "Aluminum Fragments ID", 5015).getInt();
        coalDustID = config.getItem(Configuration.CATEGORY_ITEM, "Coal Dust ID", 5016).getInt();
        aluminumIngotsID = config.getItem(Configuration.CATEGORY_ITEM, "Aluminum Ingot ID", 5017).getInt();
        titaniumIngotsID = config.getItem(Configuration.CATEGORY_ITEM, "Titanium Ingot ID", 5018).getInt();
        denseCoalID = config.getItem(Configuration.CATEGORY_ITEM, "Dense Coal ID", 5026).getInt();
        carbonFuelID = config.getItem(Configuration.CATEGORY_ITEM, "Carbon Fuel ID", 5027).getInt();
        carbonBatteryID = config.getItem(Configuration.CATEGORY_ITEM, "Small Power Cell ID", 5028).getInt();
        mediumPowerCellID = config.getItem(Configuration.CATEGORY_ITEM, "Medium Power Cell ID", 5029).getInt();
        cellID = config.getItem(Configuration.CATEGORY_ITEM, "Cell ID", 5030).getInt();
        airCellID = config.getItem(Configuration.CATEGORY_ITEM, "Air Cell ID", 5031).getInt();
        waterCellID = config.getItem(Configuration.CATEGORY_ITEM, "Water Cell ID", 5032).getInt();
        smallPowerCoreID = config.getItem(Configuration.CATEGORY_ITEM, "Small Power Core ID", 5033).getInt();
        mediumPowerCoreID = config.getItem(Configuration.CATEGORY_ITEM, "Medium Power Core ID", 5034).getInt();
        largePowerCoreID = config.getItem(Configuration.CATEGORY_ITEM, "Large Power Core ID", 5035).getInt();
        glassShardID = config.getItem(Configuration.CATEGORY_ITEM, "Glass Shard ID", 5035).getInt();
        upgradeID = config.getItem(Configuration.CATEGORY_ITEM, "Upgrade ID", 5036).getInt();
        
        /**Custom Blocks*/
        denseCoalOre = (new denseCoalOre(denseCoalOreID, Material.rock));
        titanium = new titanium(titaniumOreID, Material.rock);
        aluminum =  new aluminum(aluminumOreID, Material.rock);
        oxidizerIdle = new Oxidizer(oxidizerIdleID, false).setUnlocalizedName("oxidizerIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
        oxidizerActive = new Oxidizer(oxidizerActiveID, true).setUnlocalizedName("oxidizerActive").setHardness(3.5F);
        fragmenterIdle = new Fragmenter(fragmenterIdleID, false).setUnlocalizedName("fragementerIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
        fragmenterActive = new Fragmenter(fragmenterActiveID, true).setUnlocalizedName("fragementerActive").setHardness(3.5F);
        carbonGeneratorIdle = new CarbonGenerator(carbonGeneratorIdleID, false).setUnlocalizedName("carbonGeneratorIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
        carbonGeneratorActive = new CarbonGenerator(carbonGeneratorActiveID, true).setUnlocalizedName("carbonGeneratorActive").setHardness(3.5F);
        hydrogenSeperatorIdle = new HydrogenSeperator(hydrogenSeperatorIdleID, false).setUnlocalizedName("hydrogenSeperatorIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
        hydrogenSeperatorActive = new HydrogenSeperator(hydrogenSeperatorActiveID, true).setUnlocalizedName("hydrogenSeperatorActive").setHardness(3.5F);
        carbonWeaverIdle = new CarbonWeaver(carbonWeaverIdleID, false).setUnlocalizedName("carbonWeaverIdle").setHardness(3.5F).setCreativeTab(SuperNova.tabSupernova);
        carbonWeaverActive = new CarbonWeaver(carbonWeaverActiveID, true).setUnlocalizedName("carbonweaverActive").setHardness(3.5F);
       
       /**Custom Materials*/
        EnumToolMaterial CFP = EnumHelper.addToolMaterial("CFP", 3, 1600, 11.0F, 6.0F, 10);
        EnumToolMaterial CT = EnumHelper.addToolMaterial("CT", 3, 1800, 13.0F, 8.0F, 7);

      
	/**Custom Items*/
       carbonFiberCloth = new carbonFiberCloth(carbonFiberClothID);
       CFPSword = new CFPSword(CFPSwordID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPSword").setTextureName("supernova:cfpsword");
       CFPAxe = new CFPAxe(CFPAxeID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPAxe").setTextureName("supernova:cfpaxe");
       CFPPickaxe = new CFPPickaxe(CFPPickaxeID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPPickaxe").setTextureName("supernova:cfppickaxe");
       CFPShovel = new CFPShovel(CFPShovelID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPShovel").setTextureName("supernova:cfpshovel");
       CFPHoe = new CFPHoe(CFPHoeID, CFP).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPHoe").setTextureName("supernova:cfphoe");
       CTSword = new CTSword(CTSwordID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTSword").setTextureName("supernova:ctsword");
       CTAxe = new CTAxe(CTAxeID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTAxe").setTextureName("supernova:ctaxe");
       CTPickaxe = new CTPickaxe(CTPickaxeID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTPickaxe").setTextureName("supernova:ctpickaxe");
       CTShovel = new CTShovel(CTShovelID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTShovel").setTextureName("supernova:ctshovel");
       CTHoe = new CTHoe(CTHoeID, CT).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTHoe").setTextureName("supernova:cthoe");
       ironFragments = new ironFragments(ironFragmentsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("ironfragments").setTextureName("supernova:ironfragments");
       goldFragments = new goldFragments(goldFragmentsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("goldFragemnts").setTextureName("supernova:goldfragments");
       titaniumFragments = new titaniumFragments(titaniumFragmentsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("titaniumFragments").setTextureName("supernova:titaniumfragments");
       aluminumFragments = new aluminumFragments(aluminumFragmentsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("aluminumFragments").setTextureName("supernova:aluminumfragments");
       coalDust = new coalDust(coalDustID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("coalDust").setTextureName("supernova:coaldust");
       aluminumIngots = new aluminumIngot(aluminumIngotsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("aluminumIngots").setTextureName("supernova:aluminumingot");
       CFPPlate = new CFPPlate(CFPPlateID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPPlate").setTextureName("supernova:cfpplate");
       CFPRod = new CFPRod(CFPRodID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CFPRod").setTextureName("supernova:cfprod");
       carbontaniumCloth = new carbontaniumCloth(carbontaniumClothID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbontaniumCloth").setTextureName("supernova:carbontaniumcloth");
       CTPlate = new CTPlate(CTPlateID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTPlate").setTextureName("supernova:ctplate");
       CTRod = new CTRod(CTRodID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("CTRod").setTextureName("supernova:ctrod");
       denseCoal = new densecoal(denseCoalID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("densecoal").setTextureName("supernova:densecoal");
       carbonFuel = new CarbonFuel(carbonFuelID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbonfuel").setTextureName("supernova:carbonfuel");
       carbontaniumStrand = new CarbontainumStrand(carbontaniumStrandID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbontainumstrand").setTextureName("supernova:tcarbonstrand");
       carbonStrand = new CarbonStrand(carbonStrandID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbonstrand").setTextureName("supernova:carbonstrand");
       titaniumIngots = new titaniumIngot(titaniumIngotsID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("titaniumIngots").setTextureName("supernova:titaniumingot");
       carbonBattery = new CarbonBattery(carbonBatteryID, 1000).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("carbonBattery").setTextureName("supernova:battery");
       airCell = new AirCell(airCellID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("aircell").setTextureName("supernova:aircell");
       waterCell = new WaterCell(waterCellID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("watercell").setTextureName("supernova:watercell");
       smallPowerCore = new SmallPowerCore(smallPowerCoreID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("smallpowercore").setTextureName("supernova:smallpowercore");
       mediumPowerCore = new MediumPowerCore(mediumPowerCoreID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("mediumpowercore").setTextureName("supernova:mediumpowercore");
       largePowerCore = new LargePowerCore(largePowerCoreID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("largepowercore").setTextureName("supernova:largepowercore");
       mediumPowerCell = new MediumPowerCell(mediumPowerCellID).setCreativeTab(SuperNova.tabSupernova).setUnlocalizedName("mediumPowerCell").setTextureName("supernova:mediumpowercell");
       cell = new Cell(cellID).setCreativeTab(tabSupernova).setUnlocalizedName("cell").setTextureName("supernova:cell");
       glassShard = new GlassShard(glassShardID).setCreativeTab(tabSupernova).setUnlocalizedName("glassshard").setTextureName("supernova:glassshard");
       upgrade = new Upgrade(upgradeID).setCreativeTab(tabSupernova).setUnlocalizedName("upgrade").setTextureName("supernova:upgrade");
        
        
        config.save();

 

 

Did I do it properly? If so then how do the other classes get a hold of the information? The tutorial shown doing the public static Block below the post init, but isn't that the same thing I did just in a different spot. Do you have a good reference where I can learn of the class fields? As far as I'm aware of I've heard people mention it in tutorials but never explained it in detail.

 

Posted

Pretty good, except for CFP and CT, again you specified an initializing declaration (NOT AN ASSIGNMENT). You want to only do assignment if you want your data to persist as long as the mod does.

 

And, you still need to register all of your blocks, items, handlers, etc.

 

I'll leave that as an exercise for you.

 

As to your question about visibility, you chose to specify that your fields are only visible to the package it is in. To do otherwise you must include a visibility modifier before the type specifier. Public or Private 0are the ones you want to look at. There is also Protected (which is like private, except subclasses can see them, too.)

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.