Jump to content

[SOLVED]Config IDs Default to 0


DrOlive

Recommended Posts

I have just made a mod and have added lots of items and a few blocks which were working fine until i tried to create a config file. After I attempted to create the config file, Minecraft crashed and I got this error report:

 

 

---- Minecraft Crash Report ----

// Don't do that.

 

Time: 21/07/13 8:37 PM

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:193)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173)

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:104)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:510)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:172)

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 drolive.orenimals.OrenimalsBlock@732ec880 when adding drolive.orenimals.OrenimalsBlock@46d8694

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

at drolive.orenimals.OrenimalsBlock.<init>(OrenimalsBlock.java:12)

at drolive.orenimals.Orenimals.<clinit>(Orenimals.java:95)

... 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:193)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173)

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:104)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:510)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:172)

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_07, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 953450400 bytes (909 MB) / 1047592960 bytes (999 MB) up to 1047592960 bytes (999 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.19.789 Minecraft Forge 9.10.0.789 4 mods loaded, 4 mods active

mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed

FML{6.2.19.789} [Forge Mod Loader] (coremods) Unloaded->Constructed

Forge{9.10.0.789} [Minecraft Forge] (coremods) Unloaded->Constructed

Orenimals{1.0.0} [Orenimals] (bin) Unloaded

Launched Version: 1.6

LWJGL: 2.9.0

OpenGL: AMD M880G with ATI Mobility Radeon HD 4250 GL version 3.3.10179 Compatibility Profile Context, ATI Technologies Inc.

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

 

 

Here is my main class:

 

package drolive.orenimals;

 

import java.util.Random;

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.EnumToolMaterial;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.EnumHelper;

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;

 

@Mod(modid="Orenimals", name="Orenimals", version="1.0.0")

@NetworkMod(clientSideRequired=true, serverSideRequired=false)

 

public class Orenimals {

 

public static CreativeTabs tabOrenimals = new CreativeTabs("tabOrenimals") {

public ItemStack getIconItemStack() {

return new ItemStack(Orenimals.ingotChickenium, 1, 0);

}

};

 

public static EnumToolMaterial toolPorkite = EnumHelper.addToolMaterial("PORKITE", 1, 260, 5.0F, 1.5F, 10);

public static EnumToolMaterial toolChickenium = EnumHelper.addToolMaterial("CHICKENIUM", 1, 200, 6.2F, 1.5F, 10);

public static EnumToolMaterial toolSteakite = EnumHelper.addToolMaterial("STEAKITE", 1, 200, 5.0F, 2.5F, 10);

public static EnumToolMaterial toolWoolidium = EnumHelper.addToolMaterial("WOOLIDIUM", 1, 200, 5.0F, 1.5F, 16);

 

public static int ingotPorkiteID;

public static int ingotChickeniumID;

public static int ingotSteakiteID;

public static int ingotWoolidiumID;

public static int pickaxePorkiteID;

public static int pickaxeChickeniumID;

public static int pickaxeSteakiteID;

public static int pickaxeWoolidiumID;

public static int shovelPorkiteID;

public static int shovelChickeniumID;

public static int shovelSteakiteID;

public static int shovelWoolidiumID;

public static int hoePorkiteID;

public static int hoeChickeniumID;

public static int hoeSteakiteID;

public static int hoeWoolidiumID;

public static int axePorkiteID;

public static int axeChickeniumID;

public static int axeSteakiteID;

public static int axeWoolidiumID;

public static int swordPorkiteID;

public static int swordChickeniumID;

public static int swordSteakiteID;

public static int swordWoolidiumID;

public static int orePorkiteID;

public static int oreChickeniumID;

public static int oreSteakiteID;

public static int oreWoolidiumID;

 

public static final Item ingotPorkite = new OrenimalsItem(ingotPorkiteID, 64, tabOrenimals, "ingotPorkite").func_111206_d("orenimals:ingotPorkite");

public static final Item ingotChickenium = new OrenimalsItem(ingotChickeniumID, 64, tabOrenimals, "ingotChickenium").func_111206_d("orenimals:ingotChickenium");

public static final Item ingotSteakite = new OrenimalsItem(ingotSteakiteID, 64, tabOrenimals, "ingotSteakite").func_111206_d("orenimals:ingotSteakite");

public static final Item ingotWoolidium = new OrenimalsItem(ingotWoolidiumID, 64, tabOrenimals, "ingotWoolididum").func_111206_d("orenimals:ingotWoolidium");

public static final Item pickaxePorkite = new OrenimalsPickaxe(pickaxePorkiteID, toolPorkite, tabOrenimals, "pickaxePorkite").func_111206_d("Orenimals:pickaxePorkite");

public static final Item pickaxeChickenium = new OrenimalsPickaxe(pickaxeChickeniumID, toolChickenium, tabOrenimals, "pickaxeChickenium").func_111206_d("Orenimals:pickaxeChickenium");

public static final Item pickaxeSteakite = new OrenimalsPickaxe(pickaxeSteakiteID, toolSteakite, tabOrenimals, "pickaxeSteakite").func_111206_d("Orenimals:pickaxeSteakite");

public static final Item pickaxeWoolidium = new OrenimalsPickaxe(pickaxeWoolidiumID, toolWoolidium, tabOrenimals, "pickaxeWoolidium").func_111206_d("Orenimals:pickaxeWoolidium");

public static final Item shovelPorkite = new OrenimalsShovel(shovelPorkiteID, toolPorkite, tabOrenimals, "shovelPorkite").func_111206_d("Orenimals:shovelPorkite");

public static final Item shovelChickenium = new OrenimalsShovel(shovelChickeniumID, toolChickenium, tabOrenimals, "shovelChickenium").func_111206_d("Orenimals:shovelChickenium");

public static final Item shovelSteakite = new OrenimalsShovel(shovelSteakiteID, toolSteakite, tabOrenimals, "shovelSteakite").func_111206_d("Orenimals:shovelSteakite");

public static final Item shovelWoolidium = new OrenimalsShovel(shovelWoolidiumID, toolWoolidium, tabOrenimals, "shovelWoolidium").func_111206_d("Orenimals:shovelWoolidium");

public static final Item hoePorkite = new OrenimalsHoe(hoePorkiteID, toolPorkite, tabOrenimals, "hoePorkite").func_111206_d("Orenimals:hoePorkite");

public static final Item hoeChickenium = new OrenimalsHoe(hoeChickeniumID, toolChickenium, tabOrenimals, "hoeChickenium").func_111206_d("Orenimals:hoeChickenium");

public static final Item hoeSteakite = new OrenimalsHoe(hoeSteakiteID, toolSteakite, tabOrenimals, "hoeSteakite").func_111206_d("Orenimals:hoeSteakite");

public static final Item hoeWoolidium = new OrenimalsHoe(hoeWoolidiumID, toolWoolidium, tabOrenimals, "hoeWoolidium").func_111206_d("Orenimals:hoeWoolidium");

public static final Item axePorkite = new OrenimalsAxe(axePorkiteID, toolPorkite, tabOrenimals, "axePorkite").func_111206_d("Orenimals:hatchetPorkite");

public static final Item axeChickenium = new OrenimalsAxe(axeChickeniumID, toolChickenium, tabOrenimals, "axeChickenium").func_111206_d("Orenimals:hatchetChickenium");

public static final Item axeSteakite = new OrenimalsAxe(axeSteakiteID, toolSteakite, tabOrenimals, "axeSteakite").func_111206_d("Orenimals:hatchetSteakite");

public static final Item axeWoolidium = new OrenimalsAxe(axeWoolidiumID, toolWoolidium, tabOrenimals, "axeWoolidium").func_111206_d("Orenimals:hatchetWoolidium");

public static final Item swordPorkite = new OrenimalsSword(swordPorkiteID, toolPorkite, tabOrenimals, "swordPorkite").func_111206_d("Orenimals:swordPorkite");

public static final Item swordChickenium = new OrenimalsSword(swordChickeniumID, toolChickenium, tabOrenimals, "swordChickenium").func_111206_d("Orenimals:swordChickenium");

public static final Item swordSteakite = new OrenimalsSword(swordSteakiteID, toolSteakite, tabOrenimals, "swordSteakite").func_111206_d("Orenimals:swordSteakite");

public static final Item swordWoolidium = new OrenimalsSword(swordWoolidiumID, toolWoolidium, tabOrenimals, "swordWoolidium").func_111206_d("Orenimals:swordWoolidium");

 

public static final Block orePorkite = new OrenimalsBlock(orePorkiteID, Material.rock, 3.0F, Block.soundStoneFootstep, "orePorkite", tabOrenimals).func_111022_d("orenimals:orePorkite");

public static final Block oreChickenium = new OrenimalsBlock(oreChickeniumID, Material.rock, 3.0F, Block.soundStoneFootstep, "oreChickenium", tabOrenimals).func_111022_d("orenimals:oreChickenium");

public static final Block oreSteakite = new OrenimalsBlock(oreSteakiteID, Material.rock, 3.0F, Block.soundStoneFootstep, "oreSteakite", tabOrenimals).func_111022_d("orenimals:oreSteakite");

public static final Block oreWoolidium = new OrenimalsBlock(oreWoolidiumID, Material.rock, 3.0F, Block.soundStoneFootstep, "oreWoolidium", tabOrenimals).func_111022_d("orenimals:oreWoolidium");

 

@Instance("Orenimals")

public static Orenimals instance;

 

@SidedProxy(clientSide="drolive.orenimals.client.ClientProxy", serverSide="drolive.orenimals.CommonProxy")

public static CommonProxy proxy;

 

@EventHandler

public void preInit(FMLPreInitializationEvent event){

 

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

config.load();

 

ingotPorkiteID = config.getItem("Porkite Ingot", 26201).getInt();

ingotChickeniumID = config.getItem("Chickenium Ingot", 26202).getInt();

ingotSteakiteID = config.getItem("Steakite Ingot", 26203).getInt();

ingotWoolidiumID = config.getItem("Woolidium Ingot", 26204).getInt();

pickaxePorkiteID = config.getItem("Porkite Pickaxe", 26205).getInt();

pickaxeChickeniumID = config.getItem("Chickenium Pickaxe", 26206).getInt();

pickaxeSteakiteID = config.getItem("Steakite Pickaxe", 26207).getInt();

pickaxeWoolidiumID = config.getItem("Woolidium Pickaxe", 26208).getInt();

shovelPorkiteID = config.getItem("Porkite Shovel", 26209).getInt();

shovelChickeniumID = config.getItem("Chickenium Shovel", 26210).getInt();

shovelSteakiteID = config.getItem("Steakite Shovel", 26211).getInt();

shovelWoolidiumID = config.getItem("Woolidium Shovel", 26212).getInt();

hoePorkiteID = config.getItem("Porkite Hoe", 26213).getInt();

hoeChickeniumID = config.getItem("Chickenium Hoe", 26214).getInt();

hoeSteakiteID = config.getItem("Steakite Hoe", 26215).getInt();

hoeWoolidiumID = config.getItem("Woolidium Hoe", 26216).getInt();

axePorkiteID = config.getItem("Porkite Axe", 26217).getInt();

axeChickeniumID = config.getItem("Chickenium Axe", 26218).getInt();

axeSteakiteID = config.getItem("Steakite Axe", 26219).getInt();

axeWoolidiumID = config.getItem("Woolidium Axe", 26220).getInt();

swordPorkiteID = config.getItem("Porkite Sword", 26221).getInt();

swordChickeniumID = config.getItem("Chickenium Sword", 26222).getInt();

swordSteakiteID = config.getItem("Steakite Sword", 26223).getInt();

swordWoolidiumID = config.getItem("Woolidium Sword", 26224).getInt();

orePorkiteID = config.getBlock("Porkite Ore", 3001).getInt();

oreChickeniumID = config.getBlock("Chickenium Ore", 3002).getInt();

oreSteakiteID = config.getBlock("Steakite Ore", 3003).getInt();

oreWoolidiumID = config.getBlock("Woolidium Ore", 3004).getInt();

 

config.save();

}

 

@EventHandler

public void load(FMLInitializationEvent event){

proxy.registerRenderers();

 

GameRegistry.registerWorldGenerator(new OrenimalsWorldGen());

 

LanguageRegistry.instance().addStringLocalization("itemGroup.tabOrenimals", "en_US", "Orenimals");

 

ItemStack st = new ItemStack(Item.stick);

ItemStack po = new ItemStack(Orenimals.ingotPorkite);

ItemStack ch = new ItemStack(Orenimals.ingotChickenium);

ItemStack ste = new ItemStack(Orenimals.ingotSteakite);

ItemStack wo = new ItemStack(Orenimals.ingotWoolidium);

 

LanguageRegistry.addName(ingotPorkite, "Porkite Ingot");

GameRegistry.addSmelting(Orenimals.ingotPorkite.itemID, new ItemStack(Item.porkCooked), 0f);

 

LanguageRegistry.addName(ingotChickenium, "Chickenium Ingot");

GameRegistry.addSmelting(Orenimals.ingotChickenium.itemID, new ItemStack(Item.chickenCooked), 0f);

 

LanguageRegistry.addName(ingotSteakite, "Steakite Ingot");

GameRegistry.addSmelting(Orenimals.ingotSteakite.itemID, new ItemStack(Item.beefCooked), 0f);

 

LanguageRegistry.addName(ingotWoolidium, "Woolidium Ingot");

GameRegistry.addSmelting(Orenimals.ingotWoolidium.itemID, new ItemStack(Block.cloth), 0f);

 

LanguageRegistry.addName(pickaxePorkite, "Porkite Pickaxe");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.pickaxePorkite), "xxx", " y ", " y ", 'x', po, 'y', st);

 

LanguageRegistry.addName(pickaxeChickenium, "Chickenium Pickaxe");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.pickaxeChickenium), "xxx", " y ", " y ", 'x', ch, 'y', st);

 

LanguageRegistry.addName(pickaxeSteakite, "Steakite Pickaxe");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.pickaxeSteakite), "xxx", " y ", " y ", 'x', ste, 'y', st);

 

LanguageRegistry.addName(pickaxeWoolidium, "Woolidium Pickaxe");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.pickaxeWoolidium), "xxx", " y ", " y ", 'x', wo, 'y', st);

 

LanguageRegistry.addName(shovelPorkite, "Porkite Shovel");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.shovelPorkite), "x", "y", "y", 'x', po, 'y', st);

 

LanguageRegistry.addName(shovelChickenium, "Chickenium Shovel");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.shovelChickenium), "x", "y", "y", 'x', ch, 'y', st);

 

LanguageRegistry.addName(shovelSteakite, "Steakite Shovel");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.shovelSteakite), "x", "y", "y", 'x', ste, 'y', st);

 

LanguageRegistry.addName(shovelWoolidium, "Woolidium Shovel");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.shovelWoolidium), "x", "y", "y", 'x', wo, 'y', st);

 

LanguageRegistry.addName(hoePorkite, "Porkite Hoe");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.hoePorkite), "xx", " y", " y", 'x', po, 'y', st);

 

LanguageRegistry.addName(hoeChickenium, "Chickenium Hoe");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.hoeChickenium), "xx", " y", " y", 'x', ch, 'y', st);

 

LanguageRegistry.addName(hoeSteakite, "Steakite Hoe");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.hoeSteakite), "xx", " y", " y", 'x', ste, 'y', st);

 

LanguageRegistry.addName(hoeWoolidium, "Woolidium Hoe");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.hoeWoolidium), "xx", " y", " y", 'x', wo, 'y', st);

 

LanguageRegistry.addName(axePorkite, "Porkite Axe");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.axePorkite), "xx", "xy", " y", 'x', po, 'y', st);

 

LanguageRegistry.addName(axeChickenium, "Chickenium Axe");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.axeChickenium), "xx", "xy", " y", 'x', ch, 'y', st);

 

