The solution is already in the source... but PHP: $faces = [ 0 => 4, 1 => 2, 2 => 5, 3 => 3,];$block->setDamage($faces[$player instanceof Player ? $player->getDirection() : 0]); -.-