aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/EntityData.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt32
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt12
5 files changed, 24 insertions, 32 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt b/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt
index c76bcadab..b26312b51 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt
@@ -68,10 +68,8 @@ class EntityData {
val health = (any as Float).toInt()
- if (entity is EntityWither) {
- if (health == 300) {
- if (entityId < 0) return
- }
+ if (entity is EntityWither && health == 300 && entityId < 0) {
+ return
}
if (entity is EntityLivingBase) {
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt
index 82b94189c..ad32abc15 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt
@@ -35,8 +35,8 @@ class GuiEditManager {
if (NEUItems.neuHasFocus()) return
val screen = Minecraft.getMinecraft().currentScreen
- if (screen is GuiEditSign) {
- if (!screen.isRancherSign()) return
+ if (screen is GuiEditSign && !screen.isRancherSign()) {
+ return
}
if (isInGui()) return
diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
index 9bb35c602..012a76f1c 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
@@ -78,24 +78,22 @@ class HypixelData {
@SubscribeEvent
fun onTick(event: LorenzTickEvent) {
- if (event.isMod(2)) {
- if (LorenzUtils.inSkyBlock) {
- val originalLocation = ScoreboardData.sidebarLinesFormatted
- .firstOrNull { it.startsWith(" §7⏣ ") || it.startsWith(" §5ф ") }
- ?.substring(5)?.removeColor()
- ?: "?"
-
- skyBlockArea = when {
- skyBlockIsland == IslandType.THE_RIFT && westVillageFarmArea.isPlayerInside() -> "Dreadfarm"
- skyBlockIsland == IslandType.THE_PARK && howlingCaveArea.isPlayerInside() -> "Howling Cave"
- skyBlockIsland == IslandType.THE_END && fakeZealotBruiserHideoutArea.isPlayerInside() -> "The End"
- skyBlockIsland == IslandType.THE_END && realZealotBruiserHideoutArea.isPlayerInside() -> "Zealot Bruiser Hideout"
-
- else -> originalLocation
- }
-
- checkProfileName()
+ if (event.isMod(2) && LorenzUtils.inSkyBlock) {
+ val originalLocation = ScoreboardData.sidebarLinesFormatted
+ .firstOrNull { it.startsWith(" §7⏣ ") || it.startsWith(" §5ф ") }
+ ?.substring(5)?.removeColor()
+ ?: "?"
+
+ skyBlockArea = when {
+ skyBlockIsland == IslandType.THE_RIFT && westVillageFarmArea.isPlayerInside() -> "Dreadfarm"
+ skyBlockIsland == IslandType.THE_PARK && howlingCaveArea.isPlayerInside() -> "Howling Cave"
+ skyBlockIsland == IslandType.THE_END && fakeZealotBruiserHideoutArea.isPlayerInside() -> "The End"
+ skyBlockIsland == IslandType.THE_END && realZealotBruiserHideoutArea.isPlayerInside() -> "Zealot Bruiser Hideout"
+
+ else -> originalLocation
}
+
+ checkProfileName()
}
if (!event.isMod(5)) return
diff --git a/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt b/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt
index 53815366e..1b6acd634 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt
@@ -14,7 +14,6 @@ class RenderGuiData {
@SubscribeEvent
fun onRenderOverlay(event: RenderGameOverlayEvent.Pre) {
-// if (!ProfileStorage.loaded) return
if (event.type != RenderGameOverlayEvent.ElementType.HOTBAR) return
if (GuiEditManager.isInGui() || FFGuideGUI.isInGui()) return
@@ -23,7 +22,6 @@ class RenderGuiData {
@SubscribeEvent
fun onBackgroundDraw(event: GuiScreenEvent.BackgroundDrawnEvent) {
-// if (!ProfileStorage.loaded) return
if (GuiEditManager.isInGui() || FFGuideGUI.isInGui()) return
val currentScreen = Minecraft.getMinecraft().currentScreen ?: return
if (currentScreen !is GuiInventory && currentScreen !is GuiChest) return
diff --git a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt
index d6302fa6e..21102c934 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt
@@ -62,14 +62,12 @@ class RepoManager(private val configLocation: File) {
e.printStackTrace()
}
if (latestRepoCommit == null || latestRepoCommit!!.isEmpty()) return@supplyAsync false
- if (File(configLocation, "repo").exists()) {
- if (currentCommitJSON != null && currentCommitJSON["sha"].asString == latestRepoCommit) {
- if (command) {
- LorenzUtils.chat("§e[SkyHanni] §7The repo is already up to date!")
- atomicShouldManuallyReload.set(false)
- }
- return@supplyAsync false
+ if (File(configLocation, "repo").exists() && currentCommitJSON != null && currentCommitJSON["sha"].asString == latestRepoCommit) {
+ if (command) {
+ LorenzUtils.chat("§e[SkyHanni] §7The repo is already up to date!")
+ atomicShouldManuallyReload.set(false)
}
+ return@supplyAsync false
}
RepoUtils.recursiveDelete(repoLocation)
repoLocation.mkdirs()