From 70785f7afa63a1fe682f6e9f3d03b72ecc24b803 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Mon, 3 May 2021 21:53:00 -0400 Subject: IntelliJ's Code Clean Up --- .../syeyoung/dungeonsguide/dungeon/actions/ActionMove.java | 2 +- .../dungeon/actions/ActionMoveNearestAir.java | 2 +- .../dungeonsguide/dungeon/actions/tree/ActionRoute.java | 14 ++++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions') 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 2a7ebd38..f8071fd5 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java @@ -47,7 +47,7 @@ public class ActionMove extends AbstractAction { 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("Destination", pos.getX() + 0.5f, 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 (FeatureRegistry.SECRET_TOGGLE_KEY.isEnabled() && Keybinds.togglePathfindStatus) return; 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 3a49005d..a149e129 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java @@ -46,7 +46,7 @@ public class ActionMoveNearestAir extends AbstractAction { 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("Destination", pos.getX() + 0.5f, 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 (FeatureRegistry.SECRET_TOGGLE_KEY.isEnabled() && Keybinds.togglePathfindStatus) return; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/tree/ActionRoute.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/tree/ActionRoute.java index d5c99c8a..ce4ba4df 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/tree/ActionRoute.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/tree/ActionRoute.java @@ -13,16 +13,16 @@ import java.util.List; public class ActionRoute { @Getter - private String mechanic; + private final String mechanic; @Getter - private String state; + private final String state; @Getter private int current; @Getter - private List actions; + private final List actions; - private DungeonRoom dungeonRoom; + private final DungeonRoom dungeonRoom; public ActionRoute(DungeonRoom dungeonRoom, String mechanic, String state) { this.mechanic = mechanic; @@ -62,10 +62,12 @@ public class ActionRoute { } public void onRenderWorld(float partialTicks) { getCurrentAction().onRenderWorld(dungeonRoom, partialTicks); - }; + } + public void onRenderScreen(float partialTicks) { getCurrentAction().onRenderScreen(dungeonRoom, partialTicks); - }; + } + public void onTick() { Action current = getCurrentAction(); -- cgit