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
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
2
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!
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.
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.
