From f83d8c07addaee569274e567e6da7c5cdaa4f9bb Mon Sep 17 00:00:00 2001 From: kno10 Date: Mon, 30 Dec 2024 19:40:07 +0100 Subject: [PATCH] No timer for crying obsidian with a solid node below (#4754) Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4754 Reviewed-by: the-real-herowl Co-authored-by: kno10 Co-committed-by: kno10 --- mods/ITEMS/mcl_core/functions.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index 7cc8788d2..ca0f75e1c 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -1495,6 +1495,13 @@ minetest.register_abm({ interval = 5, chance = 10, action = function(pos, node) + local below = minetest.get_node(vector.offset(pos, 0, -1, 0)) + local ndef = minetest.registered_nodes[below.name] + if not ndef then return end -- ignore, most likely not loaded + if ndef.walkable and (ndef.node_box == nil or ndef.node_box.type == "regular") + and (ndef.collision_box == nil or ndef.collision_box.type == "regular") then + return -- completely solid block + end minetest.after(0.1 + random() * 1.4, function() local pt = table.copy(crobby_particle) pt.size = 1.3 + random() * 1.2