Mineclonia/mods/ITEMS/mcl_portals
Nils Dagsson Moskopp 4b91ae9522
Fix C stack overflow on Nether portal destruction
Before this patch, destroying an obsidian Nether portal frame destroyed
Nether portal nodes recursively. In Minetest binaries compiled with Lua
5.1 (i.e. without LuaJIT) this would cause a stack overflow when a huge
portal (23×23) was destroyed, crashing the server.

This patch implements Nether portal destruction using node timers. When
a portal node's timer triggers, it starts the timers of adjacent portal
nodes with the same orientation and no active timer and deletes itself.

Attempts to solve this problem using minetest.after() seemed promising,
but rubenwardy pointed out that anything relying on minetest.after() is
bound to fail if a server shuts down while portal nodes are destroyed.
2022-02-20 13:50:24 +01:00
..
locale Update French translation 2021-02-13 00:09:59 +01:00
sounds Add epic end portal open sound 2020-12-06 00:27:10 +01:00
textures Merge kay27_textures branch: more recongizable obsidian texture; better NP texture; Nether particles 2020-10-24 21:49:11 +04:00
LICENSE Move mcl_portals to ITEMS 2017-08-17 13:39:25 +02:00
README.md Add epic end portal open sound 2020-12-06 00:27:10 +01:00
init.lua Allow to light Nether portal with any fire 2017-09-19 15:45:23 +02:00
mod.conf Move data from deprecated files to mod.conf 2021-05-16 13:44:04 +02:00
portal_end.lua Update use_texture_alpha to the minetest 5.4 conventions 2021-02-18 14:00:17 +01:00
portal_nether.lua Fix C stack overflow on Nether portal destruction 2022-02-20 13:50:24 +01:00

README.md

Portals mod for MineClone 2

How to create portals

Nether portal: Build an upright frame of obsidian, 4 blocks wide and 5 blocks high, and use a flint and steel inside it. End portal: Build an upright frame of red nether brick blocks, 4 blocks wide and 5 blocks high, and use an eye of ender inside it.

Credits

Created by maikerumine and Wuzzy. Code license: MIT License (see LICENSE).

Texture license: See README.md in main MineClone 2 directory.

mcl_portals_teleport.ogg * License: CC BY 3.0 * Authors: FreqMan and Wuzzy * Source: https://freesound.org/people/FreqMan/sounds/32541/

mcl_portals_open_end_portal.ogg * License: CC0 * Author: Johnnie_Holiday * Source: https://freesound.org/people/Johnnie_Holiday/sounds/546571/