This means Minetest servers can contain multiple realms that are discoverable and explorable organically, and allows game progression / gating and tech-trees. It can implement game mechanics like the Nether portal's fast-travel, or allow emergent portal gameplay.
Two playable portal examples are provided, in addition to the Nether portal itself, and can be enabled in the mod options:
- Floatlands portal
- Surface portal
If custom portals have been defined then players can discover how to build them either in the help [doc] modpack (if installed) or the Book of Portals, which appears in dungeon chests if the help modpack is not installed:
How to define a portal
From portal_api.txt
Essentially you pick a node type to have your portals built from, a shape in which the portals must be built, and provide 3 functions for portals to find their destinations with:
- find_realm_anchorPos(surface_origin_pos)
- find_surface_anchorPos(realm_origin_pos)
- is_within_realm(pos)
It uses the concept of a realm for each type of portal. If a portal is outside its realm then it links to a portal inside the realm, if a portal is inside its realm then it links to the outside.
You get to decide what constitutes your realm by implementing the function is_within_realm(position). For example, the Nether realm is defined as existing at a certain depth and anything above that depth is considered outside the Realm.
API and Nether Relationship
You can disable the Nether & its portal if you wish to use the Portals API without the Nether. The Nether mod depends on default and stairs, so currently the portals API does as well, however it does not need to. A forked API could theoretically be separated from the Nether mod if a version without default dependency was needed.
The Nether provides a new node type similar to obsidian that's earmarked for custom portals - basalts (natural, hewn, and chiselled), allowing other mods to have portals which players cannot construct until having reached and explored the Nether.
License:
(see README.txt)
Sourcecode: ISC
Textures: CC BY-SA
Depends:
default
stairs
many soft dependencies
GitHub:
https://github.com/minetest-mods/nether