LanguageRegistry.addName(axeSteakite, "Steakite Axe");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.axeSteakite), "xx", "xy", " y", 'x', ste, 'y', st);

 

LanguageRegistry.addName(axeWoolidium, "Woolidium Axe");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.axeWoolidium), "xx", "xy", " y", 'x', wo, 'y', st);

 

LanguageRegistry.addName(swordPorkite, "Porkite Sword");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.swordPorkite), "x", "x", "y", 'x', po, 'y', st);

 

LanguageRegistry.addName(swordChickenium, "Chickenium Sword");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.swordChickenium), "x", "x", "y", 'x', ch, 'y', st);

 

LanguageRegistry.addName(swordSteakite, "Steakite Sword");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.swordSteakite), "x", "x", "y", 'x', ste, 'y', st);

 

LanguageRegistry.addName(swordWoolidium, "Woolidium Sword");

GameRegistry.addShapedRecipe(new ItemStack(Orenimals.swordWoolidium), "x", "x", "y", 'x', wo, 'y', st);

 

LanguageRegistry.addName(orePorkite, "Porkite Ore");

GameRegistry.registerBlock(orePorkite, "orePorkite");

MinecraftForge.setBlockHarvestLevel(orePorkite, "pickaxe", 1);

GameRegistry.addSmelting(Orenimals.orePorkite.blockID, new ItemStack(Orenimals.ingotPorkite), 0.5f);

 

LanguageRegistry.addName(oreChickenium, "Chickenium Ore");

GameRegistry.registerBlock(oreChickenium, "oreChickenium");

MinecraftForge.setBlockHarvestLevel(oreChickenium, "pickaxe", 1);

GameRegistry.addSmelting(Orenimals.oreChickenium.blockID, new ItemStack(Orenimals.ingotChickenium), 0.5f);

 

LanguageRegistry.addName(oreSteakite, "Steakite Ore");

GameRegistry.registerBlock(oreSteakite, "oreSteakite");

MinecraftForge.setBlockHarvestLevel(oreSteakite, "pickaxe", 1);

GameRegistry.addSmelting(Orenimals.oreSteakite.blockID, new ItemStack(Orenimals.ingotSteakite), 0.5f);

 

LanguageRegistry.addName(oreWoolidium, "Woolidium Ore");

GameRegistry.registerBlock(oreWoolidium, "oreWoolidium");

MinecraftForge.setBlockHarvestLevel(oreWoolidium, "pickaxe", 1);

GameRegistry.addSmelting(Orenimals.oreWoolidium.blockID, new ItemStack(Orenimals.ingotWoolidium), 0.5f);

 

}

 

@EventHandler

public void postInit(FMLPostInitializationEvent event){

}

 

}

 

 

Here is my Item class:

 

package drolive.orenimals;

 

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.Item;

 

public class OrenimalsItem extends Item {

 

public OrenimalsItem(int id, int maxStackSize, CreativeTabs tab, String name) {

super(id);

setMaxStackSize(maxStackSize);

setCreativeTab(tab);

setUnlocalizedName(name);

 

}

 

}

 

 

 

Here is my Block class:

 

package drolive.orenimals;

 

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.Item;

 

public class OrenimalsItem extends Item {

 

public OrenimalsItem(int id, int maxStackSize, CreativeTabs tab, String name) {

super(id);

setMaxStackSize(maxStackSize);

setCreativeTab(tab);

setUnlocalizedName(name);

 

}

 

}

 

 

 

 

I'm pretty sure, but not certain, that the config isn't setting the IDs properly, so they're just defaulting to 0.

 

Note: This is my first mod so the code might be a bit messy. If it is, any tips on how to clean it up are appreciated.

 

Any help is appreciated! Thank you for your time!

 

Link to comment
Share on other sites

You are creating the Items on <clinit> which is basically when java loads the class. Don't do that, it's not good. (FML should spit warnings at you, too!)

Because of that, the Items get created before you even load the config, so all the config id fields are still at their default value 0.

Create the items in preInit, after you load the config.

 

I understand what you are saying, and I moved all the items and blocks to preInit after the config, but now I'm getting errors on everything that uses those items and blocks (crafting and smelting recipes, language registers) in Init. How would I fix this?

 

Here's the main class after i switched the Items and Blocks to preInit

package drolive.orenimals;

import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.EnumHelper;
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;

@Mod(modid="Orenimals", name="Orenimals", version="1.0.0")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)

