Jump to content

Recommended Posts

Posted

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

Posted

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();
	}
}
}

Posted

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;
}

Posted

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;
}

Posted

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.

Posted

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

 

hope this helps you

 

IdHandler

 

  Reveal hidden contents

 

 

blockhandler (to show you how I call the IDs

 

  Reveal hidden contents

 

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

Posted

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();


}
}

Posted

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

 

main mod class

 

  Reveal hidden contents

 

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

Posted

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.

Posted

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

Posted

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?

Posted

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
        }
}

Posted

I made some videos that might help.

 

right when I start out I start by making a config file

 

so far there are 14 episodes, ill be making more shortly

 

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

Posted

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.

Posted
  On 9/7/2013 at 5:54 PM, GotoLink said:

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;
}

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

    • wait, i just did that. why didn't it work? also it's the same. help me!!!!
    • Culprit has been located! It was Tough As Nails + (plus) which was among one of the mods *added* before re-entering, in an attempt to improve compatibility. It, for some reason or another, did not want to work!
    • "You can either try to load it with only the vanilla data pack ("safe mode"), or go back to the title screen and fix it manually." Hello! I encountered this error just now while attempting to re-enter my world for the first time. Notably, no mods were removed before encountering this error and, while being able to find this error elsewhere on the internet, in my scenario it is seemingly caused by a specific mod, of which I cannot isolate. Things I have tried: - Enter "Safe Mode" (fails) - Remove datapacks (no change) - Reverted to old save data (no change) Here is the server log: https://mclo.gs/9vJQEfN I use Modrinth mod loader so please let me know how to share my mod list, and if it is needed.
    • So, i'm hosting (or attempting to host) a port-forwarded modded server for 1.12.2. There's quite a few mods in this pack, but they all run and have no compatibility issues (besides something causing the game to crash if you go fullscreen, a problem ive given up trying to identify or fix). It can run on 6gb of ram or less, and works fine in singleplayer. All of my friends that want to join have the exact same mod/config/game setup as I do (I personally helped them set everything up). Just to be safe, we've all allocated 12 gigabytes of RAM to the installation, and I've also allocated 12GB to the server itself. I am able to join with no issue and it runs fine. However, when they try to join, it gets stuck in the 'logging in' screen before their game becomes unresponsive. When they close it, it gives them the exit code 805306369, which usually means not enough RAM, but this cant be the case. On my screen, in the server, it shows them joining, and then disconnecting, so I dont think its a port-forwarding issue. They can all run it just fine in singleplayer as well. The annoying bit about this particular issue is that it generates no crash log. Does anyone have any suggestions? Thanks! Here is my debug log, and his, starting from the same place. MINE: [132647] [Netty Client IO #5INFO] [FML] Attempting connection with missing mods [ctm, fusion] at SERVER 132653.817 [132653] [Client threadINFO] [minecraftGuiConnecting] Connecting to 0, 25565 132654.682 [132654] [Netty Client IO #9INFO] [STDOUT] [xaero.common.core.transformer.ClassNodeTransformertransform29] Transforming class brz net.minecraft.client.network.NetHandlerPlayClient 132654.684 [132654] [Netty Client IO #9INFO] [STDOUT] [xaero.map.core.transformer.ClassNodeTransformertransform29] Transforming class net.minecraft.client.network.NetHandlerPlayClient 132654.764 [132654] [Netty Client IO #9INFO] [FML] Server protocol version 2 132654.777 [132654] [Netty Client IO #9INFO] [FML] Attempting connection with missing mods [ctm, fusion] at SERVER 132656.193 [132656] [Client threadINFO] [FML] Injecting existing registry data into this client instance 132659.081 [132659] [Client threadINFO] [FML] Applying holder lookups 132659.082 [132659] [Client threadINFO] [FML] Holder lookups applied 132659.092 [132659] [Netty Client IO #9INFO] [FML] [Netty Client IO #9] Client side modded connection established HIS: [13:12:16] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [ctm, fusion] at SERVER 13:12:25.597 [13:12:25] [Client thread/INFO] [minecraft/GuiConnecting]: Connecting to (my IP address and the server port 25565) 13:12:26.805 [13:12:26] [Netty Client IO #1/INFO] [STDOUT]: [xaero.common.core.transformer.ClassNodeTransformer:transform:29]: Transforming class brz net.minecraft.client.network.NetHandlerPlayClient 13:12:26.808 [13:12:26] [Netty Client IO #1/INFO] [STDOUT]: [xaero.map.core.transformer.ClassNodeTransformer:transform:29]: Transforming class net.minecraft.client.network.NetHandlerPlayClient 13:12:26.936 [13:12:26] [Netty Client IO #1/INFO] [FML]: Server protocol version 2 13:12:27.114 [13:12:27] [Netty Client IO #1/INFO] [FML]: Attempting connection with missing mods [ctm, fusion] at SERVER 13:12:27.480 [13:12:27] [Client thread/INFO] [FML]: Injecting existing registry data into this client instance 13:12:30.669 [13:12:30] [Client thread/INFO] [FML]: Applying holder lookups 13:12:30.671 [13:12:30] [Client thread/INFO] [FML]: Holder lookups applied 13:13:04.700 Process crashed with exit code -805306369 P.S - Both mods "CTM" and "FUSION" are present in both our folders so idk what that's about.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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