Just in case the number goes negative
This commit is contained in:
parent
c9ea7f7727
commit
1751ec494c
1 changed files with 4 additions and 3 deletions
|
@ -39,14 +39,15 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan
|
||||||
@Override
|
@Override
|
||||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||||
int textureIndex=actualTexture|(mTexturePage<<7);//Shift seven since one page is 128 textures!
|
int textureIndex=actualTexture|(mTexturePage<<7);//Shift seven since one page is 128 textures!
|
||||||
|
int texturePointer=(byte)(actualTexture&0x7F);//just to be sure, from my testing the 8th bit cannot be set clientside
|
||||||
return aSide != aFacing ?
|
return aSide != aFacing ?
|
||||||
textureIndex > 0 ?
|
textureIndex > 0 ?
|
||||||
new ITexture[]{Textures.BlockIcons.casingTexturePages[mTexturePage][actualTexture]} :
|
new ITexture[]{Textures.BlockIcons.casingTexturePages[mTexturePage][texturePointer]} :
|
||||||
new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]} :
|
new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]} :
|
||||||
textureIndex > 0 ?
|
textureIndex > 0 ?
|
||||||
aActive ?
|
aActive ?
|
||||||
getTexturesActive(Textures.BlockIcons.casingTexturePages[mTexturePage][actualTexture]) :
|
getTexturesActive(Textures.BlockIcons.casingTexturePages[mTexturePage][texturePointer]) :
|
||||||
getTexturesInactive(Textures.BlockIcons.casingTexturePages[mTexturePage][actualTexture]) :
|
getTexturesInactive(Textures.BlockIcons.casingTexturePages[mTexturePage][texturePointer]) :
|
||||||
aActive ?
|
aActive ?
|
||||||
getTexturesActive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]) :
|
getTexturesActive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]) :
|
||||||
getTexturesInactive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]);
|
getTexturesInactive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]);
|
||||||
|
|
Loading…
Reference in a new issue