From 781e9ce4bf92ffafb1735dde334f3160d8d65a63 Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Thu, 25 Apr 2024 22:52:29 -0400 Subject: Fix Croesus profit For some reason it checked the item's name previously by turning the NBT to a string and running .contains bruh then I ported it to lore thinking it'd be same as the actual croesus helper --- .../java/de/hysky/skyblocker/skyblock/dungeon/CroesusProfit.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/CroesusProfit.java b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/CroesusProfit.java index 263bc383..c6cbe2ce 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/CroesusProfit.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/CroesusProfit.java @@ -7,7 +7,6 @@ import de.hysky.skyblocker.utils.ItemUtils; import de.hysky.skyblocker.utils.render.gui.ColorHighlight; import de.hysky.skyblocker.utils.render.gui.ContainerSolver; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; -import net.minecraft.component.DataComponentTypes; import net.minecraft.item.ItemStack; import net.minecraft.text.Text; import net.minecraft.util.Util; @@ -41,7 +40,7 @@ public class CroesusProfit extends ContainerSolver { for (Int2ObjectMap.Entry entry : slots.int2ObjectEntrySet()) { ItemStack stack = entry.getValue(); - if (stack != null && stack.contains(DataComponentTypes.LORE) && ItemUtils.getLoreLineIf(stack, s -> s.contains("Chest")) != null) { + if (stack.getName().getString().contains("Chest")) { long value = valueChest(stack); if (value > bestValue) { secondBestChest = bestChest; @@ -57,7 +56,7 @@ public class CroesusProfit extends ContainerSolver { for (Int2ObjectMap.Entry entry : slots.int2ObjectEntrySet()) { ItemStack stack = entry.getValue(); - if (stack != null && stack.contains(DataComponentTypes.LORE)) { + if (stack != null) { if (stack.equals(bestChest)) { highlights.add(ColorHighlight.green(entry.getIntKey())); } else if (stack.equals(secondBestChest) && secondBestValue > dungeonKeyPriceData) { -- cgit