Jump to content

Recommended Posts

Posted

Hi,

 

So I created this (below) method to register my blocks is MoToolsRegistry.class

public static void registerBlocks(Block block, String name, String unlocalizedName){
	GameRegistry.registerBlock(block, MoTools.modID + unlocalizedName);
	LanguageRegistry.addName(block, name);
}

 

And called it in MoTools.class

MoToolsRegistry reg = new MoToolsRegistry();

	reg.registerBlocks(blockAzurite, "Azurite Ore", oreAzurite.getUnlocalizedName2());

 

But forge is throwing me this error:

 

  Reveal hidden contents

 

 

And frankly, I have no idea why.

Any help?

Posted

is "blockLazurite initialined ?  (somethign like blockLazurite = new BlockLazurite(arguments); )

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted
  Quote
Yes. Yes it is

 

sorry we do get some pretty stupid question sometimes

 

at cpw.mods.fml.common.registry.GameRegistry.registerBlock([b]GameRegistry.java:232[/b])

 

can you check at line 232 of GameRegistry to see what reference is null

 

like

if(ref == null){
System.out.println("ref is null");
}

 

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

Lines 229-233 say:

catch (Exception e)
        {
            FMLLog.log(Level.SEVERE, e, "Caught an exception during block registration");
            throw new LoaderException(e);
        }

Posted

Never mind. I see what I've done.

 

I've used the wrong block

 

This

MoToolsRegistry reg = new MoToolsRegistry();

	reg.registerBlocks(blockAzurite, "Azurite Ore", oreAzurite.getUnlocalizedName2())

 

Should be this

MoToolsRegistry reg = new MoToolsRegistry();

	reg.registerBlocks(oreAzurite, "Azurite Ore", oreAzurite.getUnlocalizedName2())

 

Silly me

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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