diff --git a/mods/ITEMS/mcl_end/chorus_plant.lua b/mods/ITEMS/mcl_end/chorus_plant.lua index 3b27dd5a5..882971f19 100644 --- a/mods/ITEMS/mcl_end/chorus_plant.lua +++ b/mods/ITEMS/mcl_end/chorus_plant.lua @@ -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 - random_teleport(player) - return minetest.do_item_eat(0, nil, itemstack, player, pointed_thing) + 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) + end + return new_itemstack end minetest.register_craftitem("mcl_end:chorus_fruit", {