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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Ok so, i managed to fix it, if you have zombie awarness it requires coroutil, even if the mod page doesn't say it needs it it does.  
    • Did you check the getRenderShape method of your block to ensure it's returning the correct enum value?
    • new to messing with modpacks. the server starts and the pack is playable on personal worlds, but every time i try to enter the server, i get "internal exception: io.netty.handler.codec.DecoderException: java.lang.IllegalArgumentException: Payload may not be larger than 1048576 bytes" and it boots me. not sure what this means. the debug log is essentially gibberish to me and i'm not sure... about anything. is it saying that it's sending me too much data? if it helps at all, my mc username is "leucanella", and the disconnect reasons are near the very bottom (at least once was due to mismatched modlists, but i got that fixed i'm pretty sure). i just can't make sense of it myself. https://gist.github.com/idlebird/c5269e80434a501104f6b99ebc16be46
    • We somehow figured out the issue: Whenever we try to eat a food item from the mod "[Let's Do] Candlelight" that can be eaten multiple times using a feeding upgrade from "Sophisticated Backpacks", that's when we crash. Food items include: - Beef Wellington - Bolognese - Chicken Alfredo - Chicken with Vegetables - Cooked Beef - Fricasse with Hash Browns - Lasagna - Lettuce with Steak - Lettuce with Tomatoes, Potatoes and Carrots - Mushroom Soup - Pasta with Bolognese - Pasta with Tomato Sauce - Pork Ribs - Roastbeef with Carrots - Salmon with White Wine Sauce - Tomato Mozzarella Salad - Tomato Soup - Tropical Fish Supreme
    • Me and my sister are playing on a modded minecraft server, but recently she has been crashing at random intervals and no one I've talked with knows why. There's no crash report on my sister's side, but in the log of the server there appears a bunch of lines every time she crashes. They appear to be mostly similar with different mods changing each crash. Minecraft Version: 1.20.1 Forge version: forge-47.2.20 Server log: [07May2024 18:13:29.067] [Server thread/ERROR] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: Exception caught during firing event: null     Index: 12     Listeners:         0: NORMAL         1: ASM: com.github.alexthe666.citadel.server.CitadelEvents@28c884eb onEntityUpdateDebug(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         2: net.minecraftforge.eventbus.EventBus$$Lambda$4374/0x00007f0098c72da0@10f79ae2         3: ASM: com.github.alexthe666.alexsmobs.event.ServerEvents@6f4126f3 onLivingUpdateEvent(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         4: ASM: class tallestegg.illagersweararmor.IWASpawnEvents tickEntity(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         5: ASM: class io.github.lightman314.lightmanscurrency.common.EventHandler entityTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         6: ASM: com.github.L_Ender.cataclysm.event.ServerEventHandler@1bbd60d8 onLivingUpdateEvent(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         7: ASM: class io.github.edwinmindcraft.apoli.common.ApoliPowerEventHandler playerTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         8: ASM: class io.github.edwinmindcraft.apoli.common.ApoliEventHandler livingTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         9: net.minecraftforge.eventbus.EventBus$$Lambda$4374/0x00007f0098c72da0@1e30768c         10: ASM: class net.mcreator.borninchaosv.init.EntityAnimationFactory onEntityTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         11: ASM: squeek.appleskin.network.SyncHandler@29e380f7 onLivingTickEvent(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         12: ASM: top.theillusivec4.curios.common.event.CuriosEventHandler@55b4416c tick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V java.lang.ArrayIndexOutOfBoundsException [07May2024 18:13:29.146] [Server thread/WARN] [net.minecraft.server.network.ServerConnectionListener/]: Failed to handle packet for /OMITTED IP net.minecraft.ReportedException: Ticking player     at net.minecraft.server.level.ServerPlayer.m_9240_(ServerPlayer.java:530) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.server.network.ServerGamePacketListenerImpl.m_9933_(ServerGamePacketListenerImpl.java:262) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.network.Connection.m_129483_(Connection.java:263) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.server.network.ServerConnectionListener.m_9721_(ServerConnectionListener.java:142) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:907) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:283) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:814) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:661) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.lang.ArrayIndexOutOfBoundsException Mod List: SecurityCraft v1.9.9.jar additional_lights-1.20.1-2.1.7.jar advancements_tracker_1.20.1-6.1.0.jar AI-Improvements-1.20-0.5.2.jar alexsdelight-1.5.jar alexsmobs-1.22.8.jar AmbientSounds_FORGE_v5.3.9_mc1.20.1.jar amendments-1.20-1.1.26.jar appleskin-forge-mc1.20.1-2.5.1.jar Aquaculture-1.20.1-2.5.1.jar aquaculture_delight_1.0.0_forge_1.20.1.jar architectury-9.2.14-forge.jar Arda's Sculks 1.3.2 [FORGE] [1.20.1].jar artifacts-forge-9.5.3.jar async-locator-forge-1.20-1.3.0.jar athena-forge-1.20.1-3.1.2.jar AttributeFix-Forge-1.20.1-21.0.4.jar BadOptimizations-2.1.1.jar badpackets-forge-0.4.3.jar balm-forge-1.20.1-7.2.2.jar beautify-2.0.2.jar BetterAdvancements-1.20.1-0.3.2.162.jar bettercombat-forge-1.8.5+1.20.1.jar BetterF3-7.0.2-Forge-1.20.1.jar betterfarmerscombat-1.2-1.20.1.jar BetterThirdPerson-Forge-1.20-1.9.0.jar BiomesOPlenty-1.20.1-18.0.0.598.jar Bookshelf-Forge-1.20.1-20.1.10.jar born_in_chaos_[Forge]1.20.1_1.2.jar Bountiful-6.0.3+1.20.1-forge.jar caelus-forge-3.2.0+1.20.1.jar camera-forge-1.20.1-1.0.8.jar canary-mc1.20.1-0.3.3.jar chat_heads-0.10.32-forge-1.20.jar Chimes-v2.0.1-1.20.1.jar Chipped-forge-1.20.1-3.0.6.jar chunksending-1.20.1-2.8.jar Chunky-1.3.136.jar citadel-2.5.4-1.20.1.jar cloth-config-11.1.118-forge.jar Clumps-forge-1.20.1-12.0.0.3.jar cluttered-2.1-1.20.1.jar connectedglass-1.1.11-forge-mc1.20.1.jar Controlling-forge-1.20.1-12.0.2.jar corpse-forge-1.20.1-1.0.12.jar cosmeticarmorreworked-1.20.1-v1a.jar CreativeCore_FORGE_v2.11.27_mc1.20.1.jar creeperoverhaul-3.0.2-forge.jar Croptopia-1.20.1-FORGE-3.0.4.jar ctia-1.20.1-forge-2.0.9.jar cupboard-1.20.1-2.6.jar curios-forge-5.9.0+1.20.1.jar CustomPlayerModels-1.20-0.6.16c.jar darktimer-forge-1.20.1-1.0.9.jar dotbe-1.20.1-1.5.5.jar dummmmmmy-1.20-1.8.14.jar DungeonsArise-1.20.x-2.1.58-release.jar DungeonsAriseSevenSeas-1.20.x-1.0.2-forge.jar dye_depot-1.0.0-forge.jar dynamiclights-v1.7.1-mc1.17x-1.20x-mod.jar easy_mob_farm_1.20.1-7.1.0.jar elevatorid-1.20.1-lex-1.9.jar embeddium-0.3.17+mc1.20.1-all.jar embeddiumplus-1.20.1-v1.2.8.jar emotecraft-for-MC1.20.1-2.2.7-b.build.50-forge.jar EnchantmentDescriptions-Forge-1.20.1-17.0.14.jar EnderMail-1.20.1-1.2.9.jar endermanoverhaul-forge-1.20.1-1.0.4.jar endersdelight-1.20.1-1.0.3.jar entityculling-forge-1.6.2-mc1.20.1.jar EpheroLib-1.20.1-FORGE-1.2.0.jar fantasyfurniture-1.20.1-9.0.0.jar FarmersDelight-1.20.1-1.2.4.jar farmersutils-1.0.5-1.20.1.jar Fastload-Reforged-mc1.20.1-3.4.0.jar fastpaintings-1.20-1.2.5.jar ferritecore-6.0.1-forge.jar friendsandfoes-forge-mc1.20.1-2.0.10.jar ftb-essentials-forge-2001.2.2.jar ftb-library-forge-2001.2.1.jar fusion-1.1.1-forge-mc1.20.1.jar geckolib-forge-1.20.1-4.4.4.jar getittogetherdrops-forge-1.20-1.3.jar handcrafted-forge-1.20.1-3.0.6.jar IllagerInvasion-v8.0.5-1.20.1-Forge.jar illagersweararmor-1.20.1-1.3.4.jar ImmediatelyFast-Forge-1.2.13+1.20.4.jar immersive_melodies-0.1.0+1.20.1-forge.jar Incendium_1.20.4_v5.3.4.jar Item_Obliterator-FORGE-MC1.20.1-1.7.0.jar Jade-1.20.1-forge-11.8.0.jar jei-1.20.1-forge-15.3.0.4.jar journeymap-1.20.1-5.9.20-forge.jar Kambrik-6.1.1+1.20.1-forge.jar kotlinforforge-4.10.0-all.jar L_Enders_Cataclysm-1.99.2 -1.20.1.jar LeavesBeGone-v8.0.0-1.20.1-Forge.jar letmedespawn-forge-1.20.x-1.2.0.jar letsdo-addon-compat-forge-v1.4.1.jar letsdo-API-forge-1.2.9-forge.jar letsdo-bakery-forge-1.1.8.jar letsdo-beachparty-forge-1.1.4-1.jar letsdo-brewery-forge-1.1.6.jar letsdo-candlelight-forge-1.2.11.jar letsdo-herbalbrews-forge-1.0.6.jar letsdo-meadow-forge-1.3.8.jar letsdo-nethervinery-forge-1.2.10.jar letsdo-vinery-forge-1.4.15.jar lightmanscurrency-1.20.1-2.2.1.3b.jar lionfishapi-1.8.jar magicvibedecorations-HALLOWEEN 1.5.0 1.20.1 forge.jar make_bubbles_pop-0.2.0-forge-mc1.19.4+.jar memoryleakfix-forge-1.17+-1.1.5.jar MobLassos-v8.0.1-1.20.1-Forge.jar modelfix-1.15.jar moonlight-1.20-2.11.14-forge.jar morediscs-1.20.1-33-forge.jar MouseTweaks-forge-mc1.20-2.25.jar Necronomicon-Forge-1.4.2.jar nether-s-exoticism-1.20.1-1.2.7.jar nethersdelight-1.20.1-4.0.jar nomowanderer-1.20.1_1.6.4.jar oculus-mc1.20.1-1.7.0.jar origins-forge-1.20.1-1.10.0.7-all.jar origins-plus-plus-2.2-forge.jar Paraglider-forge-20.1.3.jar Patchouli-1.20.1-84-FORGE.jar Paxi-1.20-Forge-4.0.jar Pehkui-3.8.0+1.20.1-forge.jar player-animation-lib-forge-1.0.2-rc1+1.20.jar PlayerRevive_FORGE_v2.0.24_mc1.20.1.jar plushies-1.4.0-forge.jar polymorph-forge-0.49.3+1.20.1.jar projectvibrantjourneys-1.20.1-6.0.0.jar PuzzlesLib-v8.1.18-1.20.1-Forge.jar resourcefulconfig-forge-1.20.1-2.1.2.jar resourcefullib-forge-1.20.1-2.1.24.jar right-click-harvest-3.2.3+1.20.1-forge.jar rubidium-extra-0.5.4.3+mc1.20.1-build.121.jar Runelic-Forge-1.20.1-18.0.2.jar saturn-mc1.20.1-0.1.3.jar sawmill-1.20-1.3.13.jar scholar-1.20.1-1.0.0-forge.jar screenshot_viewer-1.2.1-forge-mc1.20.1.jar Searchables-forge-1.20.1-1.0.2.jar selfexpression-2.8 1.20.1.jar servercore-forge-1.5.1+1.20.1.jar ShulkerArmory_1.20.1_1.2.1_hotfix.jar simplehats-forge-1.20.1-0.2.4.jar simplevoicechat_broadcast-mc1.20.1-1.0.1.jar simplyswords-forge-1.55.0-1.20.1.jar smoothboot(reloaded)-mc1.20.1-0.0.4.jar Sniffer+-forge-1.20.1-0.3.0.jar sophisticatedbackpacks-1.20.1-3.20.5.1044.jar sophisticatedcore-1.20.1-0.6.21.609.jar sophisticatedstorage-1.20.1-0.10.21.793.jar spark-1.10.53-forge.jar stalwart-dungeons-1.20.1-1.2.8.jar starlight-1.1.2+forge.1cda73c.jar step-1.20.1-1.2.2.jar supermartijn642corelib-1.1.17-forge-mc1.20.1.jar supplementaries-1.20-2.8.10.jar temporalapi-1.5.0.jar TerraBlender-forge-1.20.1-3.0.1.4.jar Terralith_1.20.4_v2.4.11.jar toms_storage-1.20-1.6.6.jar torchmaster-20.1.6.jar trashslot-forge-1.20-15.1.0.jar treasuredistance-1.20-1.2.jar tru.e-ending-v1.1.0c.jar v_slab_compat-1.20-2.3.jar vintagedelight-0.0.12.jar vmp-fabric-mc1.20.1-0.2.0+beta.7.101-all.jar voicechat-forge-1.20.1-2.5.11.jar waystones-forge-1.20-14.1.3.jar WI-Zoom-1.5-MC1.20.1-Forge.jar worldedit-mod-7.2.15.jar wsopulence1.2.0_Forge_MC1.20.1-1.20.4.jar xlpackets-1.18.2-2.1.jar YungsApi-1.20-Forge-4.0.4.jar YungsBetterEndIsland-1.20-Forge-2.0.6.jar YungsBetterNetherFortresses-1.20-Forge-2.0.6.jar YungsBetterOceanMonuments-1.20-Forge-3.0.4.jar YungsBetterStrongholds-1.20-Forge-4.0.3.jar
  • Topics

×
×
  • Create New...

Important Information

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