forked from hkc/cc-stuff
wallhack: use string.format to limit number precision
This commit is contained in:
parent
f53440be79
commit
317930d80f
|
@ -80,7 +80,7 @@ return function()
|
||||||
if player.isSneaking then
|
if player.isSneaking then
|
||||||
cache[id].text.setText(entity.name .. "\n" .. textutils.serialize(entity))
|
cache[id].text.setText(entity.name .. "\n" .. textutils.serialize(entity))
|
||||||
else
|
else
|
||||||
cache[id].text.setText(entity.name .. "\n{" .. entity.x .. ", " .. entity.y .. ", " .. entity.z .. "}")
|
cache[id].text.setText(("%s\n{%.2f, %.2f, %.2f}"):format(entity.name, entity.x, entity.y, entity.z))
|
||||||
end
|
end
|
||||||
if entityFront.flipped then
|
if entityFront.flipped then
|
||||||
cache[id].text.setColor(0x00FFFFFF)
|
cache[id].text.setColor(0x00FFFFFF)
|
||||||
|
|
Loading…
Reference in New Issue