aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2')
-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"