diff options
author | Thomas Rudin <thomas@rudin.io> | 2018-12-07 10:21:00 +0100 |
---|---|---|
committer | orwell96 <mono96.mml@gmail.com> | 2018-12-10 17:16:23 +0100 |
commit | 8024f43e35ea169f1439decadd2c16bc51386a34 (patch) | |
tree | bbbda706da8dc83588bfb4b9822dd54610de6c99 | |
parent | e7488abf583faee0cd458ef2b3e6a89a101a8acf (diff) | |
download | poshud-8024f43e35ea169f1439decadd2c16bc51386a34.tar.gz poshud-8024f43e35ea169f1439decadd2c16bc51386a34.tar.bz2 poshud-8024f43e35ea169f1439decadd2c16bc51386a34.zip |
show mapblock coordinates
-rw-r--r-- | init.lua | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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); |