diff --git a/README.md b/README.md index 7404d14..aaa3a9a 100644 --- a/README.md +++ b/README.md @@ -43,5 +43,6 @@ SOFTWARE. ### [Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)](http://creativecommons.org/licenses/by-sa/3.0/) * `nether_rack.png`: Zeg9 * `nether_glowstone.png`: BlockMen + * `nether_portal.png`: [Extex101](https://github.com/Extex101), 2020 All other media: Copyright © 2013 PilzAdam, licensed under CC BY-SA 3.0 by PilzAdam. \ No newline at end of file diff --git a/nodes.lua b/nodes.lua index 14e3bd2..5bc9903 100644 --- a/nodes.lua +++ b/nodes.lua @@ -21,7 +21,7 @@ local S = nether.get_translator --- Portal/wormhole node +-- Portal/wormhole nodes nether.register_wormhole_node("nether:portal", { description = S("Nether Portal"), @@ -37,6 +37,33 @@ nether.register_wormhole_node("nether:portal", { } }) +local portal_animation2 = { + name = "nether_portal_alt.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.5, + }, +} + +nether.register_wormhole_node("nether:portal_alt", { + description = S("Portal"), + tiles = { + "nether_transparent.png", + "nether_transparent.png", + "nether_transparent.png", + "nether_transparent.png", + portal_animation2, + portal_animation2 + }, + post_effect_color = { + -- hopefully blue enough to work with blue portals, and green enough to + -- work with cyan portals. + a = 120, r = 0, g = 128, b = 188 + } +}) + -- Nether nodes diff --git a/portal_api.lua b/portal_api.lua index 13ab3ca..43151ec 100644 --- a/portal_api.lua +++ b/portal_api.lua @@ -1916,7 +1916,7 @@ local wormhole_nodedef_default = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, - length = 0.5, + length = 0.9, }, }, { @@ -1925,7 +1925,7 @@ local wormhole_nodedef_default = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, - length = 0.5, + length = 0.9, }, }, }, diff --git a/portal_api.txt b/portal_api.txt index e6cf533..2c39e95 100644 --- a/portal_api.txt +++ b/portal_api.txt @@ -127,6 +127,9 @@ Used by `nether.register_portal`. -- Optional. Allows a custom wormhole node to be specified. -- Useful if you want the portals to have a different post_effect_color -- or texture. + -- The Nether mod provides: + -- "nether:portal" (default) + -- "nether:portal_alt" wormhole_node_color = 0, -- Optional. Defaults to 0/magenta. @@ -208,6 +211,7 @@ Used by `nether.register_portal`. -- If the location of an existing portal is returned then include the -- orientation, otherwise the existing portal could be overwritten by -- a new one with the orientation of the surface portal. + -- Return nil to prevent the portal from igniting. find_surface_anchorPos = function(realm_anchorPos), -- Optional. If you don't implement this then a position near the @@ -222,6 +226,7 @@ Used by `nether.register_portal`. -- If the location of an existing portal is returned then include the -- orientation, otherwise the existing portal could be overwritten by -- a new one with the orientation of the realm portal. + -- Return nil to prevent the portal from igniting. on_run_wormhole = function(portalDef, anochorPos, orientation), -- invoked once per second per portal diff --git a/portal_examples.lua b/portal_examples.lua index 0b402ad..1a33943 100644 --- a/portal_examples.lua +++ b/portal_examples.lua @@ -116,6 +116,7 @@ if minetest.settings:get_bool("nether_enable_portal_example_surfacetravel", ENAB nether.register_portal("surface_portal", { shape = nether.PortalShape_Circular, frame_node_name = "default:tinblock", + wormhole_node_name = "nether:portal_alt", wormhole_node_color = 4, -- 4 is cyan title = S("Surface Portal"), book_of_portals_pagetext = S([[Requiring 16 blocks of tin and constructed in a circular fashion, a finished frame is seven blocks wide, seven blocks high, and stands vertically like a doorway. diff --git a/textures/nether_portal.png b/textures/nether_portal.png index 583a099..cae749b 100644 Binary files a/textures/nether_portal.png and b/textures/nether_portal.png differ diff --git a/textures/nether_portal_alt.png b/textures/nether_portal_alt.png new file mode 100644 index 0000000..583a099 Binary files /dev/null and b/textures/nether_portal_alt.png differ