Browse Source

New/extra portal animation

(new animation by Extex101)
The original texture is now "nether_portal_alt.png", and used to provide a "nether:portal_alt" node, which is used/demoed by the Surface-portal as the original animation still has a "it's full of stars" charm coming out when used for lighter coloured portals.
pull/24/head
Treer SmallJoker 5 months ago
parent
commit
f7ebd78614
7 changed files with 37 additions and 2 deletions
  1. +1
    -0
      README.md
  2. +28
    -0
      nodes.lua
  3. +2
    -2
      portal_api.lua
  4. +5
    -0
      portal_api.txt
  5. +1
    -0
      portal_examples.lua
  6. BIN
      textures/nether_portal.png
  7. BIN
      textures/nether_portal_alt.png

+ 1
- 0
README.md View File

@@ -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.

+ 28
- 0
nodes.lua View File

@@ -21,7 +21,7 @@

local S = nether.get_translator

-- 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



+ 2
- 2
portal_api.lua View File

@@ -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,
},
},
},


+ 5
- 0
portal_api.txt View File

@@ -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


+ 1
- 0
portal_examples.lua View File

@@ -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.


BIN
textures/nether_portal.png View File

Before After
Width: 16  |  Height: 64  |  Size: 282B Width: 16  |  Height: 208  |  Size: 1.5KB

BIN
textures/nether_portal_alt.png View File

Before After
Width: 16  |  Height: 64  |  Size: 282B

Loading…
Cancel
Save