public class Orenimals {

public static CreativeTabs tabOrenimals = new CreativeTabs("tabOrenimals") {
	public ItemStack getIconItemStack() {
		return new ItemStack(Orenimals.ingotChickenium, 1, 0);
		}
};

public static EnumToolMaterial toolPorkite = EnumHelper.addToolMaterial("PORKITE", 1, 260, 5.0F, 1.5F, 10);
public static EnumToolMaterial toolChickenium = EnumHelper.addToolMaterial("CHICKENIUM", 1, 200, 6.2F, 1.5F, 10);
public static EnumToolMaterial toolSteakite = EnumHelper.addToolMaterial("STEAKITE", 1, 200, 5.0F, 2.5F, 10);
public static EnumToolMaterial toolWoolidium = EnumHelper.addToolMaterial("WOOLIDIUM", 1, 200, 5.0F, 1.5F, 16);

public static int ingotPorkiteID;
public static int ingotChickeniumID;
public static int ingotSteakiteID;
public static int ingotWoolidiumID;
public static int pickaxePorkiteID;
public static int pickaxeChickeniumID;
public static int pickaxeSteakiteID;
public static int pickaxeWoolidiumID;
public static int shovelPorkiteID;
public static int shovelChickeniumID;
public static int shovelSteakiteID;
public static int shovelWoolidiumID;
public static int hoePorkiteID;
public static int hoeChickeniumID;
public static int hoeSteakiteID;
public static int hoeWoolidiumID;
public static int axePorkiteID;
public static int axeChickeniumID;
public static int axeSteakiteID;
public static int axeWoolidiumID;
public static int swordPorkiteID;
public static int swordChickeniumID;
public static int swordSteakiteID;
public static int swordWoolidiumID;
public static int orePorkiteID;
public static int oreChickeniumID;
public static int oreSteakiteID;
public static int oreWoolidiumID;

@Instance("Orenimals")
public static Orenimals instance;

@SidedProxy(clientSide="drolive.orenimals.client.ClientProxy", serverSide="drolive.orenimals.CommonProxy")
public static CommonProxy proxy;

@EventHandler
public void preInit(FMLPreInitializationEvent event){

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

		ingotPorkiteID = config.getItem("Porkite Ingot", 26201).getInt();
		ingotChickeniumID = config.getItem("Chickenium Ingot", 26202).getInt();
		ingotSteakiteID = config.getItem("Steakite Ingot", 26203).getInt();
		ingotWoolidiumID = config.getItem("Woolidium Ingot", 26204).getInt();
		pickaxePorkiteID = config.getItem("Porkite Pickaxe", 26205).getInt();
		pickaxeChickeniumID = config.getItem("Chickenium Pickaxe", 26206).getInt();
		pickaxeSteakiteID = config.getItem("Steakite Pickaxe", 26207).getInt();
		pickaxeWoolidiumID = config.getItem("Woolidium Pickaxe", 26208).getInt();
		shovelPorkiteID = config.getItem("Porkite Shovel", 26209).getInt();
		shovelChickeniumID = config.getItem("Chickenium Shovel", 26210).getInt();
		shovelSteakiteID = config.getItem("Steakite Shovel", 26211).getInt();
		shovelWoolidiumID = config.getItem("Woolidium Shovel", 26212).getInt();
		hoePorkiteID = config.getItem("Porkite Hoe", 26213).getInt();
		hoeChickeniumID = config.getItem("Chickenium Hoe", 26214).getInt();
		hoeSteakiteID = config.getItem("Steakite Hoe", 26215).getInt();
		hoeWoolidiumID = config.getItem("Woolidium Hoe", 26216).getInt();
		axePorkiteID = config.getItem("Porkite Axe", 26217).getInt();
		axeChickeniumID = config.getItem("Chickenium Axe", 26218).getInt();
		axeSteakiteID = config.getItem("Steakite Axe", 26219).getInt();
		axeWoolidiumID = config.getItem("Woolidium Axe", 26220).getInt();
		swordPorkiteID = config.getItem("Porkite Sword", 26221).getInt();
		swordChickeniumID = config.getItem("Chickenium Sword", 26222).getInt();
		swordSteakiteID = config.getItem("Steakite Sword", 26223).getInt();
		swordWoolidiumID = config.getItem("Woolidium Sword", 26224).getInt();
		orePorkiteID = config.getBlock("Porkite Ore", 3001).getInt();
		oreChickeniumID = config.getBlock("Chickenium Ore", 3002).getInt();
		oreSteakiteID = config.getBlock("Steakite Ore", 3003).getInt();
		oreWoolidiumID = config.getBlock("Woolidium Ore", 3004).getInt();

		config.save();

		Item ingotPorkite = new OrenimalsItem(ingotPorkiteID, 64, tabOrenimals, "ingotPorkite").func_111206_d("orenimals:ingotPorkite");
		Item ingotChickenium = new OrenimalsItem(ingotChickeniumID, 64, tabOrenimals, "ingotChickenium").func_111206_d("orenimals:ingotChickenium");
		Item ingotSteakite = new OrenimalsItem(ingotSteakiteID, 64, tabOrenimals, "ingotSteakite").func_111206_d("orenimals:ingotSteakite");
		Item ingotWoolidium = new OrenimalsItem(ingotWoolidiumID, 64, tabOrenimals, "ingotWoolididum").func_111206_d("orenimals:ingotWoolidium");
		Item pickaxePorkite = new OrenimalsPickaxe(pickaxePorkiteID, toolPorkite, tabOrenimals, "pickaxePorkite").func_111206_d("Orenimals:pickaxePorkite");
		Item pickaxeChickenium = new OrenimalsPickaxe(pickaxeChickeniumID, toolChickenium, tabOrenimals, "pickaxeChickenium").func_111206_d("Orenimals:pickaxeChickenium");
		Item pickaxeSteakite = new OrenimalsPickaxe(pickaxeSteakiteID, toolSteakite, tabOrenimals, "pickaxeSteakite").func_111206_d("Orenimals:pickaxeSteakite");
		Item pickaxeWoolidium = new OrenimalsPickaxe(pickaxeWoolidiumID, toolWoolidium, tabOrenimals, "pickaxeWoolidium").func_111206_d("Orenimals:pickaxeWoolidium");
		Item shovelPorkite = new OrenimalsShovel(shovelPorkiteID, toolPorkite, tabOrenimals, "shovelPorkite").func_111206_d("Orenimals:shovelPorkite");
		Item shovelChickenium = new OrenimalsShovel(shovelChickeniumID, toolChickenium, tabOrenimals, "shovelChickenium").func_111206_d("Orenimals:shovelChickenium");
		Item shovelSteakite = new OrenimalsShovel(shovelSteakiteID, toolSteakite, tabOrenimals, "shovelSteakite").func_111206_d("Orenimals:shovelSteakite");
		Item shovelWoolidium = new OrenimalsShovel(shovelWoolidiumID, toolWoolidium, tabOrenimals, "shovelWoolidium").func_111206_d("Orenimals:shovelWoolidium");
		Item hoePorkite = new OrenimalsHoe(hoePorkiteID, toolPorkite, tabOrenimals, "hoePorkite").func_111206_d("Orenimals:hoePorkite");
		Item hoeChickenium = new OrenimalsHoe(hoeChickeniumID, toolChickenium, tabOrenimals, "hoeChickenium").func_111206_d("Orenimals:hoeChickenium");
		Item hoeSteakite = new OrenimalsHoe(hoeSteakiteID, toolSteakite, tabOrenimals, "hoeSteakite").func_111206_d("Orenimals:hoeSteakite");
		Item hoeWoolidium = new OrenimalsHoe(hoeWoolidiumID, toolWoolidium, tabOrenimals, "hoeWoolidium").func_111206_d("Orenimals:hoeWoolidium");
		Item axePorkite = new OrenimalsAxe(axePorkiteID, toolPorkite, tabOrenimals, "axePorkite").func_111206_d("Orenimals:hatchetPorkite");
		Item axeChickenium = new OrenimalsAxe(axeChickeniumID, toolChickenium, tabOrenimals, "axeChickenium").func_111206_d("Orenimals:hatchetChickenium");
		Item axeSteakite = new OrenimalsAxe(axeSteakiteID, toolSteakite, tabOrenimals, "axeSteakite").func_111206_d("Orenimals:hatchetSteakite");
		Item axeWoolidium = new OrenimalsAxe(axeWoolidiumID, toolWoolidium, tabOrenimals, "axeWoolidium").func_111206_d("Orenimals:hatchetWoolidium");
		Item swordPorkite = new OrenimalsSword(swordPorkiteID, toolPorkite, tabOrenimals, "swordPorkite").func_111206_d("Orenimals:swordPorkite");
		Item swordChickenium = new OrenimalsSword(swordChickeniumID, toolChickenium, tabOrenimals, "swordChickenium").func_111206_d("Orenimals:swordChickenium");
		Item swordSteakite = new OrenimalsSword(swordSteakiteID, toolSteakite, tabOrenimals, "swordSteakite").func_111206_d("Orenimals:swordSteakite");
		Item swordWoolidium = new OrenimalsSword(swordWoolidiumID, toolWoolidium, tabOrenimals, "swordWoolidium").func_111206_d("Orenimals:swordWoolidium");

		Block orePorkite = new OrenimalsBlock(orePorkiteID, Material.rock, 3.0F, Block.soundStoneFootstep, "orePorkite", tabOrenimals).func_111022_d("orenimals:orePorkite");
		Block oreChickenium = new OrenimalsBlock(oreChickeniumID, Material.rock, 3.0F, Block.soundStoneFootstep, "oreChickenium", tabOrenimals).func_111022_d("orenimals:oreChickenium");
		Block oreSteakite = new OrenimalsBlock(oreSteakiteID, Material.rock, 3.0F, Block.soundStoneFootstep, "oreSteakite", tabOrenimals).func_111022_d("orenimals:oreSteakite");
		Block oreWoolidium = new OrenimalsBlock(oreWoolidiumID, Material.rock, 3.0F, Block.soundStoneFootstep, "oreWoolidium", tabOrenimals).func_111022_d("orenimals:oreWoolidium");

}

@EventHandler
public void load(FMLInitializationEvent event){
		proxy.registerRenderers();

		GameRegistry.registerWorldGenerator(new OrenimalsWorldGen());

		LanguageRegistry.instance().addStringLocalization("itemGroup.tabOrenimals", "en_US", "Orenimals");

		ItemStack st = new ItemStack(Item.stick);
		ItemStack po = new ItemStack(Orenimals.ingotPorkite);
		ItemStack ch = new ItemStack(Orenimals.ingotChickenium);
		ItemStack ste = new ItemStack(Orenimals.ingotSteakite);
		ItemStack wo = new ItemStack(Orenimals.ingotWoolidium);

		LanguageRegistry.addName(ingotPorkite, "Porkite Ingot");
		GameRegistry.addSmelting(Orenimals.ingotPorkite.itemID, new ItemStack(Item.porkCooked), 0f);

		LanguageRegistry.addName(ingotChickenium, "Chickenium Ingot");
		GameRegistry.addSmelting(Orenimals.ingotChickenium.itemID, new ItemStack(Item.chickenCooked), 0f);

		LanguageRegistry.addName(ingotSteakite, "Steakite Ingot");
		GameRegistry.addSmelting(Orenimals.ingotSteakite.itemID, new ItemStack(Item.beefCooked), 0f);

		LanguageRegistry.addName(ingotWoolidium, "Woolidium Ingot");
		GameRegistry.addSmelting(Orenimals.ingotWoolidium.itemID, new ItemStack(Block.cloth), 0f);

		LanguageRegistry.addName(pickaxePorkite, "Porkite Pickaxe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.pickaxePorkite), "xxx", " y ", " y ", 'x', po, 'y', st);

		LanguageRegistry.addName(pickaxeChickenium, "Chickenium Pickaxe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.pickaxeChickenium), "xxx", " y ", " y ", 'x', ch, 'y', st);

		LanguageRegistry.addName(pickaxeSteakite, "Steakite Pickaxe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.pickaxeSteakite), "xxx", " y ", " y ", 'x', ste, 'y', st);

		LanguageRegistry.addName(pickaxeWoolidium, "Woolidium Pickaxe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.pickaxeWoolidium), "xxx", " y ", " y ", 'x', wo, 'y', st);

		LanguageRegistry.addName(shovelPorkite, "Porkite Shovel");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.shovelPorkite), "x", "y", "y", 'x', po, 'y', st);

		LanguageRegistry.addName(shovelChickenium, "Chickenium Shovel");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.shovelChickenium), "x", "y", "y", 'x', ch, 'y', st);

		LanguageRegistry.addName(shovelSteakite, "Steakite Shovel");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.shovelSteakite), "x", "y", "y", 'x', ste, 'y', st);

		LanguageRegistry.addName(shovelWoolidium, "Woolidium Shovel");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.shovelWoolidium), "x", "y", "y", 'x', wo, 'y', st);

		LanguageRegistry.addName(hoePorkite, "Porkite Hoe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.hoePorkite), "xx", " y", " y", 'x', po, 'y', st);

		LanguageRegistry.addName(hoeChickenium, "Chickenium Hoe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.hoeChickenium), "xx", " y", " y", 'x', ch, 'y', st);

		LanguageRegistry.addName(hoeSteakite, "Steakite Hoe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.hoeSteakite), "xx", " y", " y", 'x', ste, 'y', st);

		LanguageRegistry.addName(hoeWoolidium, "Woolidium Hoe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.hoeWoolidium), "xx", " y", " y", 'x', wo, 'y', st);

		LanguageRegistry.addName(axePorkite, "Porkite Axe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.axePorkite), "xx", "xy", " y", 'x', po, 'y', st);

		LanguageRegistry.addName(axeChickenium, "Chickenium Axe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.axeChickenium), "xx", "xy", " y", 'x', ch, 'y', st);

		LanguageRegistry.addName(axeSteakite, "Steakite Axe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.axeSteakite), "xx", "xy", " y", 'x', ste, 'y', st);

		LanguageRegistry.addName(axeWoolidium, "Woolidium Axe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.axeWoolidium), "xx", "xy", " y", 'x', wo, 'y', st);

		LanguageRegistry.addName(swordPorkite, "Porkite Sword");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.swordPorkite), "x", "x", "y", 'x', po, 'y', st);

		LanguageRegistry.addName(swordChickenium, "Chickenium Sword");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.swordChickenium), "x", "x", "y", 'x', ch, 'y', st);

		LanguageRegistry.addName(swordSteakite, "Steakite Sword");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.swordSteakite), "x", "x", "y", 'x', ste, 'y', st);

		LanguageRegistry.addName(swordWoolidium, "Woolidium Sword");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.swordWoolidium), "x", "x", "y", 'x', wo, 'y', st);

		LanguageRegistry.addName(orePorkite, "Porkite Ore");
		GameRegistry.registerBlock(orePorkite, "orePorkite");
		MinecraftForge.setBlockHarvestLevel(orePorkite, "pickaxe", 1);
		GameRegistry.addSmelting(Orenimals.orePorkite.blockID, new ItemStack(Orenimals.ingotPorkite), 0.5f);

		LanguageRegistry.addName(oreChickenium, "Chickenium Ore");
		GameRegistry.registerBlock(oreChickenium, "oreChickenium");
		MinecraftForge.setBlockHarvestLevel(oreChickenium, "pickaxe", 1);
		GameRegistry.addSmelting(Orenimals.oreChickenium.blockID, new ItemStack(Orenimals.ingotChickenium), 0.5f);

		LanguageRegistry.addName(oreSteakite, "Steakite Ore");
		GameRegistry.registerBlock(oreSteakite, "oreSteakite");
		MinecraftForge.setBlockHarvestLevel(oreSteakite, "pickaxe", 1);
		GameRegistry.addSmelting(Orenimals.oreSteakite.blockID, new ItemStack(Orenimals.ingotSteakite), 0.5f);

		LanguageRegistry.addName(oreWoolidium, "Woolidium Ore");
		GameRegistry.registerBlock(oreWoolidium, "oreWoolidium");
		MinecraftForge.setBlockHarvestLevel(oreWoolidium, "pickaxe", 1);
		GameRegistry.addSmelting(Orenimals.oreWoolidium.blockID, new ItemStack(Orenimals.ingotWoolidium), 0.5f);

}

