From afc6a1bb0fa17ae07905e1c0e1f5ff46ba47c1b7 Mon Sep 17 00:00:00 2001 From: kay27 Date: Sat, 1 Aug 2020 05:44:02 +0400 Subject: [PATCH 1/2] Localize variable in mcl_beds --- mods/ITEMS/mcl_beds/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_beds/functions.lua b/mods/ITEMS/mcl_beds/functions.lua index b1a0ce4fd..389871497 100644 --- a/mods/ITEMS/mcl_beds/functions.lua +++ b/mods/ITEMS/mcl_beds/functions.lua @@ -364,7 +364,7 @@ end) minetest.register_on_leaveplayer(function(player) local name = player:get_player_name() lay_down(player, nil, nil, false, true) - players = minetest.get_connected_players() + local players = minetest.get_connected_players() for n, player in ipairs(players) do if player:get_player_name() == name then players[n] = nil From 125840c9e46ba62e9a77ab2dd51239e3bec36a0a Mon Sep 17 00:00:00 2001 From: kay27 Date: Sun, 2 Aug 2020 19:46:09 +0400 Subject: [PATCH 2/2] Fix bucket stacks https://git.minetest.land/Wuzzy/MineClone2/issues/745 by removing leftovers of metadata usage --- mods/ITEMS/mcl_buckets/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_buckets/init.lua b/mods/ITEMS/mcl_buckets/init.lua index 1ed516554..3a06272b3 100644 --- a/mods/ITEMS/mcl_buckets/init.lua +++ b/mods/ITEMS/mcl_buckets/init.lua @@ -221,7 +221,7 @@ minetest.register_craftitem("mcl_buckets:bucket_empty", { -- Fill bucket, but not in Creative Mode if not minetest.is_creative_enabled(user:get_player_name()) then - new_bucket = ItemStack({name = liquiddef.itemname, metadata = tostring(node.param2)}) + new_bucket = ItemStack({name = liquiddef.itemname}) end minetest.add_node(pointed_thing.under, {name="air"}) @@ -274,7 +274,7 @@ minetest.register_craftitem("mcl_buckets:bucket_empty", { local new_bucket if liquiddef ~= nil and liquiddef.itemname ~= nil and (dropnode.name == liquiddef.source_take) then -- Fill bucket - new_bucket = ItemStack({name = liquiddef.itemname, metadata = tostring(dropnode.param2)}) + new_bucket = ItemStack({name = liquiddef.itemname}) sound_take(dropnode.name, droppos) collect_liquid = true end