Fix a single side of smart/dense texture being ill-rotated.

This commit is contained in:
AlgorithmX2
2014-08-10 00:15:14 -05:00
parent 19ab2d9f04
commit f713883688
3 changed files with 36 additions and 9 deletions
+12 -3
View File
@@ -14,15 +14,24 @@ public class TmpFlipableIcon extends FlipableIcon
public void setOriginal(IIcon i)
{
setFlip( false, false );
while (i instanceof FlipableIcon)
i = ((FlipableIcon) i).getOriginal();
{
FlipableIcon fi = (FlipableIcon) i;
if ( fi.flip_u )
this.flip_u = !this.flip_u;
if ( fi.flip_v )
this.flip_v = !this.flip_v;
i = fi.getOriginal();
}
if ( i == null )
original = nullIcon;
else
original = i;
setFlip( false, false );
}
}
+12 -3
View File
@@ -294,7 +294,7 @@ public class PartCableSmart extends PartCable
renderer.uvRotateWest = 1;
renderer.uvRotateBottom = 2;
renderer.uvRotateTop = 1;
renderer.uvRotateSouth = 3;
renderer.uvRotateSouth = 0;
renderer.uvRotateNorth = 0;
AEBaseBlock blk = (AEBaseBlock) rh.getBlock();
@@ -306,12 +306,21 @@ public class PartCableSmart extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
FlipableIcon fpA = new FlipableIcon( defa );
FlipableIcon fpB = new FlipableIcon( defb );
fpA = new FlipableIcon( defa );
fpB = new FlipableIcon( defb );
fpA.setFlip( true, false );
fpB.setFlip( true, false );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( offa, offa, offa, offa, defa, defa );
rh.setTexture( offa, offa, offa, offa, defa, fpA );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( offb, offb, offb, offb, defb, defb );
rh.setTexture( offb, offb, offb, offb, defb, fpB );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
case NORTH:
+12 -3
View File
@@ -397,7 +397,7 @@ public class PartDenseCable extends PartCable
renderer.uvRotateWest = 1;
renderer.uvRotateBottom = 2;
renderer.uvRotateTop = 1;
renderer.uvRotateSouth = 3;
renderer.uvRotateSouth = 0;
renderer.uvRotateNorth = 0;
AEBaseBlock blk = (AEBaseBlock) rh.getBlock();
@@ -409,12 +409,21 @@ public class PartDenseCable extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
FlipableIcon fpA = new FlipableIcon( defa );
FlipableIcon fpB = new FlipableIcon( defb );
fpA = new FlipableIcon( defa );
fpB = new FlipableIcon( defb );
fpA.setFlip( true, false );
fpB.setFlip( true, false );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( offa, offa, offa, offa, defa, defa );
rh.setTexture( offa, offa, offa, offa, defa, fpA );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( offb, offb, offb, offb, defb, defb );
rh.setTexture( offb, offb, offb, offb, defb, fpB );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
case NORTH: