aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/api
diff options
context:
space:
mode:
authorWilhelm Schuster <dev@rot13.io>2023-05-10 00:13:43 +0200
committerJason Mitchell <mitchej+github@gmail.com>2023-05-09 19:28:17 -0700
commita9993901c3d960715c40239461548cfc260b7853 (patch)
tree9c00743ca7a6f60e1f23d3a93b3be2d489ff2733 /src/main/java/gtPlusPlus/xmod/gregtech/api
parent707e02fc5fa9d9e4c6cc2a4ab2e0b2b72fbd58d9 (diff)
downloadGT5-Unofficial-a9993901c3d960715c40239461548cfc260b7853.tar.gz
GT5-Unofficial-a9993901c3d960715c40239461548cfc260b7853.tar.bz2
GT5-Unofficial-a9993901c3d960715c40239461548cfc260b7853.zip
Fix GT++ material pipe rendering
With the ForgeDirection migration, the signature of the getTexture() in GT_MetaPipeEntity_Fluid changed while forgetting to update the GT++ subclass. I'm guessing this is rooted in the fact that this method was missing the @Override annotation.
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/api')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java
index 959dc9c06d..39f4af99f3 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java
@@ -61,7 +61,8 @@ public class GregtechMetaPipeEntityFluid extends GT_MetaPipeEntity_Fluid {
this.mGasProof);
}
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, byte aConnections,
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, int aConnections,
int aColorIndex, boolean aConnected, boolean aRedstone) {
float tThickNess = getThickNess();
if (mDisableInput == 0)
@@ -69,16 +70,16 @@ public class GregtechMetaPipeEntityFluid extends GT_MetaPipeEntity_Fluid {
: TextureFactory.of(
mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex],
Dyes.getModulation(aColorIndex, mMaterial.mRGBa)) };
- byte tMask = 0;
+ int tMask = 0;
int[][] sRestrictionArray = { { 2, 3, 5, 4 }, { 2, 3, 4, 5 }, { 1, 0, 4, 5 }, { 1, 0, 4, 5 }, { 1, 0, 2, 3 },
{ 1, 0, 2, 3 } };
if (side != ForgeDirection.UNKNOWN) {
- for (byte i = 0; i < 4; i++)
+ for (int i = 0; i < 4; i++)
if (isInputDisabledAtSide(ForgeDirection.getOrientation(sRestrictionArray[side.ordinal()][i])))
tMask |= 1 << i;
// Full block size renderer flips side 5 and 2 textures, flip restrictor textures to compensate
if (side == ForgeDirection.EAST || side == ForgeDirection.UP)
- if (tMask > 3 && tMask < 12) tMask = (byte) (tMask ^ 12);
+ if (tMask > 3 && tMask < 12) tMask = (tMask ^ 12);
}
return new ITexture[] { aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex)
: TextureFactory.of(