diff options
author | nea <nea@nea.moe> | 2023-07-11 21:01:58 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-07-11 21:01:58 +0200 |
commit | 4d93f475aadc42c4bf83c3a0749af41659235c71 (patch) | |
tree | c8e01710defe66e06c50fa962c72fdac66a35a1f /src/main/kotlin/moe/nea/firmament/util/render | |
parent | 4444fcca44d9a53c8162d69e0e9f19fd214c2f54 (diff) | |
download | Firmament-4d93f475aadc42c4bf83c3a0749af41659235c71.tar.gz Firmament-4d93f475aadc42c4bf83c3a0749af41659235c71.tar.bz2 Firmament-4d93f475aadc42c4bf83c3a0749af41659235c71.zip |
Bulk commit
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/render')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/util/render/RenderInWorldContext.kt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/render/RenderInWorldContext.kt b/src/main/kotlin/moe/nea/firmament/util/render/RenderInWorldContext.kt index 1603b6b..1d51f13 100644 --- a/src/main/kotlin/moe/nea/firmament/util/render/RenderInWorldContext.kt +++ b/src/main/kotlin/moe/nea/firmament/util/render/RenderInWorldContext.kt @@ -76,6 +76,10 @@ class RenderInWorldContext private constructor( } } + fun waypoint(position: BlockPos, label: Text) { + text(position.toCenterPos(), label, Text.literal("§e${MC.player?.pos?.distanceTo(position.toCenterPos())}m")) + } + fun text(position: Vec3d, vararg texts: Text, verticalAlign: VerticalAlign = VerticalAlign.CENTER) { assertTrueOr(texts.isNotEmpty()) { return@text } matrixStack.push() |