From 5b039f1855ef32d5b616fe20b157b5a6a432343c Mon Sep 17 00:00:00 2001 From: teknomunk Date: Wed, 28 Aug 2024 06:30:12 -0500 Subject: [PATCH] Fix getting water back into bottle --- mods/ITEMS/mcl_potions/init.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mods/ITEMS/mcl_potions/init.lua b/mods/ITEMS/mcl_potions/init.lua index 7926cbe36..3d00d2801 100644 --- a/mods/ITEMS/mcl_potions/init.lua +++ b/mods/ITEMS/mcl_potions/init.lua @@ -61,10 +61,9 @@ minetest.register_craftitem("mcl_potions:glass_bottle", { local def = minetest.registered_nodes[node.name] -- Call on_rightclick if the pointed node defines it - if placer and not placer:get_player_control().sneak then - if def and def.on_rightclick then - return def.on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack - end + local new_stack = mcl_util.call_on_rightclick(itemstack, placer, pointed_thing) + if new_stack and new_stack ~= itemstack then + return new_stack end -- Try to fill glass bottle with water