diff options
author | vicisacat <victor.branchu@gmail.com> | 2024-03-24 17:59:31 +0100 |
---|---|---|
committer | vicisacat <victor.branchu@gmail.com> | 2024-04-12 17:19:31 +0200 |
commit | 8ed55895fc8469e22e3ae65bf450f3af794d2545 (patch) | |
tree | 2dacbb0590ac6cddc03e260f8debca34832e4709 /src/main/java/de/hysky/skyblocker/skyblock/auction/AuctionViewScreen.java | |
parent | 1afa4bfdf9c8fc4a80d252868d72001c7a34f185 (diff) | |
download | Skyblocker-8ed55895fc8469e22e3ae65bf450f3af794d2545.tar.gz Skyblocker-8ed55895fc8469e22e3ae65bf450f3af794d2545.tar.bz2 Skyblocker-8ed55895fc8469e22e3ae65bf450f3af794d2545.zip |
REFORMAT WHOLE FILE THE SEQUEL
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/skyblock/auction/AuctionViewScreen.java')
-rw-r--r-- | src/main/java/de/hysky/skyblocker/skyblock/auction/AuctionViewScreen.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/auction/AuctionViewScreen.java b/src/main/java/de/hysky/skyblocker/skyblock/auction/AuctionViewScreen.java index 82cd4a91..a365b799 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/auction/AuctionViewScreen.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/auction/AuctionViewScreen.java @@ -70,7 +70,7 @@ public class AuctionViewScreen extends AbstractCustomHypixelGUI<AuctionHouseScre infoTextWidget = new TextWidget(Text.literal("Can't Afford"), textRenderer).alignCenter(); verticalLayout.add(infoTextWidget); - buyButton = ButtonWidget.builder(isBinAuction ? Text.translatable("skyblocker.fancyAuctionHouse.buy") : Text.translatable("skyblocker.fancyAuctionHouse.bid"), button -> { + buyButton = ButtonWidget.builder(isBinAuction ? Text.translatable("skyblocker.fancyAuctionHouse.buy") : Text.translatable("skyblocker.fancyAuctionHouse.bid"), button -> { if (buySlotID == -1) return; clickSlot(buySlotID); }).size(60, 15).build(); @@ -78,8 +78,8 @@ public class AuctionViewScreen extends AbstractCustomHypixelGUI<AuctionHouseScre verticalLayout.forEachChild(this::addDrawableChild); updateLayout(); - addDrawableChild(new ButtonWidget.Builder( Text.literal("<"), button -> this.clickSlot(BACK_BUTTON_SLOT)) - .position(x + backgroundWidth - 16, y+4) + addDrawableChild(new ButtonWidget.Builder(Text.literal("<"), button -> this.clickSlot(BACK_BUTTON_SLOT)) + .position(x + backgroundWidth - 16, y + 4) .size(12, 12) .build()); @@ -94,10 +94,11 @@ public class AuctionViewScreen extends AbstractCustomHypixelGUI<AuctionHouseScre infoTextWidget.setMessage(Text.translatable("skyblocker.fancyAuctionHouse.cantAfford").withColor(Colors.RED)); buyButton.active = false; } - case TOP_BID -> infoTextWidget.setMessage(Text.translatable("skyblocker.fancyAuctionHouse.alreadyTopBid").withColor(Colors.LIGHT_YELLOW)); + case TOP_BID -> + infoTextWidget.setMessage(Text.translatable("skyblocker.fancyAuctionHouse.alreadyTopBid").withColor(Colors.LIGHT_YELLOW)); case AFFORD -> infoTextWidget.setMessage(Text.empty()); case COLLECT_AUCTION -> { - infoTextWidget.setMessage(changeProfile ? Text.translatable("skyblocker.fancyAuctionHouse.differentProfile"): wonAuction ? Text.empty() : Text.translatable("skyblocker.fancyAuctionHouse.didntWin")); + infoTextWidget.setMessage(changeProfile ? Text.translatable("skyblocker.fancyAuctionHouse.differentProfile") : wonAuction ? Text.empty() : Text.translatable("skyblocker.fancyAuctionHouse.didntWin")); //priceWidget.setMessage(Text.empty()); priceWidget.active = false; @@ -259,9 +260,9 @@ public class AuctionViewScreen extends AbstractCustomHypixelGUI<AuctionHouseScre } text.visit((style, asString) -> { // The regex removes [, ] and +. To ignore mvp++ rank and orange + in mvp+ - String res = Objects.equals(style.getColor(), TextColor.fromFormatting(Formatting.GOLD)) && !asString.matches(".*[]\\[+].*") && !asString.contains("Collect") ? asString: null; + String res = Objects.equals(style.getColor(), TextColor.fromFormatting(Formatting.GOLD)) && !asString.matches(".*[]\\[+].*") && !asString.contains("Collect") ? asString : null; return Optional.ofNullable(res); - }, Style.EMPTY).ifPresent(s -> stringAtomicReference.set(stringAtomicReference.get()+s)); + }, Style.EMPTY).ifPresent(s -> stringAtomicReference.set(stringAtomicReference.get() + s)); } //System.out.println("Experiment: " + stringAtomicReference.get()); if (priceString == null) priceString = stringAtomicReference.get(); |