Bare stacks coalesce, but items don't fall into top of shelves.

This commit is contained in:
Aaron Suen 2019-02-27 23:12:19 -05:00
parent aa3c33adf9
commit ce46564f8e

View File

@ -56,8 +56,10 @@ function nodecore.place_stack(pos, stack, placer, pointed_thing)
local name = stack:get_name()
local below = {x = pos.x, y = pos.y - 1, z = pos.z}
stack = nodecore.stack_add(below, stack)
if stack:is_empty() then return end
if nodecore.match(below, {name = name, count = false}) then
stack = nodecore.stack_add(below, stack)
if stack:is_empty() then return end
end
minetest.set_node(pos, {name = modname .. ":stack"})
nodecore.stack_set(pos, stack)