From 03e16420d72e4103e04f9ea929fa6d7376bb29db Mon Sep 17 00:00:00 2001 From: Léa Gris Date: Tue, 5 Jan 2021 00:20:34 +0100 Subject: fix(rendering): bottom side orientation - Fix bottom side texture orientation to not flip texture. Special thanks to @GregoriusT who raised awareness of potential issue with texture where direction matters (like button panels or texts). - Implement a flipped bottom texture rendering to have ore blocks use the very same orientation as dumb blocks ore textures from other mods. - Refactor GT_SidedTexture to use GT_RenderedTexture for rendering, rather than duplicate the rendering code of it. --- .../api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java | 2 +- .../api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity/implementations') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java index 2afc996df2..4fc3b28dc9 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java @@ -111,7 +111,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { if (aSide >= 0 && aSide < 6) { for (byte i = 0; i < 4; i++) if (isInputDisabledAtSide(sRestrictionArray[aSide][i])) tMask |= 1 << i; //Full block size renderer flips side 5 and 2 textures, flip restrictor textures to compensate - if (aSide == 5 || aSide == 2 || aSide == 0) + if (aSide == 5 || aSide == 2) if (tMask > 3 && tMask < 12) tMask = (byte) (tMask ^ 12); } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java index 82cda6c670..7c57076ae9 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java @@ -97,10 +97,10 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM break; case WEST: switch (side) { - case DOWN: case UP: case SOUTH: return mTextures[ARROW_RIGHT_INDEX][colorIndex]; // ARROW_RIGHT + case DOWN: case NORTH: return mTextures[ARROW_LEFT_INDEX][colorIndex]; // ARROW_LEFT default: @@ -108,10 +108,10 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM break; case EAST: switch (side) { - case DOWN: case UP: case SOUTH: return mTextures[ARROW_LEFT_INDEX][colorIndex]; // ARROW_LEFT + case DOWN: case NORTH: return mTextures[ARROW_RIGHT_INDEX][colorIndex]; // ARROW_RIGHT default: -- cgit