@EventHandler
public void postInit(FMLPostInitializationEvent event){
}

}

Link to comment
Share on other sites

Don't make them local variables. Still have the Blocks and Items as a public static field in your class.

But do not construct them right there (at the field declaration).

Construct them in the preInit.

Btw: All your registering (Items, Blocks, Recipes) should happen in preInit, according to cpws javadocs.

 

Ok so I moved everything into preInit from Init, and it solved the ID problems (thank you by the way) but now I'm getting an error involving the ItemStacks.

Error report:

 

---- Minecraft Crash Report ----

// Hey, that tickles! Hehehe!

 

Time: 22/07/13 8:28 AM

Description: Initializing game

 

java.lang.NullPointerException

at net.minecraft.item.ItemStack.<init>(ItemStack.java:76)

at drolive.orenimals.Orenimals.preInit(Orenimals.java:178)

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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:540)

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:193)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173)

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:104)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:521)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:172)

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)

 

 

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

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at net.minecraft.item.ItemStack.<init>(ItemStack.java:76)

at drolive.orenimals.Orenimals.preInit(Orenimals.java:178)

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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:540)

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:193)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173)

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:104)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:521)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:172)

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_07, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 949767224 bytes (905 MB) / 1047592960 bytes (999 MB) up to 1047592960 bytes (999 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.19.789 Minecraft Forge 9.10.0.789 4 mods loaded, 4 mods active

mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized

FML{6.2.19.789} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized

Forge{9.10.0.789} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized

Orenimals{1.0.0} [Orenimals] (bin) Unloaded->Constructed->Errored

Launched Version: 1.6

LWJGL: 2.9.0

OpenGL: AMD M880G with ATI Mobility Radeon HD 4250 GL version 3.3.10179 Compatibility Profile Context, ATI Technologies Inc.

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

 

 

My main class once again:

package drolive.orenimals;

import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.EnumHelper;
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;

@Mod(modid="Orenimals", name="Orenimals", version="1.0.0")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)

