From f88520a24d09b16372eb4fde1e24126bb06726ad Mon Sep 17 00:00:00 2001 From: "Github is a non-free platform owned by Microsoft. Reasonable alternatives exist, such as Gitea, Sourcehut. We need a federated, mastodon-like forge based on ForgeFed. See: https://forgefed.org" Date: Tue, 25 Mar 2025 21:58:33 +0100 Subject: [PATCH] Fix duplicate in Mineclonia on_place (#11) An itemstack must be returned to not duplicate the item. --- init.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 775dcd7..17d16c6 100644 --- a/init.lua +++ b/init.lua @@ -268,11 +268,11 @@ local function register_air_tank_3(name, desc, color, uses, material) _mcl_armor_texture = "airtanks_chestplate_tank_three.png", on_place = function(itemstack, user, pointed_thing) - if has_mcl_armor then - mcl_armor.equip_on_use(itemstack, user, pointed_thing) - else - return use_airtank(itemstack, user) - end + if has_mcl_armor then + return mcl_armor.equip_on_use(itemstack, user, pointed_thing) + else + return use_airtank(itemstack, user) + end end, on_secondary_use = has_mcl_armor and mcl_armor.equip_on_use,