Fixed small derp

This commit is contained in:
Gig 2015-06-07 20:45:53 +01:00
parent b1cbec9e63
commit a8962929cc

View file

@ -15,6 +15,7 @@ import net.minecraft.world.World;
import techreborn.Core;
import techreborn.blocks.BlockMachineBase;
import techreborn.client.GuiHandler;
import techreborn.tiles.TileAlloySmelter;
import techreborn.tiles.TileCentrifuge;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -73,19 +74,17 @@ public class BlockCentrifuge extends BlockMachineBase {
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
int metadata = blockAccess.getBlockMetadata(x, y, z);
TileCentrifuge tileCentrifuge = (TileCentrifuge) blockAccess.getTileEntity(x, y, z);
if(side >= 2 && tileCentrifuge.crafter.isActive()){
if(side == metadata && tileCentrifuge.crafter.isActive()){
return this.iconFrontOn;
}
if(side == 1 && tileCentrifuge.crafter.isActive()){
return this.iconTopOn;
}
return metadata == 0 && side == 3 ? this.iconFront
: side == 1 ? this.iconTop :
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
: (side == metadata ? this.iconFront : this.iconFront));
: (side == metadata ? this.iconFront : this.blockIcon));
}
@ -95,7 +94,7 @@ public class BlockCentrifuge extends BlockMachineBase {
return metadata == 0 && side == 3 ? this.iconFront
: side == 1 ? this.iconTop :
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
: (side == metadata ? this.iconFront : this.iconFront));
: (side == metadata ? this.iconFront : this.blockIcon));
}