aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-22 12:45:54 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-22 12:45:54 +0100
commitc2cfade4ae1cb1b0936b46ee31aaf8a4086b94de (patch)
tree8feb11be7983b408060868d96044853c8941c622 /src/main/java/at
parent5b2fc249ba528fba1d2ea82c7a4c61ef82431d5f (diff)
downloadskyhanni-c2cfade4ae1cb1b0936b46ee31aaf8a4086b94de.tar.gz
skyhanni-c2cfade4ae1cb1b0936b46ee31aaf8a4086b94de.tar.bz2
skyhanni-c2cfade4ae1cb1b0936b46ee31aaf8a4086b94de.zip
Small optimizes.
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Misc.java2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt5
4 files changed, 6 insertions, 5 deletions
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 2667337af..12df4bca4 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
@@ -141,7 +141,7 @@ public class Misc {
@ConfigOption(name = "Reputation Locations", desc = "Show locations to the points where to do stuff in the Crimson Isle to get reputation.")
@ConfigEditorBoolean
@ConfigAccordionId(id = 6)
- public boolean crimsonIsleReputationLocation = true;
+ public boolean crimsonIsleReputationLocation = false;
@Expose
@ConfigOption(name = "Exp Bottles", desc = "Hides all the experience bottles lying on the ground.")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt
index 146a11e3b..aab1db9ad 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt
@@ -80,7 +80,8 @@ class HideArmor {
if (slot !in 5..8) continue
val armorSlot = (slot - 5) * -1 + 3
- val armor = getCachedArmor(Minecraft.getMinecraft().thePlayer.entityId)
+ val entityId = Minecraft.getMinecraft()?.thePlayer?.entityId ?: return
+ val armor = getCachedArmor(entityId)
armor[armorSlot] = itemStack
val currentScreen = Minecraft.getMinecraft().currentScreen
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt
index 6cce8c68c..17b30087f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt
@@ -73,7 +73,6 @@ class DailyMiniBossHelper(private val reputationHelper: CrimsonIsleReputationHel
}
private fun finished(miniBoss: CrimsonMiniBoss) {
- LorenzUtils.debug("Detected mini boss death: ${miniBoss.displayName}")
reputationHelper.questHelper.finishMiniBoss(miniBoss)
miniBoss.doneToday = true
reputationHelper.update()
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
index 3796df912..830e58ce5 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -631,7 +631,8 @@ object RenderUtils {
text: String,
scaleMultiplier: Double,
yOff: Float = 0f,
- hideTooCloseAt: Double = 4.5
+ hideTooCloseAt: Double = 4.5,
+ smallestDistanceVew: Double = 5.0
) {
val thePlayer = Minecraft.getMinecraft().thePlayer
val x = location.x
@@ -648,7 +649,7 @@ object RenderUtils {
(x - renderOffsetX) * (x - renderOffsetX) + (y - (renderOffsetY + eyeHeight)) * (y - (renderOffsetY + eyeHeight)) + (z - renderOffsetZ) * (z - renderOffsetZ)
var distToPlayer = sqrt(distToPlayerSq)
//TODO this is optional maybe?
- distToPlayer = distToPlayer.coerceAtLeast(8.0)
+ distToPlayer = distToPlayer.coerceAtLeast(smallestDistanceVew)
if (distToPlayer < hideTooCloseAt) return