Simplified return condition

This commit is contained in:
thatsIch 2014-11-04 02:30:59 +01:00
parent a80728de01
commit bfc8fac0dd

View file

@ -58,11 +58,8 @@ public class BlockCrank extends AEBaseBlock
private boolean isCrankable(World w, int x, int y, int z, ForgeDirection offset) private boolean isCrankable(World w, int x, int y, int z, ForgeDirection offset)
{ {
TileEntity te = w.getTileEntity( x + offset.offsetX, y + offset.offsetY, z + offset.offsetZ ); TileEntity te = w.getTileEntity( x + offset.offsetX, y + offset.offsetY, z + offset.offsetZ );
if ( te instanceof ICrankable )
{ return te instanceof ICrankable && ( ( ICrankable ) te ).canCrankAttach( offset.getOpposite() );
return ((ICrankable) te).canCrankAttach( offset.getOpposite() );
}
return false;
} }
private ForgeDirection findCrankable(World w, int x, int y, int z) private ForgeDirection findCrankable(World w, int x, int y, int z)