From 8024f43e35ea169f1439decadd2c16bc51386a34 Mon Sep 17 00:00:00 2001 From: Thomas Rudin Date: Fri, 7 Dec 2018 10:21:00 +0100 Subject: show mapblock coordinates --- init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 6d64c7c..87f056b 100644 --- a/init.lua +++ b/init.lua @@ -172,6 +172,10 @@ minetest.register_globalstep(function (dtime) for _,player in ipairs(minetest.get_connected_players()) do local posi = player:get_pos() local posistr = math.floor(posi.x+0.5).." "..math.floor(posi.y+0.5).." "..math.floor(posi.z+0.5) - updatehud(player, h_text.."\nPos: "..posistr) + local mapblockstr = math.floor(posi.x / 16) .. " " + .. math.floor(posi.y / 16) .. " " + .. math.floor(posi.z / 16) + + updatehud(player, h_text .. "\nPos: " .. posistr .. "\nMapblock: " .. mapblockstr) end end); -- cgit v1.2.3