Jump to content

Recommended Posts

Posted

Second time bothering you guys. I'll make a habit out of this ;D

 

So, I'm having trouble with creating a metadata block that has differing textures and name from the normal one.

 

Main .class:

 

  Reveal hidden contents

 

And the BlockScienceMetaOre.class:

 

  Reveal hidden contents

 

 

Have tried a number of different methods, and I'm feeling really clueless now, so please help.

 

For the science.  ::)

Posted

You need an itemBlock (Your item oreclass)

 

That class stores the metainformation.

 

public class OreMetaItem extends ItemBlock

{

    public OreMetaItem(int par1)

    {

          super(par1);

          setHasSubtypes(true);

    }

 

    public int getMetadata(int par1)

    {

        return par1;

    }

 

}

 

Than you have to add this to your BaseModfile

 

GameRegistry.registerBlock(block, ItemBlock.class);

 

 

Posted

Weird, that cause me to error like hell earlier. Oh well, I guess I'll try it again.

 

Edit: okay, I got them to spawn as separate blocks that drop the respective ores. Next thing is fixing the names. I don't want my periclase called garnierite.

 

Edit 2: And it's working, thanks for the help.

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.