mirror of
https://github.com/minetest-mods/nether.git
synced 2025-07-15 06:40:43 +02:00
API improvements
Improvements found while using the portals API in another mod (cloudlands): * remote_portal_checkup() will check the whole portal and frame for mapgen overwrites. * Allow find_realm_anchorPos() to return nil if no realm location could be found (portal will fail to ignite). * Allow create_book_of_portals() to be invoked [indirectly] by other mods. Also lowers nether_book_close.png to be 4bpp
This commit is contained in:
@ -22,11 +22,6 @@ one kind of portal with the same frame material — such as obsidian — provide
|
||||
the size of the PortalShape is distinct from any other type of portal that is
|
||||
using the same node for its frame, and portal sizes remain small.
|
||||
|
||||
Stone is not a good choice for portal frame nodes as the Minetest engine may
|
||||
convert it into terrain nodes if the biome-pass occurs after the portal is
|
||||
created. Similarly, avoid using nodes which may be replaced by ABMs or
|
||||
docoration functions without triggering the node's `on_destruct` handler.
|
||||
|
||||
|
||||
Realms
|
||||
------
|
||||
@ -200,7 +195,9 @@ Used by `nether.register_portal`.
|
||||
|
||||
within_realm = function(pos),
|
||||
-- Required. Return true if a portal at pos is in the realm, rather
|
||||
than the surface world.
|
||||
-- than the surface world.
|
||||
-- Ideally implementations are fast, as this function can be used to
|
||||
-- sift through a list of portals.
|
||||
|
||||
find_realm_anchorPos = function(surface_anchorPos),
|
||||
-- Required. Return a position in the realm that a portal created at
|
||||
|
Reference in New Issue
Block a user