Jump to content

Held block rotation


Recommended Posts

So I have a block with a meta-dependent texture, but when it's held it shows the wrong faces



How can I rotate it to show the face of the machine?


here's my rendering method:

public void registerBlockIcons(IIconRegister reg)
	this.icons[0] = reg.registerIcon("sporksstuff:generator_bottom"); //bottom
	this.icons[1] = reg.registerIcon("sporksstuff:generator_top"); //top
	this.icons[2] = reg.registerIcon("sporksstuff:generator_front"); //north
	this.icons[3] = reg.registerIcon("sporksstuff:generator_side"); //it literally says in the name. Why am I writing this?
	this.icons[4] = reg.registerIcon("sporksstuff:generator_front_active");
  public IIcon getIcon(int side, int meta)
	  if(side == meta) {return icons[2]; }
	  if(side == meta-6) return icons[4];
	  if(side == 0 || side == 1) return icons[side]; //top & bottom
	  return icons[3];



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.

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.