From f7ebd786143d0ad5434b9abe66e635964ed92c8d Mon Sep 17 00:00:00 2001 From: Treer Date: Tue, 18 Feb 2020 23:05:45 +1100 Subject: [PATCH] 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. --- README.md | 1 + nodes.lua | 29 ++++++++++++++++++++++++++++- portal_api.lua | 4 ++-- portal_api.txt | 5 +++++ portal_examples.lua | 1 + textures/nether_portal.png | Bin 282 -> 1500 bytes textures/nether_portal_alt.png | Bin 0 -> 282 bytes 7 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 textures/nether_portal_alt.png 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 583a0998190f69576c4002c7f2ab211a4ad540b1..cae749b26b7e8b20d22b3388d995a57248f6763a 100644 GIT binary patch delta 1475 zcmV;!1w8ti0^AFb7Yfh>0{{R3{5AaMkuMm3Do{*RMgRZ*|NsC0|NsC0|NsC0|NsC0 z|NsC0|NsC0|NsC0|NsC0|NsC0|NsAL`%NtX000hjQchF3y1l-?z{AAL%-h`S>}!xL zbpQYa5ftJmLXe~43^dt&;V?$g` ze-2}zs1$?2ARcBko5muU#0kZtU$Ww0utQNSBrlL&3;4?2Ef9g2aBE(MWY9w z(coDMteC`fAd=}$LUj_4;?eMs_++ww9eFNbP`HsAlD2vg?Mh3=R{daCIwY1)24arH zY9U0DNh(i7QRK;-X0ufBTnHM8`oifGYy}aV92HukQX=hd<)zc{@Vyw7M z1l5%&=9Q?4iv*wXTcnXA$HI8_Z68TbO!Fp6ji$or@!Q*)n>chKHRcAyIgrCa1EN22llZQ!=p5$Z=Vh z9WvIFIkEG7sk{38rbCxI4;J8~o+s!U5?X}IMmtJ1O(#(e5 z0*qXEpMP50c&r~dHMfiJu##W*ezcx>_U3?sIUB>xAM{i)&Yf#GyQNuw!C9GaC^*7- z;hnE6eXuK*7k6m3)n_E;mVV21rn=JUYQ5}=a9*bp7PItexD^fsQRZ(;9;3sN=I$OD z7%TYcj{T!OFX)Nt&Z6|?wbtEqY2dhh8f{~Y#!k&QxxDx$SLA2jN?)+9%$=d@-z}QU zS^8qR*z##u*QJ5_{O@CbnydRLeJ5AuPA!SQY9M!sJ#gK#qX(=wec zaZ#kZqbsY;Qu6}MUl`LUN2^9It}r2s9rB75`3QA|23RdvKL=K4k-#F0je$ziQY%E2 z{u0fBBfrq4Z6FSe69m_d=aN?s>`%=KgC+9$YKv>N@MqDyyxuZ@OIq09B>q|eZkd&S zY3Sxp*|zprk~hHgoV0AMTHMUZxut$?R*o9gTDd?QH=R%OlI%O#dMs?m{R%IJD#WY7?;uNO7UrVPPWLDEg?i)mHvi8ky3w! z%anWsx-O^3%Au%#Hovzxu4tYq?=vROORo*edo^rb`dcYSD& zqo@Zx{P=kig=dmU@#sO{ghmhQU+)1fxUO|o5j*!nZ zge-eKd>6p-+FJtncTDG#i{2Kl5Pu zn-t*_Vo2D3z4rlE5RFDig2HfZC`JJ+(MF0I_`##sc0cTvQlx`Ig}vQm2TKTz2mQ_` z>VU8mc4L}FfDD7j)OhwNIQ$QR?(b4nGND%h001j=MObt}a&&2PbO1$obY*xkFfkx# zbaZfYIxjD0X>@3HVlHEEZ7)T5bY*xkFfnqjB)9-B000+sMObu0Z*X~XX=iA305UK# dFd#*EbY*xkFfr6g4wnD`002ovPDHLkV1k=w=`#QT delta 247 zcmV0yO4S$@fTFny#6%OEG?e x3xYvKl7I847yenP0pzVl<@Q`~dq)rOnH<%KD>aa_G;aU^002ovPDHLkV1jgHY5xEK diff --git a/textures/nether_portal_alt.png b/textures/nether_portal_alt.png new file mode 100644 index 0000000000000000000000000000000000000000..583a0998190f69576c4002c7f2ab211a4ad540b1 GIT binary patch literal 282 zcmeAS@N?(olHy`uVBq!ia0vp^0zmA*!2%?Ame|VzDW)WEcNYegX?@2Z19_YU9+AZi z4BWyX%*Zfnjs#F}pQnpsh{y4xp|^RD7;q^2Jo#I{tI2$);H~~uK_@KzbC??@ z+}W0YNuI-3C+n~tulxtrs~@{Rt|+cNb&yrz%p;Zy-ZAI1!Vc#0P5O9YMe|2tW|PMU zJo(I{d$|rQO`N%dch;QC&Qb2S?F;$ONzeEuv|r(;1HXTJYgWXZn>w9lt5rDp8?wGi z!kY6E5!dru4H_&*6r!Hn1X6| c{tq){u6AgfPS|Xc5A+Fxr>mdKI;Vst04hLiB>(^b literal 0 HcmV?d00001