diff --git a/mods/nether/nether/items.lua b/mods/nether/nether/items.lua index 7125f77a..42da5aaf 100644 --- a/mods/nether/nether/items.lua +++ b/mods/nether/nether/items.lua @@ -366,6 +366,14 @@ minetest.register_node("nether:apple", { if nether_port(user, vector.round(user:getpos())) then 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) diff --git a/mods/nether/nether/portal.lua b/mods/nether/nether/portal.lua index c6dc8c25..cbf85ff4 100644 --- a/mods/nether/nether/portal.lua +++ b/mods/nether/nether/portal.lua @@ -534,7 +534,13 @@ function nether_port(player, pos) minetest.sound_play("nether_teleporter", {pos=pos}) if pos.y < nether.start then player_from_nether(player) - player:moveto({x=pos.x, y=100, z=pos.z}) + local pos_togo = {x = 0, y = 35, z = -7} + if minetest.setting_getbool("static_spawnpoint") ~= nil then + local stsp_conf = minetest.setting_get("static_spawnpoint") + pos_togo = {x = stsp_conf:split(",")[1],y = stsp_conf:split(",")[2],z = stsp_conf:split(",")[3]} + end + table.foreach(pos_togo,print) + player:moveto(pos_togo) else player:moveto({x=pos.x, y=portal_target+math.random(4), z=pos.z}) player_to_nether(player, true)