From dde7f13ac9c407dc6b6f3d344493aa329dd41fc9 Mon Sep 17 00:00:00 2001 From: Petras Jokubauskas Date: Fri, 6 Jun 2025 09:40:40 +0200 Subject: [PATCH] Fix register_liquid for mods and submods using same namespace a fix allowing to use itemname with colon prefix when doing register_liquid --- mods/bucket/init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mods/bucket/init.lua b/mods/bucket/init.lua index b026ee07..62720d59 100644 --- a/mods/bucket/init.lua +++ b/mods/bucket/init.lua @@ -148,6 +148,11 @@ 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