aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-09-04 20:21:02 +0200
committerLorenz <lo.scherf@gmail.com>2022-09-04 20:21:02 +0200
commit899326f099476880187204c3ea17e02af641766c (patch)
tree88218720f5726d7d9bf4d726dff1be50aa844f00 /src
parentd5d57c4cd6b48417ddb9517faf66f88d65ffbb14 (diff)
downloadskyhanni-899326f099476880187204c3ea17e02af641766c.tar.gz
skyhanni-899326f099476880187204c3ea17e02af641766c.tar.bz2
skyhanni-899326f099476880187204c3ea17e02af641766c.zip
fixing Hiding the nametag of mobs close to minions not working when minion nearby was never collected
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/ExpBottleOnGroundHider.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt14
4 files changed, 12 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java b/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java
index ec3076a16..8f8d6e5e3 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java
@@ -47,7 +47,7 @@ public class Inventory {
"\u00a7bCrimson Armor",
}
)
- public List<Integer> itemNumberAsStackSize = new ArrayList<>();
+ public List<Integer> itemNumberAsStackSize = new ArrayList<>(3);
@Expose
@ConfigOption(name = "Sack Name", desc = "Show an abbreviation of the Sack name.")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/ExpBottleOnGroundHider.kt b/src/main/java/at/hannibal2/skyhanni/features/ExpBottleOnGroundHider.kt
index c9e2b4bf4..1a1a0f6c7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/ExpBottleOnGroundHider.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/ExpBottleOnGroundHider.kt
@@ -7,6 +7,7 @@ import net.minecraft.entity.item.EntityXPOrb
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class ExpBottleOnGroundHider {
+
@SubscribeEvent
fun onCheckRender(event: CheckRenderEntityEvent<*>) {
if (!LorenzUtils.inSkyblock) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
index 6867e2171..bdaebc3f7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
@@ -122,7 +122,6 @@ class DungeonCleanEnd {
fun onReceivePacket(event: PacketEvent.ReceiveEvent) {
if (!shouldBlock()) return
-
if (event.packet is S2APacketParticles) {
event.isCanceled = true
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
index 455349a35..87fc2eb49 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
@@ -73,12 +73,14 @@ class MinionFeatures {
if (loc != null) {
val time = SkyHanniMod.feature.minions.lastOpenedMinionTime * 1_000
if (lastMinionOpened + time > System.currentTimeMillis()) {
- event.drawWaypointFilled(loc.add(-0.5, 0.0, -0.5),
+ event.drawWaypointFilled(
+ loc.add(-0.5, 0.0, -0.5),
color,
true,
extraSize = -0.25,
extraSizeTopY = 0.2,
- extraSizeBottomY = 0.0)
+ extraSizeBottomY = 0.0
+ )
}
}
}
@@ -106,6 +108,9 @@ class MinionFeatures {
minions[location] = System.currentTimeMillis()
saveConfig()
}
+ if (location !in minions) {
+ minions[location] = 0
+ }
if (System.currentTimeMillis() - lastMinionPickedUp < 2_000) {
minions.remove(location)
@@ -139,7 +144,6 @@ class MinionFeatures {
}
val duration = System.currentTimeMillis() - lastClicked
-// println("line: '$line'")
//§7Held Coins: §b151,389
val coins = line.split(": §b")[1].replace(",", "").toDouble()
@@ -198,7 +202,9 @@ class MinionFeatures {
for (minion in minions) {
val location = minion.key
if (playerLocation.distance(location) < SkyHanniMod.feature.minions.emptiedTimeDistance) {
- val duration = System.currentTimeMillis() - minion.value
+ val lastEmptied = minion.value
+ if (lastEmptied == 0L) continue
+ val duration = System.currentTimeMillis() - lastEmptied
val format = StringUtils.formatDuration(duration / 1000)
if (LocationUtils.canSee(playerEyeLocation, location)) {
val text = "§eHopper Emptied: $format"