From 473c85c54378d2594f992e751c6d6f7af00d8487 Mon Sep 17 00:00:00 2001 From: Eliy21 Date: Sun, 21 Jan 2024 08:40:42 +0000 Subject: [PATCH] Fix bucket milk item frame duplication bug --- mods/ITEMS/mcl_mobitems/init.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mods/ITEMS/mcl_mobitems/init.lua b/mods/ITEMS/mcl_mobitems/init.lua index c27ad4e10..421ee184e 100644 --- a/mods/ITEMS/mcl_mobitems/init.lua +++ b/mods/ITEMS/mcl_mobitems/init.lua @@ -147,6 +147,17 @@ end local function drink_milk_delayed(itemstack, player, pointed_thing) + if pointed_thing.type == "node" then + local node = minetest.get_node(pointed_thing.under) + if player and not player:get_player_control().sneak then + if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then + return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, player, itemstack) or itemstack + end + end + elseif pointed_thing.type == "object" then + return itemstack + end + local function drink_milk(itemstack, player, pointed_thing) --local bucket = minetest.do_item_eat(0, "mcl_buckets:bucket_empty", itemstack, player, pointed_thing) -- Check if we were allowed to drink this (eat delay check)