Merge pull request 'ITEMS/mcl_chests: Fix Ender chests from MineClone2' (#103) from fix-ender-chests-from-mineclone2 into master

Reviewed-on: Mineclonia/Mineclonia#103
Reviewed-by: cora <cora@noreply.git.minetest.land>
This commit is contained in:
cora 2021-06-29 21:25:37 +00:00
commit 00ee2d5013
1 changed files with 16 additions and 0 deletions

View File

@ -1401,6 +1401,22 @@ minetest.register_lbm({
end, end,
}) })
-- The following LBM allows the Ender chests from MineClone2 post-0.71
-- (after commit 819dbc6224c3b96ad4094cccf3d9150f3ef61d45) to work in
-- Mineclonia. It also ensures that any Ender chest formspec changes
-- (even a removal of the formspec) get applied in future versions.
minetest.register_lbm({
label = "Update ender chest formspecs (MineClone2 compatibility)",
name = "mcl_chests:update_ender_chest_formspecs_" ..
minetest.sha1(formspec_ender_chest),
nodenames = { "mcl_chests:ender_chest_small" },
run_at_every_load = false,
action = function(pos, node)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", formspec_ender_chest)
end,
})
minetest.register_lbm({ minetest.register_lbm({
label = "Update shulker box formspecs (0.60.0)", label = "Update shulker box formspecs (0.60.0)",
name = "mcl_chests:update_shulker_box_formspecs_0_60_0", name = "mcl_chests:update_shulker_box_formspecs_0_60_0",