Jump to content

[1.7.2] Multi-Textured Block


Pardeep

Recommended Posts

I have a multi-textured block (a custom furnace to be exact). The textures are fine and work fine and when I place the block they orientate correctly. However, the icon in the inventory only shows the side and top textures, not the side, top and front like a normal furnace. Any helps would be appreciated as to how to fix this.

Thanks in advance.

 

How the icon looks in the inventory next to a vanilla furnace:

068ee5b76c9d7611bad4c688faca2a06.png

The BlockCustomFurnace class (the texture parts):


    @SideOnly(Side.CLIENT)
    private IIcon furnaceIconTop;
    @SideOnly(Side.CLIENT)
    private IIcon furnaceIconFront;

    @Override
    public IIcon getIcon(int par1, int par2)
    {
        return par1 == 1 ? this.furnaceIconTop : (par1 == 0 ? this.furnaceIconTop : (par1 != par2 ? this.blockIcon : this.furnaceIconFront));
    }

    @Override
    @SideOnly(Side.CLIENT)
    public void registerBlockIcons(IIconRegister par1IconRegister)
    {
        this.blockIcon = par1IconRegister.registerIcon("freshpower:superfurnace_side");
        this.furnaceIconFront = par1IconRegister.registerIcon(this.isActive ? "freshpower:superfurnace_front_on" : "freshpower:superfurnace_front_off");
        this.furnaceIconTop = par1IconRegister.registerIcon("freshpower:superfurnace_top");
    }

The front texture I want to show on the icon:

width=16 height=16http://s10.postimg.org/t03lprslh/superfurnace_front_off.png[/img]

Link to comment
Share on other sites

I had the same problem just 5 minutes ago ;-)

I think the only solution is a custom Item renderer. Do not ask me how it works, I am trying to implement it just now.

try {

...

}catch(Throwable t) {

    MagicAppErrorSolver.solveProblem(t, this);

}

//Programmers will lose work

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.

Announcements



×
×
  • Create New...

Important Information

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