Changed to look for isAirBlock() instead of getBlockId() == 0, to prevent the invisible block bug to happen.
Bugfix: Players can castle when their King is in check.