aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/Features.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Misc.java10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/RealTime.kt24
4 files changed, 41 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java
index a1423db65..7784dffb3 100644
--- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java
+++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java
@@ -7,10 +7,7 @@ import at.hannibal2.skyhanni.data.HypixelData;
import at.hannibal2.skyhanni.data.ItemRenderBackground;
import at.hannibal2.skyhanni.data.ScoreboardData;
import at.hannibal2.skyhanni.data.repo.RepoManager;
-import at.hannibal2.skyhanni.features.ButtonOnPause;
-import at.hannibal2.skyhanni.features.CurrentPetDisplay;
-import at.hannibal2.skyhanni.features.ExpBottleOnGroundHider;
-import at.hannibal2.skyhanni.features.SummoningSoulsName;
+import at.hannibal2.skyhanni.features.*;
import at.hannibal2.skyhanni.features.anvil.AnvilCombineHelper;
import at.hannibal2.skyhanni.features.bazaar.BazaarApi;
import at.hannibal2.skyhanni.features.bazaar.BazaarBestSellMethod;
@@ -98,6 +95,7 @@ public class SkyHanniMod {
registerEvent(new SummoningSoulsName());
registerEvent(new AshfangGravityOrbs());
registerEvent(new CrimsonArmorTier());
+ registerEvent(new RealTime());
Commands.init();
diff --git a/src/main/java/at/hannibal2/skyhanni/config/Features.java b/src/main/java/at/hannibal2/skyhanni/config/Features.java
index 494acd36c..46ac5ab8e 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/Features.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/Features.java
@@ -61,6 +61,11 @@ public class Features {
editOverlay(activeConfigCategory, 200, 16, abilities.ashfangNextResetCooldownPos);
return;
}
+
+ if (runnableId.equals("realTime")) {
+ editOverlay(activeConfigCategory, 200, 16, misc.realTimePos);
+ return;
+ }
}
@Expose
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
index 51c97f995..50e99729c 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
@@ -37,4 +37,14 @@ public class Misc {
@ConfigOption(name = "Config Button", desc = "Add a button to the pause menu to configure SkyHanni.")
@ConfigEditorBoolean
public boolean configButtonOnPause = true;
+
+ @Expose
+ @ConfigOption(name = "Real Time", desc = "Show the real time. Useful while playing in full screen mode")
+ @ConfigEditorBoolean
+ public boolean realTime = false;
+
+ @Expose
+ @ConfigOption(name = "Ashfang Freeze Position", desc = "")
+ @ConfigEditorButton(runnableId = "realTime", buttonText = "Edit")
+ public Position realTimePos = new Position(10, 10, false, true);
} \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/features/RealTime.kt b/src/main/java/at/hannibal2/skyhanni/features/RealTime.kt
new file mode 100644
index 000000000..016e39b23
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/features/RealTime.kt
@@ -0,0 +1,24 @@
+package at.hannibal2.skyhanni.features
+
+import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.utils.GuiRender.renderString
+import at.hannibal2.skyhanni.utils.LorenzUtils
+import net.minecraftforge.client.event.RenderGameOverlayEvent
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+import java.text.SimpleDateFormat
+
+class RealTime {
+
+ private val format = SimpleDateFormat("HH:mm:ss")
+
+ @SubscribeEvent
+ fun renderOverlay(event: RenderGameOverlayEvent.Post) {
+ if (!isEnabled()) return
+
+ SkyHanniMod.feature.misc.realTimePos.renderString(format.format(System.currentTimeMillis()))
+ }
+
+ private fun isEnabled(): Boolean {
+ return LorenzUtils.inSkyblock && SkyHanniMod.feature.misc.realTime
+ }
+} \ No newline at end of file