Fix mistake in random portal placement coordinate

This commit is contained in:
Elias Åström 2023-12-28 15:33:50 +01:00 committed by cora
parent d323cc5de5
commit 9ca8e848ac

View File

@ -494,7 +494,7 @@ local function portal_emerge_area(blockpos, action, calls_remaining, param)
-- 5 attempts to find a random spot which is not protected.
for i = 1, 5 do
local pos = vector.new(target.x, math.random(minpos.y, maxpos.y), target.y)
local pos = vector.new(target.x, math.random(minpos.y, maxpos.y), target.z)
if can_place_portal(pos, player_name) then
finalize(obj, pos, param2, true)
return