How do i make a cubic map like mc but as i want and not infinite?

there’s a tutorial series that covers that kind of system over here: