aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/dungeon
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-02-12 15:14:12 +0900
committersyeyoung <cyong06@naver.com>2021-02-12 15:14:12 +0900
commitb808e27a2cc2c6c8fdf93e5de6ddf05053c3addb (patch)
tree1336677c7e35bf63ba1b6ebeb1eafa8b7aadda37 /src/main/java/kr/syeyoung/dungeonsguide/dungeon
parent92c8d9cec9fcc3a53ad95ff0212d77bf87becab7 (diff)
downloadSkyblock-Dungeons-Guide-b808e27a2cc2c6c8fdf93e5de6ddf05053c3addb.tar.gz
Skyblock-Dungeons-Guide-b808e27a2cc2c6c8fdf93e5de6ddf05053c3addb.tar.bz2
Skyblock-Dungeons-Guide-b808e27a2cc2c6c8fdf93e5de6ddf05053c3addb.zip
works pretty great
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java
index e521a4c9..e2d6b318 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java
@@ -38,8 +38,15 @@ public class ActionMove extends AbstractAction {
@Override
public void onRenderWorld(DungeonRoom dungeonRoom, float partialTicks) {
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);
+
+ float distance = MathHelper.sqrt_double(pos.distanceSq(Minecraft.getMinecraft().thePlayer.getPosition()));
+ float multiplier = distance / 120f; //mobs only render ~120 blocks away
+ float scale = 0.45f * multiplier;
+ scale *= 25.0 / 6.0;
+ RenderUtils.drawTextAtWorld("Destination", pos.getX() + 0.5f, (float) (pos.getY() + 0.5f + scale), 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.5f - scale, pos.getZ() + 0.5f, 0xFFFFFF00, 1f, true, false, partialTicks);
+
+
if (latest != null){
List<BlockPos> poses = new ArrayList<BlockPos>();
for (int i = 0; i < latest.getCurrentPathLength(); i++) {