added protected methods onOpened/onClosed to BlockOpenable; change fence gate direction only if opened
formatting