aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-02-10 23:32:31 +0900
committersyeyoung <cyong06@naver.com>2021-02-10 23:32:31 +0900
commit99e56760ebfc089e6d910a09eb1dfcbfdf140175 (patch)
treea82a3b9efcaa8bb3fbff2d4cd2b88c9ea0064015 /src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java
parented9a5d483335a4d71160a1ff54ad783f971dc016 (diff)
downloadSkyblock-Dungeons-Guide-99e56760ebfc089e6d910a09eb1dfcbfdf140175.tar.gz
Skyblock-Dungeons-Guide-99e56760ebfc089e6d910a09eb1dfcbfdf140175.tar.bz2
Skyblock-Dungeons-Guide-99e56760ebfc089e6d910a09eb1dfcbfdf140175.zip
better rendering
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java
index fda4cd92..92c2fe69 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java
@@ -5,6 +5,8 @@ import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
import kr.syeyoung.dungeonsguide.utils.RenderUtils;
import lombok.Data;
import net.minecraft.client.Minecraft;
+import net.minecraft.util.BlockPos;
+import net.minecraft.util.MathHelper;
import java.awt.*;
import java.util.HashSet;
@@ -30,7 +32,9 @@ public class ActionMoveNearestAir extends AbstractAction {
}
@Override
public void onRenderWorld(DungeonRoom dungeonRoom, float partialTicks) {
- RenderUtils.highlightBlock(target.getBlockPos(dungeonRoom), new Color(0, 255,255,50),partialTicks, false);
+ BlockPos pos = target.getBlockPos(dungeonRoom);
+ RenderUtils.drawTextAtWorld("Destination", pos.getX() + 0.5f, pos.getY() + 0.6f, pos.getZ() + 0.5f, 0xFF00FF00, 1f, true, false, partialTicks);
+ RenderUtils.drawTextAtWorld(String.format("%.2f", MathHelper.sqrt_double(pos.distanceSq(Minecraft.getMinecraft().thePlayer.getPosition())))+"m", pos.getX() + 0.5f, pos.getY() + 0.3f, pos.getZ() + 0.5f, 0xFFFFFF00, 1f, true, false, partialTicks);
}
@Override