From 0d7e957694320598b206b2bd8788a6b13e8eff89 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 5 Dec 2020 01:56:19 +0100 Subject: [PATCH] Fix player eating item when pointing a mob --- mods/PLAYER/mcl_hunger/hunger.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/PLAYER/mcl_hunger/hunger.lua b/mods/PLAYER/mcl_hunger/hunger.lua index 42fa219f8d..5a1e34ee39 100644 --- a/mods/PLAYER/mcl_hunger/hunger.lua +++ b/mods/PLAYER/mcl_hunger/hunger.lua @@ -18,6 +18,10 @@ minetest.do_item_eat = function(hp_change, replace_with_item, itemstack, user, p end end end + -- Also don't eat when pointing object (it could be an animal) + if pointed_thing.type == "object" then + return itemstack + end local old_itemstack = itemstack