From bdb54d53759a61ed6a0f8e5ff47ea21f8e741c47 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 9 Jun 2017 22:47:59 +0200 Subject: [PATCH] Workaround for chests not working after placement --- mods/ITEMS/mcl_chests/init.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index e6276de12..359805af7 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -47,6 +47,16 @@ minetest.register_node("mcl_chests:"..basename, { on_construct = function(pos) local param2 = minetest.get_node(pos).param2 local meta = minetest.get_meta(pos) + --[[ This is a workaround for Minetest issue 5894 + . + Apparently if we don't do this, double chests initially don't work when + placed at chunk borders, and some chests randomly don't work after + placing. ]] + -- FIXME: Remove this workaround when the bug has been fixed. + -- BEGIN OF WORKAROUND -- + meta:set_string("workaround", "ignore_me") + meta:set_string("workaround", nil) -- Done to keep metadata clean + -- END OF WORKAROUND -- local inv = meta:get_inventory() inv:set_size("main", 9*3) if minetest.get_node(get_chest_neighborpos(pos, param2, "right")).name == "mcl_chests:"..basename then