Jump to content

1.3.1 Forge Issue


_bau5

Recommended Posts

New to this whole Forge modding idea, but really interested in it.

 

When I run Minecraft in eclipse i get this error:

2012-08-16 23:58:01 [sEVERE] [ForgeModLoader] Fatal errors were detected during the transition from INITIALIZATION to POSTINITIALIZATION. Loading cannot continue
2012-08-16 23:58:01 [sEVERE] [ForgeModLoader] 
Forge Mod Loader (coremods) Unloaded->Constructed->Pre-initialized->Initialized
Alptraum (bin) Unloaded->Constructed->Pre-initialized->Errored
Minecraft Forge (coremods) Unloaded->Constructed->Pre-initialized->Initialized

More precise:

2012-08-16 15:42:20 [iNFO] [sTDERR] Caused by: java.lang.ClassCastException: Alptraum.NightmareStoneBlock cannot be cast to cpw.mods.fml.common.registry.BlockProxy
2012-08-16 15:42:20 [iNFO] [sTDERR] 	at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:179)
2012-08-16 15:42:20 [iNFO] [sTDERR] 	at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:149)
2012-08-16 15:42:20 [iNFO] [sTDERR] 	at Alptraum.Alptraum.registerAllBlocks(Alptraum.java:26)
2012-08-16 15:42:20 [iNFO] [sTDERR] 	at Alptraum.Alptraum.initAlptraum(Alptraum.java:21)
2012-08-16 15:42:20 [iNFO] [sTDERR] 	... 30 more

 

My code:

package Alptraum;

import net.minecraft.src.*;
import net.minecraft.src.Block;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.Property;
import cpw.mods.fml.common.*;
import cpw.mods.fml.common.Mod.*;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;

@Mod( modid = "_bau5Alptraum", name = "Alptraum", version = "0.1")
public class Alptraum 
{
public static NightmareStoneBlock nightmareStone;

@Init 
public void initAlptraum(FMLInitializationEvent event)
{
	MinecraftForgeClient.preloadTexture("/Textures/AlptraumSheet.png");
	registerAllBlocks();
}
private void registerAllBlocks()
{
	nightmareStone = new NightmareStoneBlock(150);
	GameRegistry.registerBlock(nightmareStone);
	ModLoader.addName(nightmareStone, "Nightmare Stone");
}

static {
	Props.initProps("AlptraumProps");
}
}

 

It fails at GameRegistry.registerBlock(...) and I realize that, just don't know what the fix is. Thanks.

 

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.



×
×
  • Create New...

Important Information

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