Facades now render the correct texture on each side.

This commit is contained in:
AlgorithmX2 2014-02-12 23:33:27 -06:00
parent 7f773f0d2b
commit 22c575f06a
2 changed files with 23 additions and 2 deletions

View file

@ -108,6 +108,16 @@ public class RenderBlocksWorkaround extends RenderBlocks
rXPos = rXNeg = rYPos = rYNeg = rZPos = rZNeg = ico;
}
public void setTexture(IIcon rYNeg, IIcon rYPos, IIcon rZNeg, IIcon rZPos, IIcon rXNeg, IIcon rXPos)
{
this.rXPos = rXPos;
this.rXNeg = rXNeg;
this.rYPos = rYPos;
this.rYNeg = rYNeg;
this.rZPos = rZPos;
this.rZNeg = rZNeg;
}
public boolean renderStandardBlockNoCalculations(Block b, int x, int y, int z)
{
Tessellator.instance.setBrightness( bXPos );

View file

@ -153,11 +153,22 @@ public class FacadePart implements IFacadePart
rbw.calculations = false;
rbw.faces = EnumSet.allOf( ForgeDirection.class );
((RenderBlocksWorkaround) renderer).setTexture( blk.getIcon( side.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ) );
((RenderBlocksWorkaround) renderer).setTexture(
blk.getIcon( ForgeDirection.DOWN.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ),
blk.getIcon( ForgeDirection.UP.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ),
blk.getIcon( ForgeDirection.NORTH.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ),
blk.getIcon( ForgeDirection.SOUTH.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ),
blk.getIcon( ForgeDirection.WEST.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ),
blk.getIcon( ForgeDirection.EAST.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ) );
}
else
{
instance.setTexture( blk.getIcon( side.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ) );
instance.setTexture( blk.getIcon( ForgeDirection.DOWN.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ),
blk.getIcon( ForgeDirection.UP.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ),
blk.getIcon( ForgeDirection.NORTH.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ),
blk.getIcon( ForgeDirection.SOUTH.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ),
blk.getIcon( ForgeDirection.WEST.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ),
blk.getIcon( ForgeDirection.EAST.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ) );
}
if ( busBounds == null )