From d9b6bae320b33a60d9fac462befd3af6116f1349 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 5 Feb 2019 21:14:28 +0100 Subject: [PATCH] =?UTF-8?q?mcl=5Fhunger:=20core.*=20=E2=86=92=20minetest.*?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mods/PLAYER/mcl_hunger/hunger.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/PLAYER/mcl_hunger/hunger.lua b/mods/PLAYER/mcl_hunger/hunger.lua index 875d1be33..508b8b9fc 100644 --- a/mods/PLAYER/mcl_hunger/hunger.lua +++ b/mods/PLAYER/mcl_hunger/hunger.lua @@ -1,6 +1,6 @@ -- wrapper for minetest.item_eat (this way we make sure other mods can't break this one) -local org_eat = core.do_item_eat -core.do_item_eat = function(hp_change, replace_with_item, itemstack, user, pointed_thing) +local org_eat = minetest.do_item_eat +minetest.do_item_eat = function(hp_change, replace_with_item, itemstack, user, pointed_thing) -- Call on_rightclick if the pointed node defines it if pointed_thing.type == "node" then local node = minetest.get_node(pointed_thing.under) @@ -28,7 +28,7 @@ core.do_item_eat = function(hp_change, replace_with_item, itemstack, user, point -- Don't allow eating when player has full hunger bar (some exceptional items apply) if can_eat_when_full or (mcl_hunger.get_hunger(user) < 20) then itemstack = mcl_hunger.eat(hp_change, replace_with_item, itemstack, user, pointed_thing) - for _, callback in pairs(core.registered_on_item_eats) do + for _, callback in pairs(minetest.registered_on_item_eats) do local result = callback(hp_change, replace_with_item, itemstack, user, pointed_thing, old_itemstack) if result then return result @@ -63,7 +63,7 @@ function mcl_hunger.eat(hp_change, replace_with_item, itemstack, user, pointed_t def = {} if type(hp_change) ~= "number" then hp_change = 1 - core.log("error", "Wrong on_use() definition for item '" .. item .. "'") + minetest.log("error", "Wrong on_use() definition for item '" .. item .. "'") end def.saturation = hp_change def.replace = replace_with_item