A state parliament has passed legislation establishing the creation of a major national park designed to protect koala habitats in the state.