From eaf7d1460e1b0755df86b16d5cc27fdd0be093d3 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sun, 28 Jun 2015 12:59:45 +0200 Subject: [PATCH] Fixed nether's apples' crash - Updated API used to increase hunger by nether apples causing crash --- mods/nether/nether/items.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/nether/nether/items.lua b/mods/nether/nether/items.lua index 62b55847..f5113c94 100755 --- a/mods/nether/nether/items.lua +++ b/mods/nether/nether/items.lua @@ -367,7 +367,7 @@ minetest.register_node("nether:apple", { return itemstack end - local p_hunger = tonumber(hud.hunger[user:get_player_name()]) + local p_hunger = tonumber(hbhunger.hunger[user:get_player_name()]) if not p_hunger then return end @@ -375,8 +375,8 @@ minetest.register_node("nether:apple", { if p_hunger > 30 then p_hunger = 30 end - hud.hunger[user:get_player_name()] = p_hunger - hud.set_hunger(user) + hbhunger.hunger[user:get_player_name()] = p_hunger + hbhunger.set_hunger(user) local amount = math.random(4, 6) inv:add_item("main", {name="nether:blood_extracted", count=math.floor(amount/3)})