aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAaron <51387595+AzureAaron@users.noreply.github.com>2024-04-25 22:52:29 -0400
committerAaron <51387595+AzureAaron@users.noreply.github.com>2024-04-26 16:23:22 -0400
commit781e9ce4bf92ffafb1735dde334f3160d8d65a63 (patch)
treef003adf49927b05d20138a2e625f5a9a399cf2e2 /src/main/java
parent12070a41687893c564e4d2c1ad9b6ed379f92cae (diff)
downloadSkyblocker-781e9ce4bf92ffafb1735dde334f3160d8d65a63.tar.gz
Skyblocker-781e9ce4bf92ffafb1735dde334f3160d8d65a63.tar.bz2
Skyblocker-781e9ce4bf92ffafb1735dde334f3160d8d65a63.zip
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
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/dungeon/CroesusProfit.java5
1 files changed, 2 insertions, 3 deletions
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<ItemStack> 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<ItemStack> 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) {