mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-06-28 06:11:47 +02:00
Updated hud/hunger while saving our modifications
- Splitted hud into two mods : hud and hunger
This commit is contained in:
@ -367,13 +367,6 @@ minetest.register_node("nether:apple", {
|
||||
return itemstack
|
||||
end
|
||||
|
||||
local p_hunger = tonumber(hud.hunger[user:get_player_name()])
|
||||
if not p_hunger then return end
|
||||
p_hunger = p_hunger+9
|
||||
if p_hunger > 30 then p_hunger = 30 end
|
||||
hud.hunger[user:get_player_name()] = p_hunger
|
||||
hud.set_hunger(user)
|
||||
|
||||
local amount = math.random(4, 6)
|
||||
inv:add_item("main", {name="nether:blood_extracted", count=math.floor(amount/3)})
|
||||
user:set_hp(user:get_hp()-amount)
|
||||
|
Reference in New Issue
Block a user