From a4c2cd3187a17a859f3a5ecc24afc7b2383b4015 Mon Sep 17 00:00:00 2001 From: sys4 Date: Sun, 17 Jul 2022 18:25:34 +0200 Subject: [PATCH] Fix portal detection and coords with Minetest 5.5.x --- portal.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/portal.lua b/portal.lua index 36d5cb0..7eaa668 100644 --- a/portal.lua +++ b/portal.lua @@ -264,6 +264,8 @@ end local function is_hellportal(pos) local x, y, z = pos.x, pos.y, pos.z + if y < 0 then y = y+1 end + for _,i in pairs({-1, 3}) do if minetest.get_node({x=x, y=y+i, z=z}).name ~= "hell:white" then return @@ -364,7 +366,7 @@ local function hell_port(player, pos) else y = my or portal_target+math.random(4) end - destination_pos.y = y - 0.3 + destination_pos.y = y + 0.7 player_to_hell(player, destination_pos) end