diff --git a/mapgen.lua b/mapgen.lua index eef8461..9b0e9b0 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -110,6 +110,7 @@ nether.register_portal("nether_portal", { return existing_portal_location, existing_portal_orientation else destination_pos.y = nether.find_surface_target_y(destination_pos.x, destination_pos.z, "nether_portal", player_name) + if not destination_pos.y then return nil end if minetest.is_protected(destination_pos, "") then return nil end return destination_pos end