From 362e3efddab52c954a46766e217d6b4faba5332e Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 1 Jan 2023 17:30:29 +0100 Subject: 0.13.1 color fix --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ff538037..7e3818601 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # SkyHanni - Change Log +## Version 0.13.1 + +### Fixes ++ Dungeon level color fixed wrong colors. + ## Version 0.13 ### Features -- cgit From 640bc1dfb63b974712ff0c69bec3606378f69afa Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 6 Jan 2023 23:27:00 +0100 Subject: Added /shtrackcollection. --- CHANGELOG.md | 3 +++ FEATURES.md | 1 + 2 files changed, 4 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e3818601..3d69e944d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Version 0.13.1 +### Features ++ Added /shtrackcollection - This tracks the number of items you collect, but it does not work with sacks. + ### Fixes + Dungeon level color fixed wrong colors. diff --git a/FEATURES.md b/FEATURES.md index 552552f9c..7f44a497d 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -140,6 +140,7 @@ ## Commands - /wiki (using hypixel-skyblock.fandom.com instead of Hypixel wiki) - /shmarkplayer (marking a player with yellow color) +- /shtrackcollection - This tracks the number of items you collect, but it does not work with sacks. - ## Misc - Allow to copy, paste, and mark selected text in signs (not visual, but it's working still) -- cgit From abd2c854bf10206b2e718364430281be6b7fefdd Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 7 Jan 2023 01:22:50 +0100 Subject: Don't render overlays when tab list key is pressed. --- CHANGELOG.md | 3 +++ src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d69e944d..6de968e79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ ### Features + Added /shtrackcollection - This tracks the number of items you collect, but it does not work with sacks. +### Changes ++ Don't render overlays when tab list key is pressed. + ### Fixes + Dungeon level color fixed wrong colors. diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt index 3f8f1ce68..3697838c7 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt @@ -425,14 +425,17 @@ object RenderUtils { } fun Position.renderString(string: String?, offsetY: Int = 0) { + val minecraft = Minecraft.getMinecraft() + if (minecraft.gameSettings.keyBindPlayerList.isKeyDown) return + if (string == null) return if (string == "") return val textToRender = "§f$string" GlStateManager.pushMatrix() - val resolution = ScaledResolution(Minecraft.getMinecraft()) + val resolution = ScaledResolution(minecraft) - val renderer = Minecraft.getMinecraft().renderManager.fontRenderer ?: return + val renderer = minecraft.renderManager.fontRenderer ?: return val offsetX = (200 - renderer.getStringWidth(textToRender.removeColor())) / 2 -- cgit From c0626bdc53ef5184279241a9110daa1696ac27e7 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 7 Jan 2023 01:59:53 +0100 Subject: No longer blocking the sell of bazaar items to NPC when on ironman, stranded or bingo mode. --- CHANGELOG.md | 1 + .../hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 6de968e79..4eac20119 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Changes + Don't render overlays when tab list key is pressed. ++ No longer blocking the sell of bazaar items to NPC when on ironman, stranded or bingo mode. ### Fixes + Dungeon level color fixed wrong colors. diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt index 78735b5f9..0202566a0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt @@ -306,6 +306,12 @@ class HideNotClickableItems { } if (!ItemUtils.isRecombobulated(stack)) { + if (LorenzUtils.noTradeMode) { + if (BazaarApi.isBazaarItem(stack)) { + return false + } + } + if (hideNpcSellFilter.match(name)) return false val id = stack.getInternalName() -- cgit From cbbcdccf949cba0f152cb52a18b8e02c4d6f3b0e Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 7 Jan 2023 02:23:14 +0100 Subject: Compact Bingo and Potion Effect chat messages. --- CHANGELOG.md | 4 +- FEATURES.md | 4 + .../java/at/hannibal2/skyhanni/SkyHanniMod.java | 2 + .../at/hannibal2/skyhanni/config/Features.java | 4 + .../hannibal2/skyhanni/config/features/Bingo.java | 14 +++ .../hannibal2/skyhanni/config/features/Chat.java | 7 +- .../skyhanni/features/CompactBingoChat.kt | 112 +++++++++++++++++++++ .../features/CompactSplashPotionMessage.kt | 35 +++++++ 8 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java create mode 100644 src/main/java/at/hannibal2/skyhanni/features/CompactBingoChat.kt create mode 100644 src/main/java/at/hannibal2/skyhanni/features/CompactSplashPotionMessage.kt (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eac20119..72210d27a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,12 @@ ### Features + Added /shtrackcollection - This tracks the number of items you collect, but it does not work with sacks. ++ Added Compact Bingo Chat Messages ++ Added Compact Potion Effect Chat Messages ### Changes + Don't render overlays when tab list key is pressed. -+ No longer blocking the sell of bazaar items to NPC when on ironman, stranded or bingo mode. ++ Do no longer prevent the selling of bazaar items to NPC when on ironman, stranded or bingo mode. ### Fixes + Dungeon level color fixed wrong colors. diff --git a/FEATURES.md b/FEATURES.md index 7f44a497d..9687098b0 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -19,6 +19,7 @@ - Option to hide the death messages of other players, except for players who are close to the player, inside the dungeon or during a Kuudra fight. - Scan messages sent by players in all-chat for blacklisted words and greys out the message. - Chat peeking (holding key to display chat without opening the chat gui) +- Compact Potion Effect Messages ## Dungeon - Clicked Blocks (Showing the block behind walls AFTER clicked on a chest, wither essence or a lever) @@ -137,6 +138,9 @@ + Highlight marked player names in chat. + Mark the own player name. +## Bingo ++ Shortens chat messages about skill level ups, collection gains, new area discoveries, and bestiarity upgrades while on bingo. + ## Commands - /wiki (using hypixel-skyblock.fandom.com instead of Hypixel wiki) - /shmarkplayer (marking a player with yellow color) diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java index 5a1e9fb7c..d7670e810 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java @@ -167,7 +167,9 @@ public class SkyHanniMod { registerEvent(new HighlightBonzoMasks()); registerEvent(new DungeonLevelColor()); registerEvent(new BazaarCancelledBuyOrderClipboard()); + registerEvent(new CompactSplashPotionMessage()); registerEvent(new CroesusUnopenedChestTracker()); + registerEvent(new CompactBingoChat()); Commands.INSTANCE.init(); diff --git a/src/main/java/at/hannibal2/skyhanni/config/Features.java b/src/main/java/at/hannibal2/skyhanni/config/Features.java index 976a0d9da..083220b29 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Features.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Features.java @@ -164,6 +164,10 @@ public class Features extends Config { @Category(name = "Marked Players", desc = "Players that got marked with /shmarkplayer") public MarkedPlayers markedPlayers = new MarkedPlayers(); + @Expose + @Category(name = "Bingo", desc = "Features for the Bingo mode.") + public Bingo bingo = new Bingo(); + @Expose @Category(name = "Misc", desc = "Settings without a category.") public Misc misc = new Misc(); diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java b/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java new file mode 100644 index 000000000..002841d22 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java @@ -0,0 +1,14 @@ +package at.hannibal2.skyhanni.config.features; + +import at.hannibal2.skyhanni.config.core.config.annotations.ConfigEditorBoolean; +import at.hannibal2.skyhanni.config.core.config.annotations.ConfigOption; +import com.google.gson.annotations.Expose; + +public class Bingo { + + @Expose + @ConfigOption(name = "Compact Chat Messages", desc = "Shortens chat messages about skill level ups, collection gains, " + + "new area discoveries, and bestiarity upgrades while on bingo.") + @ConfigEditorBoolean + public boolean compactChatMessages = true; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java b/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java index 029731f96..386a8fd4b 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java @@ -91,7 +91,7 @@ public class Chat { @Expose @ConfigOption(name = "Dungeon Filter", desc = "Hide annoying messages in the dungeon.") @ConfigEditorBoolean - public boolean dungeonMessages = false; + public boolean dungeonMessages = true; @Expose @ConfigOption(name = "Dungeon Boss Messages", desc = "Hide messages from watcher and bosses in the dungeon.") @@ -103,4 +103,9 @@ public class Chat { "except for players who are close to the player, inside dungeon or during a Kuudra fight.") @ConfigEditorBoolean public boolean hideFarDeathMessages = false; + + @Expose + @ConfigOption(name = "Compact Potion Message", desc = "Shorten chat messages about player potion effects.") + @ConfigEditorBoolean + public boolean compactPotionMessage = true; } diff --git a/src/main/java/at/hannibal2/skyhanni/features/CompactBingoChat.kt b/src/main/java/at/hannibal2/skyhanni/features/CompactBingoChat.kt new file mode 100644 index 000000000..236236bb6 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/CompactBingoChat.kt @@ -0,0 +1,112 @@ +package at.hannibal2.skyhanni.features + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class CompactBingoChat { + + private var blockedSkillLevelUp = false + private var blockedCollectionLevelUp = false + private var collectionLevelUpLastLine: String? = null + private var newArea = 0//0 = nothing, 1 = after first message, 2 = after second message + private var blockedBestiarity = false + + @SubscribeEvent + fun onChatMessage(event: LorenzChatEvent) { + if (!LorenzUtils.isBingoProfile) return + if (!SkyHanniMod.feature.bingo.compactChatMessages) return + + onSkillLevelUp(event) + onCollectionLevelUp(event) + onNewAreaDiscovered(event) + onBestiarityUpgrade(event) + } + + private fun onSkillLevelUp(event: LorenzChatEvent) { + val message = event.message + if (message.startsWith(" §r§b§lSKILL LEVEL UP ")) { + blockedSkillLevelUp = true + return + } + if (message == "§3§l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬") { + blockedSkillLevelUp = false + return + } + + if (blockedSkillLevelUp) { + if (!message.contains("Access to") && !message.endsWith(" Enchantment")) { + event.blockedReason = "compact skill level up" + } + } + } + + private fun onCollectionLevelUp(event: LorenzChatEvent) { + val message = event.message + if (message.startsWith(" §r§6§lCOLLECTION LEVEL UP ")) { + blockedCollectionLevelUp = true + return + } + if (message == "§e§l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬") { + blockedCollectionLevelUp = false + return + } + + if (blockedCollectionLevelUp) { + if (message.contains("Trade") || message.contains("Recipe")) { + var text = message.removeColor().replace(" ", "") + if (text == "Trade" || text == "Recipe") { + collectionLevelUpLastLine?.let { LorenzUtils.chat(it) } + } + } else { + event.blockedReason = "compact collection level up" + collectionLevelUpLastLine = message + } + } + } + + private fun onNewAreaDiscovered(event: LorenzChatEvent) { + var message = event.message + + if (message == " §r§6§lNEW AREA DISCOVERED!") { + newArea = 1 + println("new area $newArea $message") + return + } + + if (message != "") { + if (newArea == 1) { + newArea = 2 + println("new area $newArea $message") + return + } + + if (newArea == 2) { + if (message.startsWith("§7 ■ §r") || message.startsWith(" §r")) { + event.blockedReason = "compact new area discovered" + } else { + newArea = 0 + println("new area $newArea $message") + } + } + } + } + + private fun onBestiarityUpgrade(event: LorenzChatEvent) { + val message = event.message + if (message.startsWith(" §r§3§lBESTIARY §b§l")) { + blockedBestiarity = true + return + } + if (message == "§3§l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬") { + blockedBestiarity = false + return + } + + if (blockedBestiarity) { + event.blockedReason = "compact bestiarity upgrade" + } + } +} \ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/features/CompactSplashPotionMessage.kt b/src/main/java/at/hannibal2/skyhanni/features/CompactSplashPotionMessage.kt new file mode 100644 index 000000000..04740bbbd --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/CompactSplashPotionMessage.kt @@ -0,0 +1,35 @@ +package at.hannibal2.skyhanni.features + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.utils.LorenzUtils +import net.minecraft.util.ChatComponentText +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import java.util.regex.Pattern + +class CompactSplashPotionMessage { + + private val POTION_EFFECT_PATTERN = + Pattern.compile("§a§lBUFF! §fYou have gained §r(.*)§r§f! Press TAB or type /effects to view your active effects!") + + private val POTION_EFFECT_OTHERS_PATTERN = + Pattern.compile("§a§lBUFF! §fYou were splashed by (.*) §fwith §r(.*)§r§f! Press TAB or type /effects to view your active effects!") + + @SubscribeEvent + fun onChatMessage(event: LorenzChatEvent) { + if (!LorenzUtils.inSkyblock || !SkyHanniMod.feature.chat.compactPotionMessage) return + + var matcher = POTION_EFFECT_PATTERN.matcher(event.message) + if (matcher.matches()) { + val name = matcher.group(1) + event.chatComponent = ChatComponentText("§a§lPotion Effect! §r$name") + } + + matcher = POTION_EFFECT_OTHERS_PATTERN.matcher(event.message) + if (matcher.matches()) { + val playerName = matcher.group(1) + val effectName = matcher.group(2) + event.chatComponent = ChatComponentText("§a§lPotion Effect! §r$effectName §7(by $playerName§7)") + } + } +} \ No newline at end of file -- cgit From cdfec7e6849c3a807812515eef26582933fbadd8 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 7 Jan 2023 04:58:27 +0100 Subject: Fixed error in Sea Creature Guide inventory. --- CHANGELOG.md | 3 ++- .../features/inventory/ItemDisplayOverlayFeatures.kt | 12 ++++++++---- src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt | 11 +++++++++++ 3 files changed, 21 insertions(+), 5 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 72210d27a..e8b1e9f92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,8 @@ + Do no longer prevent the selling of bazaar items to NPC when on ironman, stranded or bingo mode. ### Fixes -+ Dungeon level color fixed wrong colors. ++ Fixed wrong dungeon level colors. (in Party Finder) ++ Fixed error in Sea Creature Guide inventory. ## Version 0.13 diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt index 4e25e3c83..bc79fdbc5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.RenderItemTipEvent +import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils import at.hannibal2.skyhanni.utils.ItemUtils.cleanName import at.hannibal2.skyhanni.utils.ItemUtils.getLore @@ -61,10 +62,13 @@ class ItemDisplayOverlayFeatures { } if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(4)) { - if (ItemUtils.isPet(name)) { - val level = name.between("Lvl ", "] ").toInt() - if (level != ItemUtils.maxPetLevel(name)) { - return "$level" + val chestName = InventoryUtils.openInventoryName() + if (!chestName.endsWith("Sea Creature Guide")) { + if (ItemUtils.isPet(name)) { + val level = name.between("Lvl ", "] ").toInt() + if (level != ItemUtils.maxPetLevel(name)) { + return "$level" + } } } } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt index 1d51d1be9..f1f107e2f 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt @@ -32,4 +32,15 @@ object InventoryUtils { } return list } + + fun openInventoryName(): String { + val guiChest = Minecraft.getMinecraft().currentScreen + val chestName = if (guiChest is GuiChest) { + val chest = guiChest.inventorySlots as ContainerChest + chest.lowerChestInventory.displayName.unformattedText.trim() + } else { + "" + } + return chestName + } } \ No newline at end of file -- cgit From e7f3e850c9cf5ddf0f4d93a25c92d3e45a279bf6 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 7 Jan 2023 07:12:36 +0100 Subject: Add Brewing Stand Overlay. --- CHANGELOG.md | 5 +-- FEATURES.md | 3 +- .../java/at/hannibal2/skyhanni/SkyHanniMod.java | 1 + .../hannibal2/skyhanni/config/features/Misc.java | 5 +++ .../at/hannibal2/skyhanni/data/ItemTipHelper.kt | 7 ++-- .../skyhanni/events/RenderInventoryItemTipEvent.kt | 3 ++ .../skyhanni/features/misc/BrewingStandOverlay.kt | 39 ++++++++++++++++++++++ 7 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/features/misc/BrewingStandOverlay.kt (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index e8b1e9f92..98514c811 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,9 @@ ### Features + Added /shtrackcollection - This tracks the number of items you collect, but it does not work with sacks. -+ Added Compact Bingo Chat Messages -+ Added Compact Potion Effect Chat Messages ++ Added Compact Bingo Chat Messages. ++ Added Compact Potion Effect Chat Messages. ++ Added Brewing Stand Overlay. ### Changes + Don't render overlays when tab list key is pressed. diff --git a/FEATURES.md b/FEATURES.md index 9687098b0..eb6d2c742 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -159,4 +159,5 @@ - Hide armor or just helmet of other player or yourself - Display the active non-god potion effects. - Option to hide blaze particles. -- Wishing compass uses amount display. \ No newline at end of file +- Wishing compass uses amount display. +- Brewing Stand Overlay. \ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java index 298b01686..62ff318ae 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java @@ -170,6 +170,7 @@ public class SkyHanniMod { loadModule(new CompactSplashPotionMessage()); loadModule(new CroesusUnopenedChestTracker()); loadModule(new CompactBingoChat()); + loadModule(new BrewingStandOverlay()); Commands.INSTANCE.init(); diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java index a47b7979e..58186b08e 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java @@ -139,4 +139,9 @@ public class Misc { @ConfigOption(name = "Collection Counter Position", desc = "Tracking the number of items you collect. §cDoes not work with sacks.") @ConfigEditorButton(runnableId = "collectionCounter", buttonText = "Edit") public Position collectionCounterPos = new Position(10, 10, false, true); + + @Expose + @ConfigOption(name = "Brewing Stand Overlay", desc = "Display the Item names directly inside the Brewing Stand") + @ConfigEditorBoolean + public boolean brewingStandOverlay = true; } \ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt index 30b9ad03f..7937ab2ae 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt @@ -5,10 +5,12 @@ import at.hannibal2.skyhanni.events.GuiRenderItemEvent import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent import at.hannibal2.skyhanni.events.RenderItemTipEvent import at.hannibal2.skyhanni.mixins.transformers.gui.AccessorGuiContainer +import at.hannibal2.skyhanni.utils.InventoryUtils.getInventoryName import at.hannibal2.skyhanni.utils.LorenzUtils import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiChest import net.minecraft.client.renderer.GlStateManager +import net.minecraft.inventory.ContainerChest import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -55,6 +57,8 @@ class ItemTipHelper { val gui = Minecraft.getMinecraft().currentScreen if (gui !is GuiChest) return + val chest = gui.inventorySlots as ContainerChest + var inventoryName = chest.getInventoryName() val guiLeft = (gui as AccessorGuiContainer).guiLeft val guiTop = (gui as AccessorGuiContainer).guiTop @@ -65,9 +69,8 @@ class ItemTipHelper { GlStateManager.disableBlend() for (slot in gui.inventorySlots.inventorySlots) { val stack = slot.stack ?: continue - if (stack.stackSize != 1) continue - val itemTipEvent = RenderInventoryItemTipEvent(stack) + val itemTipEvent = RenderInventoryItemTipEvent(inventoryName, slot, stack) itemTipEvent.postAndCatch() val stackTip = itemTipEvent.stackTip if (stackTip.isEmpty()) continue diff --git a/src/main/java/at/hannibal2/skyhanni/events/RenderInventoryItemTipEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/RenderInventoryItemTipEvent.kt index 4576576bd..7bb4692ec 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/RenderInventoryItemTipEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/RenderInventoryItemTipEvent.kt @@ -1,8 +1,11 @@ package at.hannibal2.skyhanni.events +import net.minecraft.inventory.Slot import net.minecraft.item.ItemStack class RenderInventoryItemTipEvent( + val inventoryName: String, + val slot: Slot, val stack: ItemStack, var stackTip: String = "", var offsetX: Int = 0, diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/BrewingStandOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/BrewingStandOverlay.kt new file mode 100644 index 000000000..6496e3d4c --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/BrewingStandOverlay.kt @@ -0,0 +1,39 @@ +package at.hannibal2.skyhanni.features.misc + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent +import at.hannibal2.skyhanni.utils.ItemUtils.name +import at.hannibal2.skyhanni.utils.LorenzUtils +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class BrewingStandOverlay { + + @SubscribeEvent + fun onRenderItemTip(event: RenderInventoryItemTipEvent) { + if (!LorenzUtils.inSkyBlock) return + if (!SkyHanniMod.feature.misc.brewingStandOverlay) return + + if (event.inventoryName != "Brewing Stand") return + + val stack = event.stack + val name = stack.name ?: return + + when (event.slot.slotNumber) { + 13, // Ingredient input + 21, // Progress + 42, // Output right side + -> { + } + + else -> return + } + + // Hide the progress slot when not active + if (name.contains(" or ")) return + + event.stackTip = name + event.offsetX = 3 + event.offsetY = -5 + event.alignLeft = false + } +} \ No newline at end of file -- cgit From f9dc3d00aefe80b8d94f218fe012c9c3737b118f Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 7 Jan 2023 08:47:56 +0100 Subject: Added minion name display. --- CHANGELOG.md | 1 + FEATURES.md | 1 + 2 files changed, 2 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 98514c811..32156cdce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ + Added Compact Bingo Chat Messages. + Added Compact Potion Effect Chat Messages. + Added Brewing Stand Overlay. ++ Added minion name display with minion tier. ### Changes + Don't render overlays when tab list key is pressed. diff --git a/FEATURES.md b/FEATURES.md index eb6d2c742..0788dd7c8 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -86,6 +86,7 @@ - A marker to the last opened minion for a couple of seconds (seen through walls) - Option to hide mob nametags close to minions. - Minion hopper coins per day display (Using the held coins in the hopper and the last time the hopper was collected to calculate the coins a hopper collects in a day) +- Minion name display with minion tier. ## Bazaar - Showing colors in the order inventory for outbid or fully bought/sold items. -- cgit From b73026ee953306fdbe4b4aa382aa83f15a12565d Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 7 Jan 2023 08:48:40 +0100 Subject: 0.14 --- CHANGELOG.md | 2 +- build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 32156cdce..51270877e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # SkyHanni - Change Log -## Version 0.13.1 +## Version 0.14 ### Features + Added /shtrackcollection - This tracks the number of items you collect, but it does not work with sacks. diff --git a/build.gradle.kts b/build.gradle.kts index 398adb850..9f6014f26 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.13.1" +version = "0.14" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java index 62ff318ae..f6190fb10 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java @@ -62,7 +62,7 @@ import java.util.List; public class SkyHanniMod { public static final String MODID = "skyhanni"; - public static final String VERSION = "0.13.1"; + public static final String VERSION = "0.14"; public static Features feature; -- cgit