Jump to content

Minecraft crashing in eclipse after making config file


RosarioMokaChan

Recommended Posts

Hi, I recently made a configuration file for my mod so users can change the item ids of blocks and items (as expected), but when I test it in eclipse it crashes. I read through the error report and I think it's saying that there's a conflict between two blocks (plutoniumblock and plutoniumore). Although by searching all throughout my code, I can't seem to find any conflicts. Any opinions on a fix would be greatly appreciated.

 

Crash report:

 

---- Minecraft Crash Report ----
// I bet Cylons wouldn't have this problem.

Time: 07/09/13 13:18
Description: Initializing game

java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:457)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:194)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:105)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:510)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:182)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:470)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796)
at net.minecraft.client.main.Main.main(Main.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
Caused by: java.lang.IllegalArgumentException: Slot 0 is already occupied by RosarioMokaChan.RandomCraft.blocks.PlutoniumBlock@1631c79f when adding RosarioMokaChan.RandomCraft.blocks.PlutoniumOre@1e28a31b
at net.minecraft.block.Block.<init>(Block.java:348)
at RosarioMokaChan.RandomCraft.blocks.PlutoniumOre.<init>(PlutoniumOre.java:11)
at RosarioMokaChan.RandomCraft.RandomCraft.<clinit>(RandomCraft.java:59)
... 35 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:457)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:194)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:105)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:510)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:182)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:470)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796)
at net.minecraft.client.main.Main.main(Main.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
at net.minecraft.launchwrapper.Launch.main(Launch.java:18)

-- System Details --
Details:
Minecraft Version: 1.6.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_21, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 765608176 bytes (730 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.04 FML v6.2.35.804 Minecraft Forge 9.10.0.804 4 mods loaded, 4 mods active
mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{6.2.35.804} [Forge Mod Loader] (coremods) Unloaded->Constructed
Forge{9.10.0.804} [Minecraft Forge] (coremods) Unloaded->Constructed
RandomCraft{0.0.1} [RandomCraft] (bin) Unloaded
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: GeForce GTX 645/PCIe/SSE2 GL version 4.3.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Pack: Default
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null

Link to comment
Share on other sites

If you mean the bit from the config handler, then here ya go:

 

package RosarioMokaChan.RandomCraft;

import java.io.File;
import java.util.logging.Level;

import cpw.mods.fml.common.FMLLog;

import RosarioMokaChan.RandomCraft.lib.BlockIds;
import RosarioMokaChan.RandomCraft.lib.ItemIds;
import RosarioMokaChan.RandomCraft.lib.ModInfo;
import RosarioMokaChan.RandomCraft.lib.Strings;

import net.minecraftforge.common.Configuration;

public class ConfigurationHandler {

static Configuration config = new Configuration();

public static void init(File file){

	config = new Configuration(file);

	try{

		config.load();

		BlockIds.PLUTONIUMBLOCK_ID = config.get(config.CATEGORY_BLOCK, Strings.PLUTONIUMBLOCK_NAME, BlockIds.PLUTONIUMBLOCK_ID_DEFAULT).getInt(BlockIds.PLUTONIUMBLOCK_ID_DEFAULT);
		BlockIds.PLUTONIUMORE_ID = config.get(config.CATEGORY_BLOCK, Strings.PLUTONIUMORE_NAME, BlockIds.PLUTONIUMORE_ID_DEFAULT).getInt(BlockIds.PLUTONIUMORE_ID_DEFAULT);
		BlockIds.RADIUMBLOCK_ID = config.get(config.CATEGORY_BLOCK, Strings.RADIUMBLOCK_NAME, BlockIds.RADIUMBLOCK_ID_DEFAULT).getInt(BlockIds.RADIUMBLOCK_ID_DEFAULT);
		BlockIds.RADIUMORE_ID = config.get(config.CATEGORY_BLOCK, Strings.RADIUMORE_NAME, BlockIds.RADIUMORE_ID_DEFAULT).getInt(BlockIds.RADIUMORE_ID_DEFAULT);
		BlockIds.MOONSTONE_ID = config.get(config.CATEGORY_BLOCK, Strings.MOONSTONE_NAME, BlockIds.MOONSTONE_ID_DEFAULT).getInt(BlockIds.MOONSTONE_ID_DEFAULT);


		ItemIds.ENDERHATCHER_ID = config.get(config.CATEGORY_ITEM, Strings.ENDERHATCHER_NAME, ItemIds.ENDERHATCHER_ID_DEFAULT).getInt(ItemIds.ENDERHATCHER_ID_DEFAULT);
		ItemIds.PLUTONIUMINGOT_ID = config.get(config.CATEGORY_ITEM, Strings.ENDERHATCHER_NAME, ItemIds.ENDERHATCHER_ID_DEFAULT).getInt(ItemIds.ENDERHATCHER_ID_DEFAULT);
		ItemIds.RADIUMINGOT_ID = config.get(config.CATEGORY_ITEM, Strings.ENDERHATCHER_NAME, ItemIds.ENDERHATCHER_ID_DEFAULT).getInt(ItemIds.ENDERHATCHER_ID_DEFAULT);
		ItemIds.MOONSTONEDUST_ID = config.get(config.CATEGORY_ITEM, Strings.ENDERHATCHER_NAME, ItemIds.ENDERHATCHER_ID_DEFAULT).getInt(ItemIds.ENDERHATCHER_ID_DEFAULT);
		ItemIds.DRAGONWINGS_ID = config.get(config.CATEGORY_ITEM, Strings.ENDERHATCHER_NAME, ItemIds.ENDERHATCHER_ID_DEFAULT).getInt(ItemIds.ENDERHATCHER_ID_DEFAULT);
		ItemIds.DIAMONDHORSECHEST_ID = config.get(config.CATEGORY_ITEM, Strings.DIAMONDHORSECHEST_NAME, ItemIds.DIAMONDHORSECHEST_ID_DEFAULT).getInt(ItemIds.DIAMONDHORSECHEST_ID_DEFAULT);
		ItemIds.DIAMONDHORSEHELM_ID = config.get(config.CATEGORY_ITEM, Strings.DIAMONDHORSEHELM_NAME, ItemIds.DIAMONDHORSEHELM_ID_DEFAULT).getInt(ItemIds.DIAMONDHORSEHELM_ID_DEFAULT);
		ItemIds.GOLDHORSECHEST_ID = config.get(config.CATEGORY_ITEM, Strings.GOLDHORSECHEST_NAME, ItemIds.GOLDHORSECHEST_ID_DEFAULT).getInt(ItemIds.GOLDHORSECHEST_ID_DEFAULT);
		ItemIds.GOLDHORSEHELM_ID = config.get(config.CATEGORY_ITEM, Strings.GOLDHORSEHELM_NAME, ItemIds.GOLDHORSEHELM_ID_DEFAULT).getInt(ItemIds.GOLDHORSEHELM_ID_DEFAULT);
		ItemIds.IRONHORSECHEST_ID = config.get(config.CATEGORY_ITEM, Strings.IRONHORSECHEST_NAME, ItemIds.IRONHORSECHEST_ID_DEFAULT).getInt(ItemIds.IRONHORSECHEST_ID_DEFAULT);
		ItemIds.IRONHORSEHELM_ID = config.get(config.CATEGORY_ITEM, Strings.IRONHORSEHELM_NAME, ItemIds.IRONHORSEHELM_ID_DEFAULT).getInt(ItemIds.IRONHORSEHELM_ID_DEFAULT);


	}

	catch(Exception e){

		FMLLog.log(Level.SEVERE, e, ModInfo.ID + " has trouble loading the config");
	}

	finally{

		config.save();
	}
}
}

Link to comment
Share on other sites

I believe this part of the error log might be your problem

 

Caused by: java.lang.IllegalArgumentException: Slot 0 is already occupied by RosarioMokaChan.RandomCraft.blocks.PlutoniumBlock@1631c79f when adding RosarioMokaChan.RandomCraft.blocks.PlutoniumOre@1e28a31b

at net.minecraft.block.Block.<init>(Block.java:348)

at RosarioMokaChan.RandomCraft.blocks.PlutoniumOre.<init>(PlutoniumOre.java:11)

at RosarioMokaChan.RandomCraft.RandomCraft.<clinit>(RandomCraft.java:59)

... 35 more

if (You.likescoding == false){
      You.goaway;
}

Link to comment
Share on other sites

There is nothing wrong with the config class, its the id class where you messed up.  Plutonium block, and plutonium ore are sharing an ID of 0 that is the problem you are having.  You can tell by the fact that the error log states

 

IllegalArgumentException.....

if (You.likescoding == false){
      You.goaway;
}

Link to comment
Share on other sites

In my BlockIds class I have the two blocks as having ids 3000 and 3001 as shown here:

 

public class BlockIds {

public static final int PLUTONIUMBLOCK_ID_DEFAULT = 3000;
public static int PLUTONIUMBLOCK_ID;
public static final int PLUTONIUMORE_ID_DEFAULT = 3001;
public static int PLUTONIUMORE_ID;
public static final int RADIUMBLOCK_ID_DEFAULT = 3002;
public static int RADIUMBLOCK_ID;
public static final int RADIUMORE_ID_DEFAULT = 3003;
public static int RADIUMORE_ID;
public static final int MOONSTONE_ID_DEFAULT = 3004;
public static int MOONSTONE_ID;



}

 

Then applied to the block in the main class here:

 

	public final static Block plutoniumBlock = new PlutoniumBlock(BlockIds.PLUTONIUMBLOCK_ID, Material.iron);
public final static Block plutoniumOre = new PlutoniumOre(BlockIds.PLUTONIUMORE_ID, Material.rock);

 

So i'm not sure how i'm getting the ids messed up.

Link to comment
Share on other sites

Ive never seen config files set up that way this is the way I usually have it set up

 

hope this helps you

 

IdHandler

 

 

package kakarotvg.common.tutorial.handlers;

 

import net.minecraftforge.common.Configuration;

 

public class IDHandler {

 

    // config categories

    public static String blockids = "Block IDs";

    public static String itemids = "Item IDs";

    public static String toolids = "Tool IDs";

    public static String armorids = "Armor IDs";

    public static String liquidids = "Liquid IDs";

    public static String cropids = "Crop IDs";

 

    // block ids

    public static int tutorialblockID;

    public static int tutorialblock2ID;

    public static int animatedblockID;

 

    // item ids

    public static int tutorialitemID;

    public static int tutorialingotID;

 

    // toold ids

    public static int tutorialaxeID;

    public static int tutorialhoeID;

    public static int tutorialshovelID;

    public static int tutorialswordID;

    public static int tutorialpickaxeID;

 

    // armor ids

    public static int tutorialhelmID;

    public static int tutorialplateID;

    public static int tutoriallegsID;

    public static int tutorialbootsID;

 

    // liquid ids

    public static int blocktutorialfluidID;

    public static int tutorialbucketID;

 

    // crop ids

    public static int tutorialcropID;

    public static int tutorialseedsID;

    public static int tutorialfoodID;

 

    // the ids that will appear in the config file and are used by everything

    // that uses ids

    public static void createConfigfile(Configuration config) {

        // block ids

        tutorialblockID = config.get(blockids, "Tutorial Block", 3300).getInt();

        tutorialblock2ID = config.get(blockids, "Tutorial Block 2", 3301).getInt();

        animatedblockID = config.get(blockids, "Animated Block", 3302).getInt();

        // item ids

        tutorialitemID = config.get(itemids, "Tutorial Item", 24000).getInt();

        tutorialingotID = config.get(itemids, "Tutorial Ingot", 24001).getInt();

        // tool ids

        tutorialaxeID = config.get(toolids, "Tutorial Axe", 24100).getInt();

        tutorialhoeID = config.get(toolids, "Tutorial Hoe", 24101).getInt();

        tutorialshovelID = config.get(toolids, "Tutorial Shovel", 24102).getInt();

        tutorialswordID = config.get(toolids, "Tutorial Sword", 24103).getInt();

        tutorialpickaxeID = config.get(toolids, "Tutorial Pickaxe", 24104).getInt();

        // armor ids

        tutorialhelmID = config.get(armorids, "Tutorial Helmet", 24200).getInt();

        tutorialplateID = config.get(armorids, "Tutorial Chestplate", 24201).getInt();

        tutoriallegsID = config.get(armorids, "Tutorial Leggings", 24202).getInt();

        tutorialbootsID = config.get(armorids, "Tutorial Boots", 24203).getInt();

        // liquid ids

        blocktutorialfluidID = config.get(liquidids, "Tutorial Fluid", 3350).getInt();

        tutorialbucketID = config.get(liquidids, "Tutorial BUcket", 24250).getInt();

        // crop ids

        tutorialcropID = config.get(cropids, "Tutorial Crop", 3360).getInt();

        tutorialseedsID = config.get(cropids, "Tutorial Seeds", 24300).getInt();

        tutorialfoodID = config.get(cropids, "Tutorial Food", 24301).getInt();

 

    }

 

}

 

 

 

blockhandler (to show you how I call the IDs

 

 

package kakarotvg.common.tutorial.handlers;

 

import kakarotvg.common.tutorial.blocks.TutorialBlock;

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.MinecraftForge;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

 

public class BlockHandler {

 

    // blocks

    public static Block tutorialblock;

    public static Block tutorialblock2;

    public static Block animatedblock;

 

    // registers the block ids, texturs, resistance, and their hardness

    public static void configureBlocks(Configuration config) {

        tutorialblock = new TutorialBlock(IDHandler.tutorialblockID, Material.iron).setUnlocalizedName("tutorialblock").setCreativeTab(CreativeTabHandler.ttab).setStepSound(Block.soundMetalFootstep).setHardness(50.0F).setResistance(2000.0F);

        tutorialblock2 = new TutorialBlock(IDHandler.tutorialblock2ID, Material.rock).setUnlocalizedName("tutorialblock2").setCreativeTab(CreativeTabHandler.ttab).setStepSound(Block.soundStoneFootstep).setHardness(3.0F).setResistance(5.0F);

        animatedblock = new TutorialBlock(IDHandler.animatedblockID, Material.wood).setUnlocalizedName("animatedblock").setCreativeTab(CreativeTabHandler.ttab).setStepSound(Block.soundClothFootstep).setHardness(1.0F).setResistance(4.0F);

    }

 

    // registers the blocks as blocks

    public static void registerBlocks(GameRegistry registry) {

        registry.registerBlock(tutorialblock, "tutorialblock");

        registry.registerBlock(tutorialblock2, "tutorialblock2");

        registry.registerBlock(animatedblock, "animatedblock");

    }

 

    // registers the names of teh blocks

    public static void addNames(LanguageRegistry registry) {

        registry.addName(tutorialblock, "Tutorial Block");

        registry.addName(tutorialblock2, "Tutorial Block 2");

        registry.addName(animatedblock, "Animated Block");

    }

 

    // registers the harvestlevel of each block

    public static void setBlockHarvestLevel(MinecraftForge registry) {

        registry.setBlockHarvestLevel(tutorialblock, "pickaxe", 3);

        registry.setBlockHarvestLevel(tutorialblock2, "pickaxe", 2);

        registry.setBlockHarvestLevel(animatedblock, "pickaxe", 1);

    }

 

}

 

 

if (You.likescoding == false){
      You.goaway;
}

Link to comment
Share on other sites

I've tried doing it in a similar way to what you described, but it still doesn't feel like working.

 

I commented out some lines in the BlockIds class and in the ConfigurationHandler so I could try it this way as shown below:

 

package RosarioMokaChan.RandomCraft.lib;

import net.minecraftforge.common.Configuration;



public class BlockIds {
public static String blockids = "Block IDs";


//public static final int PLUTONIUMBLOCK_ID_DEFAULT = 3000;
public static int PLUTONIUMBLOCK_ID;
//public static final int PLUTONIUMORE_ID_DEFAULT = 3001;
public static int PLUTONIUMORE_ID;
//public static final int RADIUMBLOCK_ID_DEFAULT = 3002;
public static int RADIUMBLOCK_ID;
//public static final int RADIUMORE_ID_DEFAULT = 3003;
public static int RADIUMORE_ID;
//public static final int MOONSTONE_ID_DEFAULT = 3004;
public static int MOONSTONE_ID;

public static void createConfigfile(Configuration config) {
        // block ids
        PLUTONIUMBLOCK_ID = config.get(blockids, "plutoniumBlock", 3000).getInt();
        PLUTONIUMORE_ID = config.get(blockids, "plutoniumOre", 3001).getInt();
        RADIUMBLOCK_ID = config.get(blockids, "radiumBlock", 3002).getInt();
        RADIUMORE_ID = config.get(blockids, "radiumOre", 3003).getInt();
        MOONSTONE_ID = config.get(blockids, "moonstone", 3004).getInt();


}
}

Link to comment
Share on other sites

did you make sure to have the config loader in the main mod class

 

main mod class

 

 

package kakarotvg.common.tutorial;

 

import kakarotvg.common.tutorial.handlers.ArmorHandler;

import kakarotvg.common.tutorial.handlers.BlockHandler;

import kakarotvg.common.tutorial.handlers.CreativeTabHandler;

import kakarotvg.common.tutorial.handlers.CropHandler;

import kakarotvg.common.tutorial.handlers.IDHandler;

import kakarotvg.common.tutorial.handlers.ItemHandler;

import kakarotvg.common.tutorial.handlers.LiquidHandler;

import kakarotvg.common.tutorial.handlers.RecipeHandler;

import kakarotvg.common.tutorial.handlers.ToolHandler;

import kakarotvg.common.tutorial.handlers.TutorialEventHandler;

import kakarotvg.common.tutorial.proxys.CommonProxy;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.MinecraftForge;

import net.minecraftforge.fluids.FluidContainerRegistry;

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.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

 

@Mod(modid = TutorialModInfo.ID, name = TutorialModInfo.MOD_N, version = TutorialModInfo.MOD_V)

@NetworkMod(serverSideRequired = false, clientSideRequired = true)

public class VgTutorial {

 

    @Instance(TutorialModInfo.ID)

    public static VgTutorial instance;

 

    @SidedProxy(clientSide = "kakarotvg.common.tutorial.proxys.ClientProxy", serverSide = "kakarotvg.common.tutorial.proxys.CommonProxy")

    public static CommonProxy proxy;

 

    @EventHandler

    public void preInit(FMLPreInitializationEvent event) {

        /*

        * Runs the Configuration file and saves the IDs to the file (file will

        * be named Tutorial_Mod.cfg)

        */

 

        // the 4 lines under this comment are what you need to pay attention to for the config file

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

        config.load();

        IDHandler.createConfigfile(config);

        config.save();

 

        // Calls the blockhandler class, making our block show up in game

        BlockHandler.configureBlocks(config);

        BlockHandler.registerBlocks(new GameRegistry());

        BlockHandler.addNames(new LanguageRegistry());

        BlockHandler.setBlockHarvestLevel(new MinecraftForge());

 

        // calls the ItemHandler class making our Item show up in game

        ItemHandler.configureItems(config);

        ItemHandler.registerItems(new GameRegistry());

        ItemHandler.addNames(new LanguageRegistry());

 

        // calls the toolhandler class allowing our tools to show up in game

        ToolHandler.configureTools(config);

        ToolHandler.registerTools(new GameRegistry());

        ToolHandler.addNames(new LanguageRegistry());

        ToolHandler.setToolClass(new MinecraftForge());

 

        // calls the armorhandler class allowing our armors to show up in game

        ArmorHandler.configureArmors(config);

        ArmorHandler.registerArmor(new GameRegistry());

        ArmorHandler.addNames(new LanguageRegistry());

 

        // calls the liquidhandler class allowing our fluids to show up in game

        LiquidHandler.configurefluids(config);

        LiquidHandler.registerfluids(new GameRegistry());

        LiquidHandler.addNAmes(new LanguageRegistry());

        LiquidHandler.fluidContainerRegistry();

 

        // calls the crophandler class allowing our crops to show up in game

        CropHandler.configureCrops(config);

        CropHandler.registerCrops(new GameRegistry());

        CropHandler.addNames(new LanguageRegistry());

        CropHandler.addGrassSeedDrop(new MinecraftForge());

 

        // calls the eventhandler, allowing an empty bucket to pick up our fluid

        TutorialEventHandler.registerEvents();

 

        /*

        * calls the creative tab handler allowing our creative tab to have its

        * own custom name

        */

        CreativeTabHandler.setNames(new LanguageRegistry());

 

        /*

        * calls the classregistry class allowing what ever classes we need to

        * register, to show up in the game...

        */

        ClassRegistry.classRegistry(new GameRegistry());

 

        /*

        * Recipes need to be on bottom. Otherwise you may get a

        * nullpointerexception! calls the recipehandler allowing for our

        * crafting recipes

        */

        RecipeHandler.registerCrafting(new GameRegistry());

        RecipeHandler.registerSmelting(new GameRegistry());

 

        proxy.init();

    }

 

    @EventHandler

    public void Init(FMLInitializationEvent event) {

 

    }

 

    @EventHandler

    public void postInit(FMLPostInitializationEvent event) {

 

    }

}

 

 

if (You.likescoding == false){
      You.goaway;
}

Link to comment
Share on other sites

After putting in:

 

        	
        Configuration config = new Configuration(event.getSuggestedConfigurationFile());
            config.load();
            BlockIds.createConfigfile(config);
            config.save();

 

instead of

 

ConfigurationHandler.init(new File(event.getModConfigurationDirectory().getAbsolutePath()+ File.separator + ModInfo.ID + File.separator + ModInfo.ID + ".cfg"));

 

After commenting out all of the ConfigurationHandler class it still refuses to startup, producing the same error report.

Link to comment
Share on other sites

Sure:

 

---- Minecraft Crash Report ----
// This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~]

Time: 07/09/13 17:23
Description: Initializing game

java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:457)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:194)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:105)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:510)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:182)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:470)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796)
at net.minecraft.client.main.Main.main(Main.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
Caused by: java.lang.IllegalArgumentException: Slot 0 is already occupied by RosarioMokaChan.RandomCraft.blocks.PlutoniumBlock@24ea5bd0 when adding RosarioMokaChan.RandomCraft.blocks.PlutoniumOre@1631c79f
at net.minecraft.block.Block.<init>(Block.java:348)
at RosarioMokaChan.RandomCraft.blocks.PlutoniumOre.<init>(PlutoniumOre.java:11)
at RosarioMokaChan.RandomCraft.RandomCraft.<clinit>(RandomCraft.java:60)
... 35 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:457)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:194)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:105)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:510)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:182)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:470)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796)
at net.minecraft.client.main.Main.main(Main.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
at net.minecraft.launchwrapper.Launch.main(Launch.java:18)

-- System Details --
Details:
Minecraft Version: 1.6.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_21, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 765621096 bytes (730 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.04 FML v6.2.35.804 Minecraft Forge 9.10.0.804 4 mods loaded, 4 mods active
mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{6.2.35.804} [Forge Mod Loader] (coremods) Unloaded->Constructed
Forge{9.10.0.804} [Minecraft Forge] (coremods) Unloaded->Constructed
RandomCraft{0.0.1} [RandomCraft] (bin) Unloaded
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: GeForce GTX 645/PCIe/SSE2 GL version 4.3.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Pack: Default
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null

Link to comment
Share on other sites

Ok, the BlockIds class is already here so i'll post a few others;

 

package RosarioMokaChan.RandomCraft.lib;

public class Strings {

public static final String PLUTONIUMBLOCK_NAME = "plutoniumBlock";
public static final String PLUTONIUMORE_NAME = "plutoniumOre";
public static final String RADIUMBLOCK_NAME = "radiumBlock";
public static final String RADIUMORE_NAME = "radiumOre";
public static final String MOONSTONE_NAME = "moonstone";

public static final String ENDERHATCHER_NAME = "enderHatcher";
public static final String PLUTONIUMINGOT_NAME = "plutoniumIngot";
public static final String RADIUMINGOT_NAME = "radiumIngot";
public static final String MOONSTONEDUST_NAME = "moonstoneDust";
public static final String DRAGONWINGS_NAME = "dragonWings";
public static final String DIAMONDHORSECHEST_NAME = "diamondHorseChest";
public static final String DIAMONDHORSEHELM_NAME = "diamondHorseHelm";
public static final String GOLDHORSECHEST_NAME = "goldHorseChest";
public static final String GOLDHORSEHELM_NAME = "goldHorseHelm";
public static final String IRONHORSECHEST_NAME = "ironHorseChest";
public static final String IRONHORSEHELM_NAME = "ironHorseHelm";


}

 

In main class under load:

 

//Blocks
                //Block of Plutonium
                GameRegistry.registerBlock(plutoniumBlock, Strings.PLUTONIUMBLOCK_NAME);
                LanguageRegistry.addName(plutoniumBlock, "Block of Plutonium");
                MinecraftForge.setBlockHarvestLevel(plutoniumBlock, "pickaxe", 2);
                //Plutonium Ore
                GameRegistry.registerBlock(plutoniumOre, Strings.PLUTONIUMORE_NAME);
                LanguageRegistry.addName(plutoniumOre, "Plutonium Ore");
                MinecraftForge.setBlockHarvestLevel(plutoniumOre, "pickaxe", 2);
                //Block of Radium
                GameRegistry.registerBlock(radiumBlock, Strings.RADIUMBLOCK_NAME);
                LanguageRegistry.addName(radiumBlock, "Block of Radium");
                MinecraftForge.setBlockHarvestLevel(radiumBlock, "pickaxe", 2);
                //Radium Ore
                GameRegistry.registerBlock(radiumOre, Strings.RADIUMORE_NAME);
                LanguageRegistry.addName(radiumOre, "Radium Ore");
                MinecraftForge.setBlockHarvestLevel(radiumOre, "pickaxe", 2);
                //Moonstone
                GameRegistry.registerBlock(moonstone, Strings.MOONSTONE_NAME);
                LanguageRegistry.addName(moonstone, "Moonstone");
                MinecraftForge.setBlockHarvestLevel(moonstone, "pickaxe", 0);

 

The PlutoniumOre class:

 

package RosarioMokaChan.RandomCraft.blocks;

import RosarioMokaChan.RandomCraft.RandomCraft;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;

public class PlutoniumOre extends Block {

public PlutoniumOre(int id, Material material) {
	super(id, material);

	setHardness(3.8f);
	setStepSound(Block.soundStoneFootstep);
	setUnlocalizedName("plutoniumOre");
	setCreativeTab(RandomCraft.RandomCraftTab);
}
}

 

Anything else you'd like me to add?

Link to comment
Share on other sites

Ok, the entire RandomCraft.java:

 

package RosarioMokaChan.RandomCraft;

import java.io.File;

import RosarioMokaChan.RandomCraft.blocks.Moonstone;
import RosarioMokaChan.RandomCraft.blocks.PlutoniumBlock;
import RosarioMokaChan.RandomCraft.blocks.PlutoniumOre;
import RosarioMokaChan.RandomCraft.blocks.RadiumBlock;
import RosarioMokaChan.RandomCraft.blocks.RadiumOre;
import RosarioMokaChan.RandomCraft.items.DiamondHorseChest;
import RosarioMokaChan.RandomCraft.items.DiamondHorseHelm;
import RosarioMokaChan.RandomCraft.items.DragonWings;
import RosarioMokaChan.RandomCraft.items.EnderHatcher;
import RosarioMokaChan.RandomCraft.items.GoldHorseChest;
import RosarioMokaChan.RandomCraft.items.GoldHorseHelm;
import RosarioMokaChan.RandomCraft.items.IronHorseChest;
import RosarioMokaChan.RandomCraft.items.IronHorseHelm;
import RosarioMokaChan.RandomCraft.items.MoonstoneDust;
import RosarioMokaChan.RandomCraft.items.PlutoniumIngot;
import RosarioMokaChan.RandomCraft.items.RadiumIngot;
import RosarioMokaChan.RandomCraft.lib.BlockIds;
import RosarioMokaChan.RandomCraft.lib.ItemIds;
import RosarioMokaChan.RandomCraft.lib.ModInfo;
import RosarioMokaChan.RandomCraft.lib.Strings;
import RosarioMokaChan.RandomCraft.proxies.CommonProxy;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.MinecraftForge;
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.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
// used in 1.6.2

@Mod(modid=ModInfo.ID, name=ModInfo.NAME, version=ModInfo.VERS)
@NetworkMod( channels = ModInfo.CHANNEL, clientSideRequired = true, serverSideRequired = true, packetHandler = PacketHandler.class )
public class RandomCraft {

public static CreativeTabs RandomCraftTab = new CreativeTabs("RandomCraftTab"){
	public ItemStack getIconItemStack(){
		return new ItemStack(plutoniumIngot);
	}
};

//World Generation
EventManager oreManager = new EventManager();	

//Blocks
public final static Block plutoniumBlock = new PlutoniumBlock(BlockIds.PLUTONIUMBLOCK_ID, Material.iron);
public final static Block plutoniumOre = new PlutoniumOre(BlockIds.PLUTONIUMORE_ID, Material.rock);
public final static Block radiumBlock = new RadiumBlock(BlockIds.RADIUMBLOCK_ID, Material.iron);
public final static Block radiumOre = new RadiumOre(BlockIds.RADIUMORE_ID, Material.rock);
public final static Block moonstone = new Moonstone(BlockIds.MOONSTONE_ID, Material.glass);

//Items
public final static Item enderHatcher = new EnderHatcher(BlockIds.ENDERHATCHER_ID);
public final static Item plutoniumIngot = new PlutoniumIngot(BlockIds.PLUTONIUMINGOT_ID);
public final static Item radiumIngot = new RadiumIngot(BlockIds.RADIUMINGOT_ID);
public final static Item moonstoneDust = new MoonstoneDust(BlockIds.MOONSTONEDUST_ID);
public final static Item dragonWings = new DragonWings(BlockIds.DRAGONWINGS_ID);

public static Item diamondHorseChest = new DiamondHorseChest(BlockIds.DIAMONDHORSECHEST_ID);
public static Item diamondHorseHelm = new DiamondHorseHelm(BlockIds.DIAMONDHORSEHELM_ID);
public static Item goldHorseChest = new GoldHorseChest(BlockIds.GOLDHORSECHEST_ID);
public static Item goldHorseHelm = new GoldHorseHelm(BlockIds.GOLDHORSEHELM_ID);
public static Item ironHorseChest = new IronHorseChest(BlockIds.IRONHORSECHEST_ID);
public static Item ironHorseHelm = new IronHorseHelm(BlockIds.IRONHORSEHELM_ID);

        // The instance of your mod that Forge uses.
        @Instance(value = ModInfo.ID)
        public static RandomCraft instance;
        
        // Says where the client and server 'proxy' code is loaded.
        @SidedProxy(clientSide= ModInfo.PROXY_LOCATION + ".ClientProxy", serverSide= ModInfo.PROXY_LOCATION + ".CommonProxy")
        public static CommonProxy proxy;
        
        @EventHandler // used in 1.6.2
        public void preInit(FMLPreInitializationEvent event) {
                // Stub Method
        	//ConfigurationHandler.init(new File(event.getModConfigurationDirectory().getAbsolutePath()+ File.separator + ModInfo.ID + File.separator + ModInfo.ID + ".cfg"));
        	Configuration config = new Configuration(event.getSuggestedConfigurationFile());
            config.load();
            BlockIds.createConfigfile(config);
            config.save();
        	proxy.initRenderers();
        	proxy.initSounds();
        	
        }
        
        @EventHandler // used in 1.6.2
        public void load(FMLInitializationEvent event) {
                
                MinecraftForge.EVENT_BUS.register(new DragonDrops());
                
                //Defining stacks for recipies
                ItemStack plutoniumBlockStack = new ItemStack(RandomCraft.plutoniumBlock);
                ItemStack plutoniumIngotStack = new ItemStack(RandomCraft.plutoniumIngot, 4);
                ItemStack radiumBlockStack = new ItemStack(RandomCraft.radiumBlock);
                ItemStack radiumIngotStack = new ItemStack(RandomCraft.radiumIngot, 4);
                ItemStack moonstoneStack = new ItemStack(RandomCraft.moonstone);
                ItemStack moonstoneDustStack = new ItemStack(RandomCraft.moonstoneDust, 4);
                
                //Shapeless recipes
                //Gets 4 plutonium ingots from 1 block
                GameRegistry.addShapelessRecipe(plutoniumIngotStack, plutoniumBlock);
                //Makes 1 plutonium block from 4 ingots
                GameRegistry.addRecipe(plutoniumBlockStack, "XX", "XX", 
                		'X', plutoniumIngot);
                //Gets 4 radium ingots from 1 block
                GameRegistry.addShapelessRecipe(radiumIngotStack, radiumBlock);
                //Makes 1 radium block from 4 ingots
                GameRegistry.addRecipe(radiumBlockStack, "XX", "XX", 
                		'X', radiumIngot);
                //Gets 4 moonstone dust from 1 moonstone
                GameRegistry.addShapelessRecipe(moonstoneDustStack, moonstone);
                //Makes 1 moonstone from 4 moonstone dust
                GameRegistry.addRecipe(moonstoneStack, "XX", "XX", 
                		'X', moonstoneDust);
                
                
                //Ore Generation
                GameRegistry.registerWorldGenerator(oreManager);
                
                //Blocks
                //Block of Plutonium
                GameRegistry.registerBlock(plutoniumBlock, Strings.PLUTONIUMBLOCK_NAME);
                LanguageRegistry.addName(plutoniumBlock, "Block of Plutonium");
                MinecraftForge.setBlockHarvestLevel(plutoniumBlock, "pickaxe", 2);
                //Plutonium Ore
                GameRegistry.registerBlock(plutoniumOre, Strings.PLUTONIUMORE_NAME);
                LanguageRegistry.addName(plutoniumOre, "Plutonium Ore");
                MinecraftForge.setBlockHarvestLevel(plutoniumOre, "pickaxe", 2);
                //Block of Radium
                GameRegistry.registerBlock(radiumBlock, Strings.RADIUMBLOCK_NAME);
                LanguageRegistry.addName(radiumBlock, "Block of Radium");
                MinecraftForge.setBlockHarvestLevel(radiumBlock, "pickaxe", 2);
                //Radium Ore
                GameRegistry.registerBlock(radiumOre, Strings.RADIUMORE_NAME);
                LanguageRegistry.addName(radiumOre, "Radium Ore");
                MinecraftForge.setBlockHarvestLevel(radiumOre, "pickaxe", 2);
                //Moonstone
                GameRegistry.registerBlock(moonstone, Strings.MOONSTONE_NAME);
                LanguageRegistry.addName(moonstone, "Moonstone");
                MinecraftForge.setBlockHarvestLevel(moonstone, "pickaxe", 0);
                
                //Items
                //Plutonium Ingot
                GameRegistry.registerItem(plutoniumIngot, Strings.PLUTONIUMINGOT_NAME);
                LanguageRegistry.addName(plutoniumIngot, "Plutonium Ingot");
                //Plutonium Ingot
                GameRegistry.registerItem(radiumIngot, Strings.RADIUMINGOT_NAME);
                LanguageRegistry.addName(radiumIngot, "Radium Ingot");
                //Ender Hatcher
                GameRegistry.registerItem(enderHatcher, Strings.ENDERHATCHER_NAME);
                LanguageRegistry.addName(enderHatcher, "Ender Hatcher");
                //Moonstone Dust
                GameRegistry.registerItem(moonstoneDust, Strings.MOONSTONEDUST_NAME);
                LanguageRegistry.addName(moonstoneDust, "Moonstone Dust");
                //Dragon Wings
                GameRegistry.registerItem(dragonWings, Strings.DRAGONWINGS_NAME);
                LanguageRegistry.addName(dragonWings, "Dragon Wings");
                
                //Horse Armour
                GameRegistry.registerItem(diamondHorseChest, Strings.DIAMONDHORSECHEST_NAME);
                GameRegistry.registerItem(diamondHorseHelm, Strings.DIAMONDHORSEHELM_NAME);
                GameRegistry.registerItem(goldHorseChest, Strings.GOLDHORSECHEST_NAME);
                GameRegistry.registerItem(goldHorseHelm, Strings.GOLDHORSEHELM_NAME);
                GameRegistry.registerItem(ironHorseChest, Strings.IRONHORSECHEST_NAME);
                GameRegistry.registerItem(ironHorseHelm, Strings.IRONHORSEHELM_NAME);
                
                LanguageRegistry.addName(diamondHorseChest, "Diamond Horse Chestplate");
                LanguageRegistry.addName(diamondHorseHelm, "Diamond Horse Helmet");
                LanguageRegistry.addName(ironHorseChest, "Iron Horse Chestplate");
                LanguageRegistry.addName(ironHorseHelm, "Iron Horse Helmet");
                LanguageRegistry.addName(goldHorseChest, "Gold Horse Chestplate");
                LanguageRegistry.addName(goldHorseHelm, "Gold Horse Helmet");
                
                GameRegistry.addRecipe(new ItemStack(diamondHorseHelm,1), new Object[]{
                	"XXX","XYX","Z Z",'X',Item.diamond,'Y',Item.silk,'Z',Item.leather,
                	});
                GameRegistry.addRecipe(new ItemStack(diamondHorseChest,1), new Object[]{
                	"XZX","XYX","XXX",'X',Item.diamond,'Y',Item.silk,'Z',Item.leather,
                	});
                GameRegistry.addRecipe(new ItemStack(goldHorseHelm,1), new Object[]{
                	"XXX","XYX","Z Z",'X',Item.ingotGold,'Y',Item.silk,'Z',Item.leather,
                	});
                GameRegistry.addRecipe(new ItemStack(goldHorseChest,1), new Object[]{
                	"XZX","XYX","XXX",'X',Item.ingotGold,'Y',Item.silk,'Z',Item.leather,
                	});
                GameRegistry.addRecipe(new ItemStack(ironHorseHelm,1), new Object[]{
                	"XXX","XYX","Z Z",'X',Item.ingotIron,'Y',Item.silk,'Z',Item.leather,
                	});
                GameRegistry.addRecipe(new ItemStack(ironHorseChest,1), new Object[]{
                	"XZX","XYX","XXX",'X',Item.ingotIron,'Y',Item.silk,'Z',Item.leather,
                	});
                GameRegistry.addShapelessRecipe(new ItemStack(Item.field_111215_ce,1), new Object[]{ ironHorseChest, ironHorseHelm });
                GameRegistry.addShapelessRecipe(new ItemStack(Item.field_111216_cf,1), new Object[]{ goldHorseChest, goldHorseHelm });
                GameRegistry.addShapelessRecipe(new ItemStack(Item.field_111213_cg,1), new Object[]{ diamondHorseHelm, diamondHorseChest });
                
                //Creative Tab
                LanguageRegistry.instance().addStringLocalization("itemGroup.RandomCraftTab", "en_US", "RandomCraft");
        }
        
        @EventHandler // used in 1.6.2
        public void postInit(FMLPostInitializationEvent event) {
                // Stub Method
        }
}

Link to comment
Share on other sites

public final static Block plutoniumBlock = new PlutoniumBlock(BlockIds.PLUTONIUMBLOCK_ID, Material.iron);
public final static Block plutoniumOre = new PlutoniumOre(BlockIds.PLUTONIUMORE_ID, Material.rock);

You will never use the correct id with this.

Set the blocks after loading the config file.

Link to comment
Share on other sites

public final static Block plutoniumBlock = new PlutoniumBlock(BlockIds.PLUTONIUMBLOCK_ID, Material.iron);
public final static Block plutoniumOre = new PlutoniumOre(BlockIds.PLUTONIUMORE_ID, Material.rock);

You will never use the correct id with this.

Set the blocks after loading the config file.

 

That should work, great job for thinking of that!

 

 

if (You.likescoding == false){
      You.goaway;
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
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.