From 5da091816c0c22fcdfa9065eb86b897c5aa5b55d Mon Sep 17 00:00:00 2001 From: Aaron Suen Date: Sun, 14 Mar 2021 21:33:40 -0400 Subject: [PATCH] Falling nodes displace itemstacks The realism theory is that item stacks are "looser" and more easily pushed out of the way. The gameplay theory is that it's getting annoying having machines like log or charcoal choppers getting blocked by items under the falling nodes. This is also hopefully part of falling-node stack order reform, to fix that nodes sometimes fall through each other. --- mods/nc_api_ents/falling_ent.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mods/nc_api_ents/falling_ent.lua b/mods/nc_api_ents/falling_ent.lua index 0ceb1574..a367d149 100644 --- a/mods/nc_api_ents/falling_ent.lua +++ b/mods/nc_api_ents/falling_ent.lua @@ -93,6 +93,14 @@ minetest.register_entity(":__builtin:falling_node", { return end + local below = {x = pos.x, y = pos.y - 1, z = pos.z} + local node = minetest.get_node(below) + local def = minetest.registered_nodes[node.name] or {} + if def.groups and def.groups.is_stack_only then + minetest.dig_node(below) + return + end + displace_check(pos) nodecore.set_loud(pos, self.node)