From 52adb555cb0174fe174eeb1886938f2cbb15a3bd Mon Sep 17 00:00:00 2001 From: HybridDog Date: Sun, 31 Jan 2016 12:17:38 +0100 Subject: [PATCH] :cat2: --- init.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/init.lua b/init.lua index aeb2172..54c7275 100644 --- a/init.lua +++ b/init.lua @@ -696,6 +696,25 @@ function funcs.unpack(pos) return pos.z, pos.y, pos.x end +function funcs.get_max_coords(pos) + if pos.x < pos.y then + if pos.y < pos.z then + return "z", "y", "x" + end + if pos.x < pos.z then + return "y", "z", "x" + end + return "y", "x", "z" + end + if pos.x < pos.z then + return "z", "x", "y" + end + if pos.y < pos.z then + return "x", "z", "y" + end + return "x", "y", "z" +end + dofile(minetest.get_modpath("vector_extras").."/vector_meta.lua")