From f1969e6e75c99066173ac613d5e9004d04205889 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sat, 11 Feb 2023 19:19:00 +0900 Subject: - update secret status in mechanic browser Signed-off-by: syeyoung --- .../mod/features/impl/secret/mechanicbrowser/WidgetSecret.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mod/src/main') diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/WidgetSecret.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/WidgetSecret.java index 0642da1b..a73ee4c0 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/WidgetSecret.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/WidgetSecret.java @@ -54,6 +54,15 @@ public class WidgetSecret extends AnnotatedWidget { this.onSelect = selectedId; } + @Override + public void onMount() { + super.onMount(); + secretName.setValue(id+" ยง7("+ mechanic.getCurrentState(room) +", "+ + (mechanic.getRepresentingPoint(room) != null ? + String.format("%.1f", MathHelper.sqrt_double(mechanic.getRepresentingPoint(room).getBlockPos(room).distanceSq(Minecraft.getMinecraft().thePlayer.getPosition()))) : "") + +"m)"); + } + private AbsLocationPopup popup; @On(functionName = "toggleStates") public void openStates() { -- cgit