forked from MineClone5/MineClone5
sl4v & Nicu: Don't open chests if there is a full block above them, for 1-node normal & trapped chests
This commit is contained in:
parent
a511152cdf
commit
3cd30a559e
|
@ -227,6 +227,10 @@ minetest.register_node("mcl_chests:"..basename, {
|
|||
_mcl_hardness = 2.5,
|
||||
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
if minetest.registered_nodes[minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}).name].groups.opaque == 1 then
|
||||
-- won't open if there is no space from the top
|
||||
return false
|
||||
end
|
||||
local name = minetest.get_meta(pos):get_string("name")
|
||||
if name == "" then
|
||||
name = S("Chest")
|
||||
|
|
Loading…
Reference in New Issue