1
0
Fork 0

Fix bucket milk item frame duplication bug

This commit is contained in:
Eliy21 2024-01-21 08:40:42 +00:00
parent 86c10002a6
commit 473c85c543
1 changed files with 11 additions and 0 deletions

View File

@ -147,6 +147,17 @@ end
local function drink_milk_delayed(itemstack, player, pointed_thing) 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 function drink_milk(itemstack, player, pointed_thing)
--local bucket = minetest.do_item_eat(0, "mcl_buckets:bucket_empty", 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) -- Check if we were allowed to drink this (eat delay check)