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.
This commit is contained in:
Aaron Suen 2021-03-14 21:33:40 -04:00
parent cb2251529a
commit 5da091816c

View File

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