From 93c86207d9f336cf0459435565baae126fae845e Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 6 Feb 2019 20:04:45 +0100 Subject: [PATCH] Fix crash when using milk if damage is disabled --- mods/ITEMS/mcl_mobitems/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_mobitems/init.lua b/mods/ITEMS/mcl_mobitems/init.lua index 29259d5d..c070c8a8 100644 --- a/mods/ITEMS/mcl_mobitems/init.lua +++ b/mods/ITEMS/mcl_mobitems/init.lua @@ -135,7 +135,7 @@ minetest.register_craftitem("mcl_mobitems:cooked_rabbit", { local drink_milk = function(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) - if (bucket:get_name() ~= "mcl_mobitems:milk_bucket" and mcl_hunger.active) or minetest.settings:get_bool("creative_mode") == true then + if mcl_hunger.active and (bucket:get_name() ~= "mcl_mobitems:milk_bucket" or minetest.settings:get_bool("creative_mode") == true) then mcl_hunger.stop_poison(player) end return bucket