diff --git a/mods/bucket/init.lua b/mods/bucket/init.lua index 62720d59..d8793175 100644 --- a/mods/bucket/init.lua +++ b/mods/bucket/init.lua @@ -116,6 +116,10 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name return ItemStack("bucket:bucket_empty") end }) + if itemname:sub(1,1) == ":" then + -- If the itemname starts with a colon, correct that + bucket.liquids[source]["itemname"] = itemname:sub(2) + end end end @@ -148,11 +152,6 @@ minetest.register_craftitem("bucket:bucket_empty", { -- default set to return filled bucket local giving_back = liquiddef.itemname - if giving_back:sub(1,1) == ":" then - --overwrite with removed prepending colon if present in itemname - --for cases where mods and submods use the same namespace - giving_back = giving_back:sub(2) - end -- check if holding more than 1 empty bucket if item_count > 1 then