From 6c4b33b99cc00c233a29768aa6c00027c07cb991 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 31 Aug 2024 12:49:59 -0500 Subject: [PATCH] Update mcl_util.get_double_container_neighbor_pos() to use vector.offset --- mods/CORE/mcl_util/nodes.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mods/CORE/mcl_util/nodes.lua b/mods/CORE/mcl_util/nodes.lua index 88b471d22..7d991fc91 100644 --- a/mods/CORE/mcl_util/nodes.lua +++ b/mods/CORE/mcl_util/nodes.lua @@ -110,23 +110,23 @@ end function mcl_util.get_double_container_neighbor_pos(pos, param2, side) if side == "right" then if param2 == 0 then - return {x = pos.x - 1, y = pos.y, z = pos.z} + return vector.offset(pos, -1, 0, 0) elseif param2 == 1 then - return {x = pos.x, y = pos.y, z = pos.z + 1} + return vector.offset(pos, 0, 0, 1) elseif param2 == 2 then - return {x = pos.x + 1, y = pos.y, z = pos.z} + return vector.offset(pos, 1, 0, 0) elseif param2 == 3 then - return {x = pos.x, y = pos.y, z = pos.z - 1} + return vector.offset(pos, 0, 0, -1) end else if param2 == 0 then - return {x = pos.x + 1, y = pos.y, z = pos.z} + return vector.offset(pos, 1, 0, 0) elseif param2 == 1 then - return {x = pos.x, y = pos.y, z = pos.z - 1} + return vector.offset(pos, 0, 0, -1) elseif param2 == 2 then - return {x = pos.x - 1, y = pos.y, z = pos.z} + return vector.offset(pos, -1, 0, 0) elseif param2 == 3 then - return {x = pos.x, y = pos.y, z = pos.z + 1} + return vector.offset(pos, 0, 0, 1) end end end