mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-24 11:45:10 +00:00
Fix chorus fruit not working with damage on
This commit is contained in:
parent
232dbca783
commit
101285d04d
1 changed files with 7 additions and 2 deletions
|
@ -336,8 +336,13 @@ local eat_chorus_fruit = function(itemstack, player, pointed_thing)
|
|||
return minetest.registered_nodes[node_under.name].on_rightclick(pointed_thing.under, node_under, placer, itemstack) or itemstack
|
||||
end
|
||||
end
|
||||
local count = itemstack:get_count()
|
||||
local new_itemstack = minetest.do_item_eat(0, nil, itemstack, player, pointed_thing)
|
||||
local new_count = new_itemstack:get_count()
|
||||
if count ~= new_count or new_itemstack:get_name() ~= "mcl_end:chorus_fruit" then
|
||||
random_teleport(player)
|
||||
return minetest.do_item_eat(0, nil, itemstack, player, pointed_thing)
|
||||
end
|
||||
return new_itemstack
|
||||
end
|
||||
|
||||
minetest.register_craftitem("mcl_end:chorus_fruit", {
|
||||
|
|
Loading…
Reference in a new issue