diff options
Diffstat (limited to 'src/main/java/de/hysky')
34 files changed, 1978 insertions, 196 deletions
diff --git a/src/main/java/de/hysky/skyblocker/SkyblockerMod.java b/src/main/java/de/hysky/skyblocker/SkyblockerMod.java index 485a2103..3d96cc50 100644 --- a/src/main/java/de/hysky/skyblocker/SkyblockerMod.java +++ b/src/main/java/de/hysky/skyblocker/SkyblockerMod.java @@ -21,6 +21,7 @@ import de.hysky.skyblocker.skyblock.dwarven.CrystalsHud; import de.hysky.skyblocker.skyblock.dwarven.CrystalsLocationsManager; import de.hysky.skyblocker.skyblock.dwarven.DwarvenHud; import de.hysky.skyblocker.skyblock.end.BeaconHighlighter; +import de.hysky.skyblocker.skyblock.end.EnderNodes; import de.hysky.skyblocker.skyblock.end.TheEnd; import de.hysky.skyblocker.skyblock.garden.FarmingHud; import de.hysky.skyblocker.skyblock.garden.LowerSensitivity; @@ -98,6 +99,7 @@ public class SkyblockerMod implements ClientModInitializer { ClientTickEvents.END_CLIENT_TICK.register(this::tick); Utils.init(); SkyblockerConfigManager.init(); + SkyblockerScreen.initClass(); Tips.init(); NEURepoManager.init(); ImageRepoLoader.init(); @@ -110,6 +112,7 @@ public class SkyblockerMod implements ClientModInitializer { FairySouls.init(); Relics.init(); MythologicalRitual.init(); + EnderNodes.init(); OrderedWaypoints.init(); BackpackPreview.init(); QuickNav.init(); diff --git a/src/main/java/de/hysky/skyblocker/SkyblockerScreen.java b/src/main/java/de/hysky/skyblocker/SkyblockerScreen.java new file mode 100644 index 00000000..ba0745ed --- /dev/null +++ b/src/main/java/de/hysky/skyblocker/SkyblockerScreen.java @@ -0,0 +1,125 @@ +package de.hysky.skyblocker; + +import de.hysky.skyblocker.config.SkyblockerConfigManager; +import de.hysky.skyblocker.skyblock.Tips; +import de.hysky.skyblocker.utils.scheduler.Scheduler; +import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager; +import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback; +import net.minecraft.client.font.TextRenderer; +import net.minecraft.client.gui.DrawContext; +import net.minecraft.client.gui.screen.ConfirmLinkScreen; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.gui.widget.ButtonWidget; +import net.minecraft.client.gui.widget.GridWidget; +import net.minecraft.client.gui.widget.MultilineTextWidget; +import net.minecraft.client.gui.widget.TextWidget; +import net.minecraft.client.gui.widget.ThreePartsLayoutWidget; +import net.minecraft.screen.ScreenTexts; +import net.minecraft.text.OrderedText; +import net.minecraft.text.StringVisitable; +import net.minecraft.text.Text; +import net.minecraft.util.Identifier; +import net.minecraft.util.Language; + +public class SkyblockerScreen extends Screen { + private static final int SPACING = 8; + private static final int BUTTON_WIDTH = 210; + private static final int HALF_BUTTON_WIDTH = 101; //Same as (210 - 8) / 2 + private static final Text TITLE = Text.literal("Skyblocker " + SkyblockerMod.VERSION); + private static final Identifier ICON = new Identifier(SkyblockerMod.NAMESPACE, "icon.png"); + private static final Text CONFIGURATION_TEXT = Text.translatable("text.skyblocker.config"); + private static final Text SOURCE_TEXT = Text.translatable("text.skyblocker.source"); + private static final Text REPORT_BUGS_TEXT = Text.translatable("menu.reportBugs"); + private static final Text WEBSITE_TEXT = Text.translatable("text.skyblocker.website"); + private static final Text TRANSLATE_TEXT = Text.translatable("text.skyblocker.translate"); + private static final Text MODRINTH_TEXT = Text.translatable("text.skyblocker.modrinth"); + private static final Text DISCORD_TEXT = Text.translatable("text.skyblocker.discord"); + private final ThreePartsLayoutWidget layout = new ThreePartsLayoutWidget(this); + + private SkyblockerScreen() { + super(TITLE); + } + + public static void initClass() { + ClientCommandRegistrationCallback.EVENT.register((dispatcher, registryAccess) -> { + dispatcher.register(ClientCommandManager.literal(SkyblockerMod.NAMESPACE) + .executes(Scheduler.queueOpenScreenCommand(SkyblockerScreen::new))); + }); + } + + @Override + protected void init() { + this.layout.addHeader(new IconTextWidget(this.getTitle(), this.textRenderer, ICON)); + + GridWidget gridWidget = this.layout.addBody(new GridWidget()).setSpacing(SPACING); + gridWidget.getMainPositioner().alignHorizontalCenter(); + GridWidget.Adder adder = gridWidget.createAdder(2); + + adder.add(ButtonWidget.builder(CONFIGURATION_TEXT, button -> this.openConfig()).width(BUTTON_WIDTH).build(), 2); + adder.add(ButtonWidget.builder(SOURCE_TEXT, ConfirmLinkScreen.opening(this, "https://github.com/SkyblockerMod/Skyblocker")).width(HALF_BUTTON_WIDTH).build()); + adder.add(ButtonWidget.builder(REPORT_BUGS_TEXT, ConfirmLinkScreen.opening(this, "https://github.com/SkyblockerMod/Skyblocker/issues")).width(HALF_BUTTON_WIDTH).build()); + adder.add(ButtonWidget.builder(WEBSITE_TEXT, ConfirmLinkScreen.opening(this, "https://hysky.de/")).width(HALF_BUTTON_WIDTH).build()); + adder.add(ButtonWidget.builder(TRANSLATE_TEXT, ConfirmLinkScreen.opening(this, "https://translate.hysky.de/")).width(HALF_BUTTON_WIDTH).build()); + adder.add(ButtonWidget.builder(MODRINTH_TEXT, ConfirmLinkScreen.opening(this, "https://modrinth.com/mod/skyblocker-liap")).width(HALF_BUTTON_WIDTH).build()); + adder.add(ButtonWidget.builder(DISCORD_TEXT, ConfirmLinkScreen.opening(this, "https://discord.gg/aNNJHQykck")).width(HALF_BUTTON_WIDTH).build()); + adder.add(ButtonWidget.builder(ScreenTexts.DONE, button -> this.close()).width(BUTTON_WIDTH).build(), 2); + + MultilineTextWidget tip = new MultilineTextWidget(Text.translatable("skyblocker.tips.tip", Tips.nextTipInternal()), this.textRenderer) + .setCentered(true) + .setMaxWidth((int) (this.width * 0.7)); + + this.layout.addFooter(tip); + this.layout.refreshPositions(); + this.layout.forEachChild(this::addDrawableChild); + } + + @Override + protected void initTabNavigation() { + this.layout.refreshPositions(); + } + + private void openConfig() { + this.client.setScreen(SkyblockerConfigManager.createGUI(this)); + } + + @Override + public void render(DrawContext context, int mouseX, int mouseY, float delta) { + this.renderBackground(context, mouseX, mouseY, delta); + super.render(context, mouseX, mouseY, delta); + } + + private static class IconTextWidget extends TextWidget { + private final Identifier icon; + + IconTextWidget(Text message, TextRenderer textRenderer, Identifier icon) { + super(message, textRenderer); + this.icon = icon; + } + + @Override + public void renderWidget(DrawContext context, int mouseX, int mouseY, float delta) { + Text text = this.getMessage(); + TextRenderer textRenderer = this.getTextRenderer(); + + int width = this.getWidth(); + int textWidth = textRenderer.getWidth(text); + float horizontalAlignment = 0.5f; // default + //17 = (32 + 2) / 2 • 32 + 2 is the width of the icon + spacing between icon and text + int x = this.getX() + 17 + Math.round(horizontalAlignment * (float) (width - textWidth)); + int y = this.getY() + (this.getHeight() - textRenderer.fontHeight) / 2; + OrderedText orderedText = textWidth > width ? this.trim(text, width) : text.asOrderedText(); + + int iconX = x - 34; + int iconY = y - 13; + + context.drawTextWithShadow(textRenderer, orderedText, x, y, this.getTextColor()); + context.drawTexture(this.icon, iconX, iconY, 0, 0, 32, 32, 32, 32); + } + + private OrderedText trim(Text text, int width) { + TextRenderer textRenderer = this.getTextRenderer(); + StringVisitable stringVisitable = textRenderer.trimToWidth(text, width - textRenderer.getWidth(ScreenTexts.ELLIPSIS)); + return Language.getInstance().reorder(StringVisitable.concat(stringVisitable, ScreenTexts.ELLIPSIS)); + } + } +} diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index dc3fea10..6fddd3d0 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -251,6 +251,9 @@ public class SkyblockerConfig { public SearchOverlay searchOverlay = new SearchOverlay(); @SerialEntry + public FancyAuctionHouse fancyAuctionHouse = new FancyAuctionHouse(); + + @SerialEntry public List<Integer> lockedSlots = new ArrayList<>(); @SerialEntry @@ -418,138 +421,11 @@ public class SkyblockerConfig { public boolean enableQuiverWarningAfterDungeon = true; } - public static class Hitbox { - @SerialEntry - public boolean oldFarmlandHitbox = false; - - @SerialEntry - public boolean oldLeverHitbox = false; - } - - public static class TitleContainer { - @SerialEntry - public float titleContainerScale = 100; - - @SerialEntry - public int x = 540; - - @SerialEntry - public int y = 10; - - @SerialEntry - public Direction direction = Direction.HORIZONTAL; - - @SerialEntry - public Alignment alignment = Alignment.MIDDLE; - } - - public enum Direction { - HORIZONTAL, VERTICAL; - - @Override - public String toString() { - return switch (this) { - case HORIZONTAL -> "Horizontal"; - case VERTICAL -> "Vertical"; - }; - } - } - - public enum Alignment { - LEFT, RIGHT, MIDDLE; - - @Override - public String toString() { - return switch (this) { - case LEFT -> "Left"; - case RIGHT -> "Right"; - case MIDDLE -> "Middle"; - }; - } - } - - public static class TeleportOverlay { - @SerialEntry - public boolean enableTeleportOverlays = true; - - @SerialEntry - public boolean enableWeirdTransmission = true; - - @SerialEntry - public boolean enableInstantTransmission = true; - - @SerialEntry - public boolean enableEtherTransmission = true; - - @SerialEntry - public boolean enableSinrecallTransmission = true; - - @SerialEntry - public boolean enableWitherImpact = true; - } - - public static class FlameOverlay { - @SerialEntry - public int flameHeight = 100; - - @SerialEntry - public int flameOpacity = 100; - } - - public static class SearchOverlay { - @SerialEntry - public boolean enableBazaar = true; - - @SerialEntry - public boolean enableAuctionHouse = true; - - @SerialEntry - public boolean keepPreviousSearches = false; - - @SerialEntry - public int maxSuggestions = 3; - - @SerialEntry - public int historyLength = 3; - - @SerialEntry - public boolean enableCommands = false; - - @SerialEntry - public List<String> bazaarHistory = new ArrayList<>(); - - @SerialEntry - public List<String> auctionHistory = new ArrayList<>(); - } - - public static class RichPresence { - @SerialEntry - public boolean enableRichPresence = false; - - @SerialEntry - public Info info = Info.LOCATION; - - @SerialEntry - public boolean cycleMode = false; - - @SerialEntry - public String customMessage = "Playing Skyblock"; - } - public static class ItemList { @SerialEntry public boolean enableItemList = true; } - public enum Average { - ONE_DAY, THREE_DAY, BOTH; - - @Override - public String toString() { - return I18n.translate("text.autoconfig.skyblocker.option.general.itemTooltip.avg." + name()); - } - } - public static class ItemTooltip { @SerialEntry public boolean enableNPCPrice = true; @@ -582,6 +458,15 @@ public class SkyblockerConfig { public boolean enableAccessoriesHelper = true; } + public enum Average { + ONE_DAY, THREE_DAY, BOTH; + + @Override + public String toString() { + return I18n.translate("text.autoconfig.skyblocker.option.general.itemTooltip.avg." + name()); + } + } + public static class ItemInfoDisplay { @SerialEntry public boolean attributeShardInfo = true; @@ -663,6 +548,118 @@ public class SkyblockerConfig { public boolean rareDungeonDropEffects = true; } + public static class Hitbox { + @SerialEntry + public boolean oldFarmlandHitbox = false; + + @SerialEntry + public boolean oldLeverHitbox = false; + } + + public static class TitleContainer { + @SerialEntry + public float titleContainerScale = 100; + + @SerialEntry + public int x = 540; + + @SerialEntry + public int y = 10; + + @SerialEntry + public Direction direction = Direction.HORIZONTAL; + + @SerialEntry + public Alignment alignment = Alignment.MIDDLE; + } + + public enum Direction { + HORIZONTAL, VERTICAL; + + @Override + public String toString() { + return switch (this) { + case HORIZONTAL -> "Horizontal"; + case VERTICAL -> "Vertical"; + }; + } + } + + public enum Alignment { + LEFT, RIGHT, MIDDLE; + + @Override + public String toString() { + return switch (this) { + case LEFT -> "Left"; + case RIGHT -> "Right"; + case MIDDLE -> "Middle"; + }; + } + } + + public static class TeleportOverlay { + @SerialEntry + public boolean enableTeleportOverlays = true; + + @SerialEntry + public boolean enableWeirdTransmission = true; + + @SerialEntry + public boolean enableInstantTransmission = true; + + @SerialEntry + public boolean enableEtherTransmission = true; + + @SerialEntry + public boolean enableSinrecallTransmission = true; + + @SerialEntry + public boolean enableWitherImpact = true; + } + + public static class FlameOverlay { + @SerialEntry + public int flameHeight = 100; + + @SerialEntry + public int flameOpacity = 100; + } + + public static class SearchOverlay { + @SerialEntry + public boolean enableBazaar = true; + + @SerialEntry + public boolean enableAuctionHouse = true; + + @SerialEntry + public boolean keepPreviousSearches = false; + + @SerialEntry + public int maxSuggestions = 3; + + @SerialEntry + public int historyLength = 3; + + @SerialEntry + public boolean enableCommands = false; + + @SerialEntry + public List<String> bazaarHistory = new ArrayList<>(); + + @SerialEntry + public List<String> auctionHistory = new ArrayList<>(); + } + + public static class FancyAuctionHouse { + @SerialEntry + public boolean enabled = true; + + @SerialEntry + public boolean highlightCheapBIN = true; + } + public static class Locations { @SerialEntry public Barn barn = new Barn(); @@ -1083,6 +1080,8 @@ public class SkyblockerConfig { } public static class TheEnd { + @SerialEntry + public boolean enableEnderNodeHelper = true; @SerialEntry public boolean hudEnabled = true; @@ -1252,6 +1251,20 @@ public class SkyblockerConfig { public int announcementScale = 3; } + public static class RichPresence { + @SerialEntry + public boolean enableRichPresence = false; + + @SerialEntry + public Info info = Info.LOCATION; + + @SerialEntry + public boolean cycleMode = false; + + @SerialEntry + public String customMessage = "Playing Skyblock"; + } + public enum Info { PURSE, BITS, LOCATION; diff --git a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java index 2a171a14..dbfbbb10 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java @@ -771,6 +771,26 @@ public class GeneralCategory { .controller(ConfigUtils::createBooleanController) .build()) .build()) + + // Fancy Auction House + .group(OptionGroup.createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.general.betterAuctionHouse")) + .collapsed(true) + .option(Option.<Boolean>createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.general.betterAuctionHouse.enabled")) + .binding(defaults.general.fancyAuctionHouse.enabled, + () -> config.general.fancyAuctionHouse.enabled, + newValue -> config.general.fancyAuctionHouse.enabled = newValue) + .controller(ConfigUtils::createBooleanController) + .build()) + .option(Option.<Boolean>createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.general.betterAuctionHouse.highlightUnderAvgPrice")) + .binding(defaults.general.fancyAuctionHouse.highlightCheapBIN, + () -> config.general.fancyAuctionHouse.highlightCheapBIN, + newValue -> config.general.fancyAuctionHouse.highlightCheapBIN = newValue) + .controller(ConfigUtils::createBooleanController) + .build()) + .build()) .build(); } } diff --git a/src/main/java/de/hysky/skyblocker/config/categories/LocationsCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/LocationsCategory.java index 67512b78..46f3067c 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/LocationsCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/LocationsCategory.java @@ -85,6 +85,13 @@ public class LocationsCategory { .name(Text.translatable("text.autoconfig.skyblocker.option.locations.end")) .collapsed(false) .option(Option.<Boolean>createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.locations.end.enableEnderNodeHelper")) + .binding(defaults.locations.end.enableEnderNodeHelper, + () -> config.locations.end.enableEnderNodeHelper, + newValue -> config.locations.end.enableEnderNodeHelper = newValue) + .controller(ConfigUtils::createBooleanController) + .build()) + .option(Option.<Boolean>createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.locations.end.hudEnabled")) .binding(defaults.locations.end.hudEnabled, () -> config.locations.end.hudEnabled, diff --git a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java index 8397292b..743f949f 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java @@ -7,6 +7,7 @@ import de.hysky.skyblocker.skyblock.FishingHelper; import de.hysky.skyblocker.skyblock.dungeon.DungeonScore; import de.hysky.skyblocker.skyblock.dungeon.secrets.DungeonManager; import de.hysky.skyblocker.skyblock.end.BeaconHighlighter; +import de.hysky.skyblocker.skyblock.end.EnderNodes; import de.hysky.skyblocker.skyblock.end.TheEnd; import de.hysky.skyblocker.skyblock.waypoint.MythologicalRitual; import de.hysky.skyblocker.utils.SlayerUtils; @@ -91,6 +92,7 @@ public abstract class ClientPlayNetworkHandlerMixin { @Inject(method = "onParticle", at = @At("RETURN")) private void skyblocker$onParticle(ParticleS2CPacket packet, CallbackInfo ci) { MythologicalRitual.onParticle(packet); + EnderNodes.onParticle(packet); } @ModifyExpressionValue(method = "onEntityStatus", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/s2c/play/EntityStatusS2CPacket;getEntity(Lnet/minecraft/world/World;)Lnet/minecraft/entity/Entity;")) diff --git a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayerEntityMixin.java b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayerEntityMixin.java index ceda9ed4..8fb2fda4 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayerEntityMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayerEntityMixin.java @@ -2,6 +2,8 @@ package de.hysky.skyblocker.mixin; import com.mojang.authlib.GameProfile; import de.hysky.skyblocker.config.SkyblockerConfigManager; +import de.hysky.skyblocker.skyblock.auction.AuctionViewScreen; +import de.hysky.skyblocker.skyblock.auction.EditBidPopup; import de.hysky.skyblocker.skyblock.dungeon.partyfinder.PartyFinderScreen; import de.hysky.skyblocker.skyblock.item.HotbarSlotLock; import de.hysky.skyblocker.skyblock.item.ItemProtection; @@ -25,7 +27,9 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(ClientPlayerEntity.class) public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity { - @Shadow @Final protected MinecraftClient client; + @Shadow + @Final + protected MinecraftClient client; public ClientPlayerEntityMixin(ClientWorld world, GameProfile profile) { super(world, profile); @@ -33,14 +37,9 @@ public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity @Inject(method = "dropSelectedItem", at = @At("HEAD"), cancellable = true) public void skyblocker$dropSelectedItem(CallbackInfoReturnable<Boolean> cir) { - if (Utils.isOnSkyblock()) { - if (ItemProtection.isItemProtected(this.getInventory().getMainHandStack())) { - if (!SkyblockerConfigManager.get().locations.dungeons.allowDroppingProtectedItems - || (SkyblockerConfigManager.get().locations.dungeons.allowDroppingProtectedItems && !Utils.isInDungeons())) { - cir.setReturnValue(false); - } - } - HotbarSlotLock.handleDropSelectedItem(this.getInventory().selectedSlot, cir); + if (Utils.isOnSkyblock() && (ItemProtection.isItemProtected(this.getInventory().getMainHandStack()) || HotbarSlotLock.isLocked(this.getInventory().selectedSlot)) + && (!SkyblockerConfigManager.get().locations.dungeons.allowDroppingProtectedItems || !Utils.isInDungeons())) { + cir.setReturnValue(false); } } @@ -58,6 +57,11 @@ public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity return; } + if (client.currentScreen instanceof AuctionViewScreen auctionViewScreen) { + this.client.setScreen(new EditBidPopup(auctionViewScreen, sign, front, auctionViewScreen.minBid)); + callbackInfo.cancel(); + } + // Search Overlay if (client.currentScreen != null) { if (SkyblockerConfigManager.get().general.searchOverlay.enableAuctionHouse && client.currentScreen.getTitle().getString().toLowerCase().contains("auction")) { diff --git a/src/main/java/de/hysky/skyblocker/mixin/HandledScreenProviderMixin.java b/src/main/java/de/hysky/skyblocker/mixin/HandledScreenProviderMixin.java index 975c9c51..bf330d80 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/HandledScreenProviderMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/HandledScreenProviderMixin.java @@ -2,6 +2,9 @@ package de.hysky.skyblocker.mixin; import de.hysky.skyblocker.config.SkyblockerConfigManager; +import de.hysky.skyblocker.skyblock.auction.AuctionBrowserScreen; +import de.hysky.skyblocker.skyblock.auction.AuctionHouseScreenHandler; +import de.hysky.skyblocker.skyblock.auction.AuctionViewScreen; import de.hysky.skyblocker.skyblock.dungeon.partyfinder.PartyFinderScreen; import de.hysky.skyblocker.skyblock.item.SkyblockCraftingTableScreenHandler; import de.hysky.skyblocker.skyblock.item.SkyblockCraftingTableScreen; @@ -26,7 +29,10 @@ public interface HandledScreenProviderMixin<T extends ScreenHandler> { if (player == null) return; if (!Utils.isOnSkyblock()) return; T screenHandler = type.create(id, player.getInventory()); - if (SkyblockerConfigManager.get().general.betterPartyFinder && screenHandler instanceof GenericContainerScreenHandler containerScreenHandler && PartyFinderScreen.possibleInventoryNames.contains(name.getString().toLowerCase())) { + if (!(screenHandler instanceof GenericContainerScreenHandler containerScreenHandler)) return; + String nameLowercase = name.getString().toLowerCase(); + // Better party finder + if (SkyblockerConfigManager.get().general.betterPartyFinder && PartyFinderScreen.possibleInventoryNames.contains(nameLowercase)) { if (client.currentScreen != null) { String lowerCase = client.currentScreen.getTitle().getString().toLowerCase(); if (lowerCase.contains("group builder")) return; @@ -45,7 +51,28 @@ public interface HandledScreenProviderMixin<T extends ScreenHandler> { } ci.cancel(); - } else if (SkyblockerConfigManager.get().general.fancyCraftingTable && screenHandler instanceof GenericContainerScreenHandler containerScreenHandler && name.getString().toLowerCase().contains("craft item")) { + // Fancy AH + } else if (SkyblockerConfigManager.get().general.fancyAuctionHouse.enabled && (nameLowercase.contains("auctions browser") || nameLowercase.contains("auctions: "))) { + AuctionHouseScreenHandler auc |
