at the use method of the block you must check if the block above or below is a furnace whit the same facing
// ########## ########## ########## ##########
// On right click
@Override
public InteractionResult use(BlockState blkstate, Level warudo, BlockPos pos, Player pe, InteractionHand hand,
BlockHitResult hit) {
//System.out.println("use()");
ItemStack helditem = pe.getItemInHand(hand);
int age = blkstate.getValue(AGE);
if( !warudo.isClientSide() ){
BlockState blockabove = warudo.getBlockState( pos.above() );
BlockState blockbelow = warudo.getBlockState( pos.below() );
//stuff
//stuff
//stuff