How to change block texture on each side?

View previous topic View next topic Go down

How to change block texture on each side?

Post by Will.Ez on Sun May 01, 2011 8:34 am

The title says it all
How to change block texture on each side?
I tried
Code:
    public int getBlockTextureFromSide(int i)
    {
        if(i == 1 || i==0) //1 is top, 0 is bottom
        {
        return blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/WEmod/travelb/top.png");
        }
        else{return blockIndexInTexture;}
    }

But it doesnt seem to work, recompile works, reobf works, just the image doesnt work, the top and bottom of the block seems to be the purple-ish block texture in terrain.png and the command prompt keep saying
Overriding /terrain.png @ (this is number from 50+ to 255).....
when it hits 255, the game crash, which is normal for this error
Anyone know how other mods change block texture on each side?

Will.Ez
Iron Miner

Posts: 52
Join date: 2011-04-22
Age: 15

View user profile

Back to top Go down

Re: How to change block texture on each side?

Post by Ziddia on Sun May 01, 2011 9:41 am

Kaekae has a function for this. Take a look.

Ziddia
Admin
Admin

Posts: 168
Join date: 2011-04-22

View user profile http://zidmc.forumotion.com

Back to top Go down

Re: How to change block texture on each side?

Post by Coolio_G on Wed Jan 25, 2012 5:48 pm

Ziddia wrote:Kaekae has a function for this. Take a look.

Where would I find this function? I too would like to do this

Coolio_G
Recruit

Posts: 2
Join date: 2012-01-25

View user profile

Back to top Go down

Re: How to change block texture on each side?

Post by _1Greg1_ on Mon Jan 30, 2012 3:04 am

Please move to the new forum, http://www.zidmc.info

_1Greg1_
Gold Miner

Posts: 82
Join date: 2011-04-26
Age: 14

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum