diff options
author | Johannes Gäßler <updrn@student.kit.edu> | 2017-08-04 10:47:54 +0200 |
---|---|---|
committer | Technus <daniel112092@gmail.com> | 2017-08-05 08:43:14 +0200 |
commit | 1751ec494c85b66b43111f064dc4c3234fdac0c5 (patch) | |
tree | 4f0ba55ecd5ea7680f801e1d034bd9d712b2ea62 /src/main/java/gregtech/api | |
parent | c9ea7f7727be3ebd7714283626f00cb0ab529b1b (diff) | |
download | GT5-Unofficial-1751ec494c85b66b43111f064dc4c3234fdac0c5.tar.gz GT5-Unofficial-1751ec494c85b66b43111f064dc4c3234fdac0c5.tar.bz2 GT5-Unofficial-1751ec494c85b66b43111f064dc4c3234fdac0c5.zip |
Just in case the number goes negative
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java index 9695e71cb9..c6fa890b52 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java @@ -39,14 +39,15 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan @Override 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 texturePointer=(byte)(actualTexture&0x7F);//just to be sure, from my testing the 8th bit cannot be set clientside return aSide != aFacing ? 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]} : textureIndex > 0 ? aActive ? - getTexturesActive(Textures.BlockIcons.casingTexturePages[mTexturePage][actualTexture]) : - getTexturesInactive(Textures.BlockIcons.casingTexturePages[mTexturePage][actualTexture]) : + getTexturesActive(Textures.BlockIcons.casingTexturePages[mTexturePage][texturePointer]) : + getTexturesInactive(Textures.BlockIcons.casingTexturePages[mTexturePage][texturePointer]) : aActive ? getTexturesActive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]) : getTexturesInactive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]); |