public class Orenimals {
//Creative Tab
public static CreativeTabs tabOrenimals = new CreativeTabs("tabOrenimals") {
	public ItemStack getIconItemStack() {
		return new ItemStack(Orenimals.ingotChickenium, 1, 0);
		}
};
//Tool Materials
public static EnumToolMaterial toolPorkite = EnumHelper.addToolMaterial("PORKITE", 1, 260, 5.0F, 1.5F, 10);
public static EnumToolMaterial toolChickenium = EnumHelper.addToolMaterial("CHICKENIUM", 1, 200, 6.2F, 1.5F, 10);
public static EnumToolMaterial toolSteakite = EnumHelper.addToolMaterial("STEAKITE", 1, 200, 5.0F, 2.5F, 10);
public static EnumToolMaterial toolWoolidium = EnumHelper.addToolMaterial("WOOLIDIUM", 1, 200, 5.0F, 1.5F, 16);
//Item IDs
public static int ingotPorkiteID;
public static int ingotChickeniumID;
public static int ingotSteakiteID;
public static int ingotWoolidiumID;
public static int pickaxePorkiteID;
public static int pickaxeChickeniumID;
public static int pickaxeSteakiteID;
public static int pickaxeWoolidiumID;
public static int shovelPorkiteID;
public static int shovelChickeniumID;
public static int shovelSteakiteID;
public static int shovelWoolidiumID;
public static int hoePorkiteID;
public static int hoeChickeniumID;
public static int hoeSteakiteID;
public static int hoeWoolidiumID;
public static int axePorkiteID;
public static int axeChickeniumID;
public static int axeSteakiteID;
public static int axeWoolidiumID;
public static int swordPorkiteID;
public static int swordChickeniumID;
public static int swordSteakiteID;
public static int swordWoolidiumID;
//Block IDs
public static int orePorkiteID;
public static int oreChickeniumID;
public static int oreSteakiteID;
public static int oreWoolidiumID;
//Items
public static Item ingotPorkite;
public static Item ingotChickenium;
public static Item ingotSteakite;
public static Item ingotWoolidium;
public static Item pickaxePorkite;
public static Item pickaxeChickenium;
public static Item pickaxeSteakite;
public static Item pickaxeWoolidium;
public static Item shovelPorkite;
public static Item shovelChickenium;
public static Item shovelSteakite;
public static Item shovelWoolidium;
public static Item hoePorkite;
public static Item hoeChickenium;
public static Item hoeSteakite;
public static Item hoeWoolidium;
public static Item axePorkite;
public static Item axeChickenium;
public static Item axeSteakite;
public static Item axeWoolidium;
public static Item swordPorkite;
public static Item swordChickenium;
public static Item swordSteakite;
public static Item swordWoolidium;
//Blocks
public static Block orePorkite;
public static Block oreChickenium;
public static Block oreSteakite;
public static Block oreWoolidium;

@Instance("Orenimals")
public static Orenimals instance;

@SidedProxy(clientSide="drolive.orenimals.client.ClientProxy", serverSide="drolive.orenimals.CommonProxy")
public static CommonProxy proxy;

@EventHandler
public void preInit(FMLPreInitializationEvent event){

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

		ingotPorkiteID = config.getItem("Porkite Ingot", 26201).getInt();
		ingotChickeniumID = config.getItem("Chickenium Ingot", 26202).getInt();
		ingotSteakiteID = config.getItem("Steakite Ingot", 26203).getInt();
		ingotWoolidiumID = config.getItem("Woolidium Ingot", 26204).getInt();
		pickaxePorkiteID = config.getItem("Porkite Pickaxe", 26205).getInt();
		pickaxeChickeniumID = config.getItem("Chickenium Pickaxe", 26206).getInt();
		pickaxeSteakiteID = config.getItem("Steakite Pickaxe", 26207).getInt();
		pickaxeWoolidiumID = config.getItem("Woolidium Pickaxe", 26208).getInt();
		shovelPorkiteID = config.getItem("Porkite Shovel", 26209).getInt();
		shovelChickeniumID = config.getItem("Chickenium Shovel", 26210).getInt();
		shovelSteakiteID = config.getItem("Steakite Shovel", 26211).getInt();
		shovelWoolidiumID = config.getItem("Woolidium Shovel", 26212).getInt();
		hoePorkiteID = config.getItem("Porkite Hoe", 26213).getInt();
		hoeChickeniumID = config.getItem("Chickenium Hoe", 26214).getInt();
		hoeSteakiteID = config.getItem("Steakite Hoe", 26215).getInt();
		hoeWoolidiumID = config.getItem("Woolidium Hoe", 26216).getInt();
		axePorkiteID = config.getItem("Porkite Axe", 26217).getInt();
		axeChickeniumID = config.getItem("Chickenium Axe", 26218).getInt();
		axeSteakiteID = config.getItem("Steakite Axe", 26219).getInt();
		axeWoolidiumID = config.getItem("Woolidium Axe", 26220).getInt();
		swordPorkiteID = config.getItem("Porkite Sword", 26221).getInt();
		swordChickeniumID = config.getItem("Chickenium Sword", 26222).getInt();
		swordSteakiteID = config.getItem("Steakite Sword", 26223).getInt();
		swordWoolidiumID = config.getItem("Woolidium Sword", 26224).getInt();
		orePorkiteID = config.getBlock("Porkite Ore", 3001).getInt();
		oreChickeniumID = config.getBlock("Chickenium Ore", 3002).getInt();
		oreSteakiteID = config.getBlock("Steakite Ore", 3003).getInt();
		oreWoolidiumID = config.getBlock("Woolidium Ore", 3004).getInt();

		config.save();

GameRegistry.registerWorldGenerator(new OrenimalsWorldGen());

		LanguageRegistry.instance().addStringLocalization("itemGroup.tabOrenimals", "en_US", "Orenimals");
		//Items
		Item ingotPorkite = new OrenimalsItem(ingotPorkiteID, 64, tabOrenimals, "ingotPorkite").func_111206_d("orenimals:ingotPorkite");
		Item ingotChickenium = new OrenimalsItem(ingotChickeniumID, 64, tabOrenimals, "ingotChickenium").func_111206_d("orenimals:ingotChickenium");
		Item ingotSteakite = new OrenimalsItem(ingotSteakiteID, 64, tabOrenimals, "ingotSteakite").func_111206_d("orenimals:ingotSteakite");
		Item ingotWoolidium = new OrenimalsItem(ingotWoolidiumID, 64, tabOrenimals, "ingotWoolididum").func_111206_d("orenimals:ingotWoolidium");
		Item pickaxePorkite = new OrenimalsPickaxe(pickaxePorkiteID, toolPorkite, tabOrenimals, "pickaxePorkite").func_111206_d("Orenimals:pickaxePorkite");
		Item pickaxeChickenium = new OrenimalsPickaxe(pickaxeChickeniumID, toolChickenium, tabOrenimals, "pickaxeChickenium").func_111206_d("Orenimals:pickaxeChickenium");
		Item pickaxeSteakite = new OrenimalsPickaxe(pickaxeSteakiteID, toolSteakite, tabOrenimals, "pickaxeSteakite").func_111206_d("Orenimals:pickaxeSteakite");
		Item pickaxeWoolidium = new OrenimalsPickaxe(pickaxeWoolidiumID, toolWoolidium, tabOrenimals, "pickaxeWoolidium").func_111206_d("Orenimals:pickaxeWoolidium");
		Item shovelPorkite = new OrenimalsShovel(shovelPorkiteID, toolPorkite, tabOrenimals, "shovelPorkite").func_111206_d("Orenimals:shovelPorkite");
		Item shovelChickenium = new OrenimalsShovel(shovelChickeniumID, toolChickenium, tabOrenimals, "shovelChickenium").func_111206_d("Orenimals:shovelChickenium");
		Item shovelSteakite = new OrenimalsShovel(shovelSteakiteID, toolSteakite, tabOrenimals, "shovelSteakite").func_111206_d("Orenimals:shovelSteakite");
		Item shovelWoolidium = new OrenimalsShovel(shovelWoolidiumID, toolWoolidium, tabOrenimals, "shovelWoolidium").func_111206_d("Orenimals:shovelWoolidium");
		Item hoePorkite = new OrenimalsHoe(hoePorkiteID, toolPorkite, tabOrenimals, "hoePorkite").func_111206_d("Orenimals:hoePorkite");
		Item hoeChickenium = new OrenimalsHoe(hoeChickeniumID, toolChickenium, tabOrenimals, "hoeChickenium").func_111206_d("Orenimals:hoeChickenium");
		Item hoeSteakite = new OrenimalsHoe(hoeSteakiteID, toolSteakite, tabOrenimals, "hoeSteakite").func_111206_d("Orenimals:hoeSteakite");
		Item hoeWoolidium = new OrenimalsHoe(hoeWoolidiumID, toolWoolidium, tabOrenimals, "hoeWoolidium").func_111206_d("Orenimals:hoeWoolidium");
		Item axePorkite = new OrenimalsAxe(axePorkiteID, toolPorkite, tabOrenimals, "axePorkite").func_111206_d("Orenimals:hatchetPorkite");
		Item axeChickenium = new OrenimalsAxe(axeChickeniumID, toolChickenium, tabOrenimals, "axeChickenium").func_111206_d("Orenimals:hatchetChickenium");
		Item axeSteakite = new OrenimalsAxe(axeSteakiteID, toolSteakite, tabOrenimals, "axeSteakite").func_111206_d("Orenimals:hatchetSteakite");
		Item axeWoolidium = new OrenimalsAxe(axeWoolidiumID, toolWoolidium, tabOrenimals, "axeWoolidium").func_111206_d("Orenimals:hatchetWoolidium");
		Item swordPorkite = new OrenimalsSword(swordPorkiteID, toolPorkite, tabOrenimals, "swordPorkite").func_111206_d("Orenimals:swordPorkite");
		Item swordChickenium = new OrenimalsSword(swordChickeniumID, toolChickenium, tabOrenimals, "swordChickenium").func_111206_d("Orenimals:swordChickenium");
		Item swordSteakite = new OrenimalsSword(swordSteakiteID, toolSteakite, tabOrenimals, "swordSteakite").func_111206_d("Orenimals:swordSteakite");
		Item swordWoolidium = new OrenimalsSword(swordWoolidiumID, toolWoolidium, tabOrenimals, "swordWoolidium").func_111206_d("Orenimals:swordWoolidium");
		//Blocks
		Block orePorkite = new OrenimalsBlock(orePorkiteID, Material.rock, 3.0F, Block.soundStoneFootstep, "orePorkite", tabOrenimals).func_111022_d("orenimals:orePorkite");
		Block oreChickenium = new OrenimalsBlock(oreChickeniumID, Material.rock, 3.0F, Block.soundStoneFootstep, "oreChickenium", tabOrenimals).func_111022_d("orenimals:oreChickenium");
		Block oreSteakite = new OrenimalsBlock(oreSteakiteID, Material.rock, 3.0F, Block.soundStoneFootstep, "oreSteakite", tabOrenimals).func_111022_d("orenimals:oreSteakite");
		Block oreWoolidium = new OrenimalsBlock(oreWoolidiumID, Material.rock, 3.0F, Block.soundStoneFootstep, "oreWoolidium", tabOrenimals).func_111022_d("orenimals:oreWoolidium");
		//Recipes
		ItemStack st = new ItemStack(Item.stick);
		ItemStack po = new ItemStack(Orenimals.ingotPorkite);
		ItemStack ch = new ItemStack(Orenimals.ingotChickenium);
		ItemStack ste = new ItemStack(Orenimals.ingotSteakite);
		ItemStack wo = new ItemStack(Orenimals.ingotWoolidium);

		LanguageRegistry.addName(ingotPorkite, "Porkite Ingot");
		GameRegistry.addSmelting(Orenimals.ingotPorkite.itemID, new ItemStack(Item.porkCooked), 0f);

		LanguageRegistry.addName(ingotChickenium, "Chickenium Ingot");
		GameRegistry.addSmelting(Orenimals.ingotChickenium.itemID, new ItemStack(Item.chickenCooked), 0f);

		LanguageRegistry.addName(ingotSteakite, "Steakite Ingot");
		GameRegistry.addSmelting(Orenimals.ingotSteakite.itemID, new ItemStack(Item.beefCooked), 0f);

		LanguageRegistry.addName(ingotWoolidium, "Woolidium Ingot");
		GameRegistry.addSmelting(Orenimals.ingotWoolidium.itemID, new ItemStack(Block.cloth), 0f);

		LanguageRegistry.addName(pickaxePorkite, "Porkite Pickaxe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.pickaxePorkite), "xxx", " y ", " y ", 'x', po, 'y', st);

		LanguageRegistry.addName(pickaxeChickenium, "Chickenium Pickaxe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.pickaxeChickenium), "xxx", " y ", " y ", 'x', ch, 'y', st);

		LanguageRegistry.addName(pickaxeSteakite, "Steakite Pickaxe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.pickaxeSteakite), "xxx", " y ", " y ", 'x', ste, 'y', st);

		LanguageRegistry.addName(pickaxeWoolidium, "Woolidium Pickaxe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.pickaxeWoolidium), "xxx", " y ", " y ", 'x', wo, 'y', st);

		LanguageRegistry.addName(shovelPorkite, "Porkite Shovel");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.shovelPorkite), "x", "y", "y", 'x', po, 'y', st);

		LanguageRegistry.addName(shovelChickenium, "Chickenium Shovel");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.shovelChickenium), "x", "y", "y", 'x', ch, 'y', st);

		LanguageRegistry.addName(shovelSteakite, "Steakite Shovel");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.shovelSteakite), "x", "y", "y", 'x', ste, 'y', st);

		LanguageRegistry.addName(shovelWoolidium, "Woolidium Shovel");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.shovelWoolidium), "x", "y", "y", 'x', wo, 'y', st);

		LanguageRegistry.addName(hoePorkite, "Porkite Hoe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.hoePorkite), "xx", " y", " y", 'x', po, 'y', st);

		LanguageRegistry.addName(hoeChickenium, "Chickenium Hoe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.hoeChickenium), "xx", " y", " y", 'x', ch, 'y', st);

		LanguageRegistry.addName(hoeSteakite, "Steakite Hoe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.hoeSteakite), "xx", " y", " y", 'x', ste, 'y', st);

		LanguageRegistry.addName(hoeWoolidium, "Woolidium Hoe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.hoeWoolidium), "xx", " y", " y", 'x', wo, 'y', st);

		LanguageRegistry.addName(axePorkite, "Porkite Axe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.axePorkite), "xx", "xy", " y", 'x', po, 'y', st);

		LanguageRegistry.addName(axeChickenium, "Chickenium Axe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.axeChickenium), "xx", "xy", " y", 'x', ch, 'y', st);

		LanguageRegistry.addName(axeSteakite, "Steakite Axe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.axeSteakite), "xx", "xy", " y", 'x', ste, 'y', st);

		LanguageRegistry.addName(axeWoolidium, "Woolidium Axe");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.axeWoolidium), "xx", "xy", " y", 'x', wo, 'y', st);

		LanguageRegistry.addName(swordPorkite, "Porkite Sword");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.swordPorkite), "x", "x", "y", 'x', po, 'y', st);

		LanguageRegistry.addName(swordChickenium, "Chickenium Sword");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.swordChickenium), "x", "x", "y", 'x', ch, 'y', st);

		LanguageRegistry.addName(swordSteakite, "Steakite Sword");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.swordSteakite), "x", "x", "y", 'x', ste, 'y', st);

		LanguageRegistry.addName(swordWoolidium, "Woolidium Sword");
		GameRegistry.addShapedRecipe(new ItemStack(Orenimals.swordWoolidium), "x", "x", "y", 'x', wo, 'y', st);

		LanguageRegistry.addName(orePorkite, "Porkite Ore");
		GameRegistry.registerBlock(orePorkite, "orePorkite");
		MinecraftForge.setBlockHarvestLevel(orePorkite, "pickaxe", 1);
		GameRegistry.addSmelting(Orenimals.orePorkite.blockID, new ItemStack(Orenimals.ingotPorkite), 0.5f);

		LanguageRegistry.addName(oreChickenium, "Chickenium Ore");
		GameRegistry.registerBlock(oreChickenium, "oreChickenium");
		MinecraftForge.setBlockHarvestLevel(oreChickenium, "pickaxe", 1);
		GameRegistry.addSmelting(Orenimals.oreChickenium.blockID, new ItemStack(Orenimals.ingotChickenium), 0.5f);

		LanguageRegistry.addName(oreSteakite, "Steakite Ore");
		GameRegistry.registerBlock(oreSteakite, "oreSteakite");
		MinecraftForge.setBlockHarvestLevel(oreSteakite, "pickaxe", 1);
		GameRegistry.addSmelting(Orenimals.oreSteakite.blockID, new ItemStack(Orenimals.ingotSteakite), 0.5f);

		LanguageRegistry.addName(oreWoolidium, "Woolidium Ore");
		GameRegistry.registerBlock(oreWoolidium, "oreWoolidium");
		MinecraftForge.setBlockHarvestLevel(oreWoolidium, "pickaxe", 1);
		GameRegistry.addSmelting(Orenimals.oreWoolidium.blockID, new ItemStack(Orenimals.ingotWoolidium), 0.5f);

}

@EventHandler
public void load(FMLInitializationEvent event){
		proxy.registerRenderers();

}

@EventHandler
public void postInit(FMLPostInitializationEvent event){
}

}

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.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • The future of Bitcoin recovery is a topic of great interest and excitement, particularly with the emergence of innovative companies like Dexdert Net Pro Recovery leading the charge. As the cryptocurrency market continues to evolve and face new challenges, the need for effective solutions to help users recover lost or stolen Bitcoin has become increasingly critical. Dexdert Net Pro, a specialized firm dedicated to this very purpose, has positioned itself at the forefront of this emerging field. Through their proprietary techniques and deep expertise in blockchain technology, Dexdert Net Pro has developed a comprehensive approach to tracking down and retrieving misplaced or compromised Bitcoin, providing a lifeline to individuals and businesses who have fallen victim to the inherent risks of the digital currency landscape. Their team of seasoned investigators and cryptography experts employ a meticulous, multi-pronged strategy, leveraging advanced data analysis, forensic techniques, and collaborative partnerships with law enforcement to painstakingly trace the movement of lost or stolen coins, often recovering funds that would otherwise be considered irrecoverable. This pioneering work not only restores financial assets but also helps to bolster confidence and trust in the long-term viability of Bitcoin, cementing Dexdert Net Pro role as a crucial player in shaping the future of cryptocurrency recovery and security. As the digital finance ecosystem continues to evolve, the importance of innovative solutions like those offered by Dexdert Net Pro will only grow, ensuring that users can navigate the complexities of Bitcoin with greater peace of mind and protection. Call Dexdert Net Pro now     
    • I'm developing a dimension, but it's kinda resource intensive so some times during player teleporting it lags behind making the player phase down into the void, so im trying to implement some kind of pregeneration to force the game loading a small set of chunks in the are the player will teleport to. Some of the things i've tried like using ServerLevel and ServerChunkCache methods like getChunk() dont actually trigger chunk generation if the chunk isn't already on persistent storage (already generated) or placing tickets, but that doesn't work either. Ideally i should be able to check when the task has ended too. I've peeked around some pregen engines, but they're too complex for my current understanding of the system of which I have just a basic understanding (how ServerLevel ,ServerChunkCache  and ChunkMap work) of. Any tips or other classes I should be looking into to understand how to do this correctly?
    • https://mclo.gs/4UC49Ao
    • Way back in the Forge 1.17 days, work started for adding JPMS (Java Platform Module Support) to ModLauncher and ForgeModLoader. This has been used internally by Forge and some libraries for a while now, but mods (those with mods.toml specifically) have not been able to take advantage of it. As of Forge 1.21.1 and 1.21.3, this is now possible!   What is JPMS and what does it mean for modders? JPMS is the Java Platform Module System, introduced in Java 9. It allows you to define modules, which are collections of packages and resources that can be exported or hidden from other modules. This allows for much more fine-tuned control over visibility, cleaner syntax for service declarations and support for sealed types across packages. For example, you might have a mod with a module called `com.example.mod` that exports `com.example.mod.api` and `com.example.mod.impl` to other mods, but hides `com.example.mod.internal` from them. This would allow you to have a clean API for other mods to use, while keeping your internal implementation details hidden from IDE hints, helping prevent accidental usage of internals that might break without prior notice. This is particularly useful if you'd like to use public records with module-private constructors or partially module-private record components, as you can create a sealed interface that only your record implements, having the interface be exported and the record hidden. It's also nice for declaring and using services, as you'll get compile-time errors from the Java compiler for typos and the like, rather than deferring to runtime errors. In more advanced cases, you can also have public methods that are only accessible to specific other modules -- handy if you want internal interactions between multiple of your own mods.   How do I bypass it? We understand there may be drama in implementing a system that prevents mods from accessing each other's internals when necessary (like when a mod is abandoned or you need to fix a compat issue) -- after all, we are already modding a game that doesn't have explicit support for Java mods yet. We have already thought of this and are offering APIs from day one to selectively bypass module restrictions. Let me be clear: Forge mods are not required to use JPMS. If you don't want to use it, you don't have to. The default behaviour is to have fully open, fully exported automatic modules. In Java, you can use the `Add-Opens` and `Add-Exports` manifest attributes to selectively bypass module restrictions of other mods at launch time, and we've added explicit support for these when loading your Forge mods. At compile-time, you can use existing solutions such as the extra-java-module-info Gradle plugin to deal with non-modular dependencies and add extra opens and exports to other modules. Here's an example on how to make the internal package `com.example.examplemod.internal` open to your mod in your build.gradle: tasks.named('jar', Jar) { manifest { attributes([ 'Add-Opens' : 'com.example.examplemod/com.example.examplemod.internal' 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors // (...) ]) } } With the above in your mod's jar manifest, you can now reflectively access the classes inside that internal package. Multiple entries are separated with a space, as per Java's official spec. You can also use Add-Exports to directly call without reflection, however you'd need to use the Gradle plugin mentioned earlier to be able to compile. The syntax for Add-Exports is the same as Add-Opens, and instructions for the compile-time step with the Gradle plugin are detailed later in this post. Remember to prefer the opens and exports keywords inside module-info.java for sources you control. The Add-Opens/Add-Exports attributes are only intended for forcing open other mods.   What else is new with module support? Previously, the runtime module name was always forced to the first mod ID in your `mods.toml` file and all packages were forced fully open and exported. Module names are now distinguished from mod IDs, meaning the module name in your module-info.java can be different from the mod ID in your `mods.toml`. This allows you to have a more descriptive module name that doesn't have to be the same as your mod ID, however we strongly recommend including your mod ID as part of your module name to aid troubleshooting. The `Automatic-Module-Name` manifest attribute is now also honoured, allowing you to specify a module name for your mod without needing to create a `module-info.java` file. This is particularly useful for mods that don't care about JPMS features but want to have a more descriptive module name and easier integration with other mods that do use JPMS.   How do I use it? The first step is to create a `module-info.java` file in your mod's source directory. This file should be in the same package as your main mod class, and should look something like this: open module com.example.examplemod { requires net.minecraftforge.eventbus; requires net.minecraftforge.fmlcore; requires net.minecraftforge.forge; requires net.minecraftforge.javafmlmod; requires net.minecraftforge.mergetool.api; requires org.slf4j; requires logging; } For now, we're leaving the whole module open to reflection, which is a good starting point. When we know we want to close something off, we can remove the open modifier from the module and open or export individual packages instead. Remember that you need to be open to Forge (module name net.minecraftforge.forge), otherwise it can't call your mod's constructor. Next is fixing modules in Gradle. While Forge and Java support modules properly, Gradle does not put automatic modules on the module path by default, meaning that the logging module (from com.mojang:logging) is not found. To fix this, add the Gradle plugin and add a compile-time module definition for that Mojang library: plugins { // (...) id 'org.gradlex.extra-java-module-info' version "1.9" } // (...) extraJavaModuleInfo { failOnMissingModuleInfo = false automaticModule("com.mojang:logging", "logging") } The automatic module override specified in your build.gradle should match the runtime one to avoid errors. You can do the same for any library or mod dependency that is missing either a module-info or explicit Automatic-Module-Name, however be aware that you may need to update your mod once said library adds one. That's all you need to get started with module support in your mods. You can learn more about modules and how to use them at dev.java.
    • Faire la mise à jour grâce à ce lien m'a aider personnellement, merci à @Paint_Ninja. https://www.amd.com/en/support 
  • Topics

×
×
  • Create New...

Important Information

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