mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 20:03:45 +01:00
Fix bucket milk item frame duplication bug
This commit is contained in:
parent
86c10002a6
commit
473c85c543
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user