1

1.5 Multi-Textured Block

Destian_ 3/17/13 1:01 pm
1k
3/20/2013 10:34 pm
Hey there! I need help to updating my mod to 1.5;

I know how to use many of the new methods BUT i don´t know how to do a multitextured block (with different textures on the sides and top etc.).
I already looked in the regular code of minecraft but it had confused me

So can you tell me how to do that (i need it for every side)

p.s.: i already looked here (http://www.minecraftforum.net/topic/1722368-15-icons-and-block-textures/) but that didn´t helped me
Posted by
Destian_
Level 9 : Apprentice Modder
50

  Have something to say?

JoinSign in

2

Zeeler
03/20/2013 10:34 pm
Level 1 : New Miner
Thanks so much Twinklez. I've been testing for hours upon hours trying to do this. I don't know how I missed this though! I was probably trying way to hard, but thanks again, off to finish updating my mod!
1
Twinklez
03/20/2013 9:30 pm
Level 76 : Legendary Modder
In your Blocks class, add this.
At the top of the mod, like just after you do public class blahblahblah add.

private Icon sides, bottom, top;

Then add this.


public void func_94332_a(IconRegister par1IconRegister)
{
this.sides = par1IconRegister.func_94245_a("sidespng");
this.bottom = par1IconRegister.func_94245_a("bottompng");
this.top = par1IconRegister.func_94245_a("toppng");
}
//For example, I used sidespng. That would be located in /textures/blocks/sidespng.png. You don't need to add any extra things, just the png name without .png.

public Icon getBlockTextureFromSideAndMetadata(int i, int j)
{
if (i == 0)
{
return bottom;
}
if (i == 1)
{
return top;
}
else
{
return sides;
}
}//Don't edit this.
1

Welcome