Fixed centrifuge block icons

This commit is contained in:
modmuss50 2015-09-07 21:17:07 +01:00
parent 5b1ee4cddc
commit 67e6182e44

View file

@ -68,13 +68,21 @@ public class BlockCentrifuge extends BlockMachineBase {
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
int metadata = getTileMeta(blockAccess, x, y, z);
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
return this.iconFrontOn;
if (blockAccess.getBlockMetadata(x, y, z) == 1) {
if(side == 1){
return this.iconTopOn;
} else if(side == 0){
return this.iconBottom;
}
return this.iconFrontOn;
} else {
if(side == 1){
return this.iconTop;
} else if(side == 0){
return this.iconBottom;
}
return this.iconFront;
}
return metadata == 0 && side == 3 ? this.iconFront
: side == 1 ? this.iconTop :
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
: (side == metadata ? this.iconFront : this.blockIcon));
}
@Override