diff options
author | syeyoung <cyong06@naver.com> | 2021-02-13 21:38:22 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-02-13 21:38:22 +0900 |
commit | 3bbe67ecd993bac9e32e7f303ce84b2fa5c7cda4 (patch) | |
tree | 8505eb72ebb6ea5b8238ab7174e56123871c6b87 /src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon | |
parent | acbdeb579e4c64d96b9274996e2a21659385fcfe (diff) | |
download | Skyblock-Dungeons-Guide-3bbe67ecd993bac9e32e7f303ce84b2fa5c7cda4.tar.gz Skyblock-Dungeons-Guide-3bbe67ecd993bac9e32e7f303ce84b2fa5c7cda4.tar.bz2 Skyblock-Dungeons-Guide-3bbe67ecd993bac9e32e7f303ce84b2fa5c7cda4.zip |
I commit
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureInstaCloseChest.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureInstaCloseChest.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureInstaCloseChest.java index 175da78a..d6a6d7c4 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureInstaCloseChest.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureInstaCloseChest.java @@ -46,7 +46,7 @@ public class FeatureInstaCloseChest extends SimpleFeature implements GuiOpenList check = true; } - public static int getPrice(ItemStack itemStack) { + public static long getPrice(ItemStack itemStack) { if (itemStack == null) return 0; NBTTagCompound compound = itemStack.getTagCompound(); if (compound == null) @@ -61,14 +61,14 @@ public class FeatureInstaCloseChest extends SimpleFeature implements GuiOpenList public int compare(String o1, String o2) { String id2 = id + "::" + o1 + "-" + enchants.getInteger(o1); AhUtils.AuctionData auctionData = AhUtils.auctions.get(id2); - int price1 = (auctionData == null) ? 0 : auctionData.lowestBin; + long price1 = (auctionData == null) ? 0 : auctionData.lowestBin; String id3 = id + "::" + o2 + "-" + enchants.getInteger(o2); AhUtils.AuctionData auctionData2 = AhUtils.auctions.get(id3); - int price2 = (auctionData2 == null) ? 0 : auctionData2.lowestBin; + long price2 = (auctionData2 == null) ? 0 : auctionData2.lowestBin; return (compare2(price1, price2) == 0) ? o1.compareTo(o2) : compare2(price1, price2); } - public int compare2(int y, int x) { + public int compare2(long y, long x) { return (x < y) ? -1 : ((x == y) ? 0 : 1); } }); @@ -88,7 +88,7 @@ public class FeatureInstaCloseChest extends SimpleFeature implements GuiOpenList if (auctionData.sellPrice == -1 && auctionData.lowestBin != -1) return auctionData.lowestBin; else if (auctionData.sellPrice != -1 && auctionData.lowestBin == -1) return auctionData.sellPrice; else { - int ahPrice = auctionData.lowestBin; + long ahPrice = auctionData.lowestBin; if (ahPrice > auctionData.sellPrice) return ahPrice; else return auctionData.sellPrice; } |