From 0f6e221ee30423c3e3579c5aa7deac17f8be82f4 Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Mon, 19 Feb 2024 20:34:48 +0100 Subject: [PATCH 1/8] Improved Packet Test. #1004 --- .../java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- .../skyhanni/config/commands/Commands.kt | 2 +- .../at/hannibal2/skyhanni/test/PacketTest.kt | 149 ++++++++++++------ 3 files changed, 101 insertions(+), 52 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 9cc394cad8fe..09629c07c927 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -756,7 +756,7 @@ class SkyHanniMod { loadModule(FixGhostEntities) loadModule(CopyNearbyParticlesCommand) loadModule(ButtonOnPause()) - loadModule(PacketTest()) + loadModule(PacketTest) loadModule(TestBingo) loadModule(TestCopyRngMeterValues) loadModule(TestCopyBestiaryValues) diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index 5283c0c6e386..b196bb63434b 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -392,7 +392,7 @@ object Commands { "shcopyparticles", "Copied information about the particles that spawn in the next 50ms to the clipboard" ) { CopyNearbyParticlesCommand.command(it) } - registerCommand("shtestpacket", "Logs incoming and outgoing packets to the console") { PacketTest.toggle() } + registerCommand("shtestpacket", "Logs incoming and outgoing packets to the console") { PacketTest.command(it) } registerCommand( "shtestmessage", "Sends a custom chat message client side in the chat" diff --git a/src/main/java/at/hannibal2/skyhanni/test/PacketTest.kt b/src/main/java/at/hannibal2/skyhanni/test/PacketTest.kt index c9fecaf08aa3..fdf023a068d1 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/PacketTest.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/PacketTest.kt @@ -6,6 +6,8 @@ import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.LorenzVec +import at.hannibal2.skyhanni.utils.NumberUtil.isInt +import at.hannibal2.skyhanni.utils.ReflectionUtils.makeAccessible import at.hannibal2.skyhanni.utils.getLorenzVec import at.hannibal2.skyhanni.utils.toLorenzVec import net.minecraft.client.Minecraft @@ -18,6 +20,7 @@ import net.minecraft.network.play.server.S0CPacketSpawnPlayer import net.minecraft.network.play.server.S0EPacketSpawnObject import net.minecraft.network.play.server.S0FPacketSpawnMob import net.minecraft.network.play.server.S12PacketEntityVelocity +import net.minecraft.network.play.server.S13PacketDestroyEntities import net.minecraft.network.play.server.S14PacketEntity import net.minecraft.network.play.server.S18PacketEntityTeleport import net.minecraft.network.play.server.S19PacketEntityHeadLook @@ -31,15 +34,38 @@ import net.minecraft.network.play.server.S2APacketParticles import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class PacketTest { - companion object { +object PacketTest { - private var enabled = false + private var enabled = false + private var full = false - fun toggle() { - enabled = !enabled - ChatUtils.chat("Packet test: $enabled") + private val entityMap = mutableMapOf>>() + + fun command(args: Array) { + if (args.size == 1 && args[0].isInt()) { + sendEntityPacketData(args[0].toInt()) + return + } + if (args.size == 1 && (args[0] == "full" || args[0] == "all")) { + full = !full + ChatUtils.chat("Packet test full: $full") + return + } + + toggle() + } + + private fun sendEntityPacketData(id: Int) { + ChatUtils.chat("Packet Entity Data: $id") + entityMap[id]?.forEach { + it.print() } + println("End of Data") + } + + private fun toggle() { + enabled = !enabled + ChatUtils.chat("Packet test: $enabled") } @SubscribeEvent @@ -67,7 +93,19 @@ class PacketTest { fun onChatPacket(event: PacketEvent.ReceiveEvent) { if (!enabled) return val packet = event.packet - val packetName = packet.javaClass.simpleName + packet.print() + if (packet is S13PacketDestroyEntities) { + packet.entityIDs.forEach { + entityMap.getOrDefault(it, mutableListOf()).add(packet) + } + } else { + val id = packet.getEntityId() ?: return + entityMap.getOrDefault(id, mutableListOf()).add(packet) + } + } + + private fun Packet<*>.print() { + val packetName = javaClass.simpleName // Keep alive if (packetName == "S00PacketKeepAlive") return @@ -94,54 +132,58 @@ class PacketTest { // Others if (packetName == "S29PacketSoundEffect") return -// if (packetName == "S2APacketParticles") return + if (!full && packetName == "S2APacketParticles") return // Entity - if (packetName == "S13PacketDestroyEntities") return + if (this is S13PacketDestroyEntities) { + println("Receive: $packetName with IDs: ${entityIDs.joinToString(", ")}") + return + } - if (packetName == "S18PacketEntityTeleport") return - if (packetName == "S15PacketEntityRelMove") return - if (packetName == "S04PacketEntityEquipment") return + if (!full) { + if (packetName == "S18PacketEntityTeleport") return + if (packetName == "S15PacketEntityRelMove") return + if (packetName == "S04PacketEntityEquipment") return + if (packetName == "S17PacketEntityLookMove") return + if (packetName == "S19PacketEntityHeadLook") return + if (packetName == "S16PacketEntityLook") return + if (packetName == "S12PacketEntityVelocity") return + if (packetName == "S1CPacketEntityMetadata") return + if (packetName == "S20PacketEntityProperties") return + if (packetName == "S0BPacketAnimation") return + } // if (packetName == "S0EPacketSpawnObject") return -// if (packetName == "S0BPacketAnimation") return // if (packetName == "S06PacketUpdateHealth") return -// if (packetName == "S17PacketEntityLookMove") return -// if (packetName == "S16PacketEntityLook") return -// if (packetName == "S19PacketEntityHeadLook") return // if (packetName == "S1DPacketEntityEffect") return -// if (packetName == "S12PacketEntityVelocity") return // if (packetName == "S19PacketEntityStatus") return -// if (packetName == "S1CPacketEntityMetadata") return -// if (packetName == "S20PacketEntityProperties") return // if (packetName == "S1BPacketEntityAttach") return - val id = getEntityId(packet) - val entity = getEntity(packet, id) - val distance = getDistance(getLocation(packet, entity)) - if (distance > 10) return + buildString { + append("Receive: $packetName") - if (entity != null) { - if (entity == Minecraft.getMinecraft().thePlayer) { -// println("own: $distance $packetName") - return - } else { - println("other: $distance") - } - } else { + val id = getEntityId() if (id != null) { - return + append(" ID: $id") } -// if (packetName.contains("")) { -// -// } - println("entity is null.") - } + val entity = getEntity(this@print, id) + val distance = getDistance(getLocation(this@print, entity)) -// println("distance: $distance") - println("Receive: $packetName") - println(" ") + if (entity != null) { + if (entity == Minecraft.getMinecraft().thePlayer) { + append(" own") + return@buildString + } else { + append(" distance: $distance other") + } + } else { + if (id == null) { + return@buildString + } + append(" entity is null.") + } + }.let { println(it) } } private fun getDistance(location: LorenzVec?): Double { @@ -194,16 +236,23 @@ class PacketTest { return null } - private fun getEntityId(packet: Packet<*>) = when (packet) { - is S1CPacketEntityMetadata -> packet.entityId - is S20PacketEntityProperties -> packet.entityId - is S04PacketEntityEquipment -> packet.entityID - is S12PacketEntityVelocity -> packet.entityID - is S1BPacketEntityAttach -> packet.entityId - is S0BPacketAnimation -> packet.entityID - is S18PacketEntityTeleport -> packet.entityId - is S1DPacketEntityEffect -> packet.entityId - + private fun Packet<*>.getEntityId() = when (this) { + is S1CPacketEntityMetadata -> entityId + is S20PacketEntityProperties -> entityId + is S04PacketEntityEquipment -> entityID + is S12PacketEntityVelocity -> entityID + is S1BPacketEntityAttach -> entityId + is S0BPacketAnimation -> entityID + is S18PacketEntityTeleport -> entityId + is S1DPacketEntityEffect -> entityId + is S0CPacketSpawnPlayer -> entityID + is S0FPacketSpawnMob -> entityID + is S0EPacketSpawnObject -> entityID + is S19PacketEntityHeadLook -> javaClass.getDeclaredField("entityId").makeAccessible().get(this) as Int + is S19PacketEntityStatus -> javaClass.getDeclaredField("entityId").makeAccessible().get(this) as Int + /* is S14PacketEntity.S15PacketEntityRelMove -> packet.javaClass.getDeclaredField("entityId").makeAccessible().get(packet) as Int + is S14PacketEntity.S16PacketEntityLook -> packet.javaClass.getDeclaredField("entityId").makeAccessible().get(packet) as Int + is S14PacketEntity.S17PacketEntityLookMove -> packet.javaClass.getDeclaredField("entityId").makeAccessible().get(packet) as Int */ else -> null } } From ac6f7f65e4ddcc2c6e0c24020629593089e0d379 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 19 Feb 2024 20:38:13 +0100 Subject: [PATCH 2/8] Fixed fishing profit tracker stop working when trophy fishing for 10 minutes. --- .../skyhanni/features/fishing/FishingAPI.kt | 34 ------------------- .../fishing/tracker/FishingProfitTracker.kt | 3 -- 2 files changed, 37 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt index 173f5a0d277a..a3d3a1cb7abe 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt @@ -1,14 +1,9 @@ package at.hannibal2.skyhanni.features.fishing import at.hannibal2.skyhanni.events.FishingBobberCastEvent -import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.ItemInHandChangeEvent -import at.hannibal2.skyhanni.events.SkillExpGainEvent -import at.hannibal2.skyhanni.features.fishing.tracker.FishingProfitTracker import at.hannibal2.skyhanni.features.fishing.trophy.TrophyFishManager import at.hannibal2.skyhanni.features.fishing.trophy.TrophyFishManager.getFilletValue import at.hannibal2.skyhanni.features.fishing.trophy.TrophyRarity -import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name @@ -25,7 +20,6 @@ import net.minecraft.init.Blocks import net.minecraft.item.ItemStack import net.minecraftforge.event.entity.EntityJoinWorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import kotlin.time.Duration.Companion.seconds object FishingAPI { @@ -33,7 +27,6 @@ object FishingAPI { private val waterBlocks = listOf(Blocks.water, Blocks.flowing_water) var lastCastTime = SimpleTimeMark.farPast() - var lastActiveFishingTime = SimpleTimeMark.farPast() @SubscribeEvent fun onJoinWorld(event: EntityJoinWorldEvent) { @@ -46,33 +39,6 @@ object FishingAPI { FishingBobberCastEvent(entity).postAndCatch() } - @SubscribeEvent - fun onItemInHandChange(event: ItemInHandChangeEvent) { - if (event.oldItem.isFishingRod()) { - lastActiveFishingTime = SimpleTimeMark.now() - } - if (event.newItem.isFishingRod()) { - DelayedRun.runDelayed(1.seconds) { - lastActiveFishingTime = SimpleTimeMark.now() - } - } - } - - @SubscribeEvent - fun onSkillExpGain(event: SkillExpGainEvent) { - val skill = event.skill - if (FishingProfitTracker.isEnabled()) { - if (skill != "fishing") { - lastActiveFishingTime = SimpleTimeMark.farPast() - } - } - } - - @SubscribeEvent - fun onIslandChange(event: IslandChangeEvent) { - lastActiveFishingTime = SimpleTimeMark.farPast() - } - fun hasFishingRodInHand() = InventoryUtils.itemInHandId.isFishingRod() fun NEUInternalName.isFishingRod() = contains("ROD") diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt index 33ad68dcdb96..7cab35c6be07 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt @@ -27,7 +27,6 @@ import at.hannibal2.skyhanni.utils.tracker.SkyHanniTracker import com.google.gson.annotations.Expose import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.milliseconds -import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds typealias CategoryName = String @@ -194,8 +193,6 @@ object FishingProfitTracker { } private fun maybeAddItem(internalName: NEUInternalName, amount: Int) { - if (FishingAPI.lastActiveFishingTime.passedSince() > 10.minutes) return - if (!isAllowedItem(internalName)) { ChatUtils.debug("Ignored non-fishing item pickup: $internalName'") return From eb961f2921291b13e533facd4faf5218ac631bab Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 19 Feb 2024 20:51:35 +0100 Subject: [PATCH 3/8] improved readability --- .../features/fishing/tracker/FishingProfitTracker.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt index 7cab35c6be07..9d901f08ae5a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt @@ -180,11 +180,9 @@ object FishingProfitTracker { if (!isEnabled()) return val recentPickup = config.showWhenPickup && lastCatchTime.passedSince() < 3.seconds - if (!recentPickup) { - if (!FishingAPI.isFishing()) return + if (recentPickup || FishingAPI.isFishing()) { + tracker.renderDisplay(config.position) } - - tracker.renderDisplay(config.position) } @SubscribeEvent From 6c880d46f4104b45a20d25b739d33645442b0933 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 19 Feb 2024 21:00:20 +0100 Subject: [PATCH 4/8] Version 0.23 Beta 21 --- CHANGELOG.md | 22 +++++++++++++++++++ FEATURES.md | 2 ++ build.gradle.kts | 2 +- .../java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48eaae38b8b7..2bcfa6787b1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,8 @@ + Show pet items XP Share and Tier Boost as small icons next to the pet in an inventory. - Thunderblade73 + Added Shift Click Brewing. - Thunderblade73 + Makes normal clicks to shift clicks in Brewing Stand inventory. ++ Low Quiver Notification. - CarsCupcake + + This will notify you via title if your quiver is low on arrows according to chat message. #### Item Features @@ -111,6 +113,8 @@ + Updating the Garden Optimal Speed Display and Warning immediately when changing the setting. - hannibal2 + Added auto mouse-unlocking on plot teleport in garden. - martimavocado + Improve items in sacks display in Visitor Shopping List wording and color. - alexia ++ Hide Garden Composter reminder while participating in a Farming Contest. - hannibal2 ++ Improve Exportable Carrots/Expired Pumpkin tooltip in /ff. - alexia #### Rift Changes @@ -220,6 +224,7 @@ + Fixed Sensitivity Reducer still working when switching from the garden to the hub. - martimavocado + Fixed a rare farming weight API error. - CalMWolfs + Fixed mouse rotation unlocks after doing /warp garden with Sensitivity Reducer on. - martimavocado ++ Fixed wording of composter fuel warning. - alexia #### Combat Fixes @@ -270,6 +275,8 @@ + Fixed Reindrake mob, Frosty NPC and frosty the snow blaster shop counting as sea creatures in the barn fishing timer. - hannibal2 + Fixed trophy fish chat message detection. - Empa ++ Fixed Sheep pet triggering Geyser Box and fixed particles being permanently hidden after throwing bobber at it once. - Empa ++ Fixed fishing profit tracker stops working when trophy fishing for 10 minutes. - hannibal2 #### Invenory Fixes @@ -285,6 +292,9 @@ + Fixed shift-click NPC sell not working for menus with different sizes and full inventories. - Thunderblade73 + Fixed an error with the shift-click NPC sell feature. - Thunderblade73 + Ignore Shift-Click NPC Sell when right-clicking a sack. - Thunderblade73 ++ Fixed pet level stack size - Thunderblade73 ++ Fixed enchantment names and pet names in the chest value feature. - hannibal2 ++ Fixed pet names in item profit trackers. - hannibal2 #### Bingo Fixes @@ -304,6 +314,7 @@ + Fixed render overlapping problem with chat, SkyHanni GUIs and title. - Thunderblade73 + Fixed GUI positions moving into the bottom-right corner when leaving the GUI position editor while pressing the mouse button on next reopen. - hannibal2 ++ Fixed parts of Compact Tab List being uncoloured. - CalMWolfs #### Winter Fixes @@ -388,6 +399,17 @@ + Fixed an NPE in ReflectionUtils.shPackageName. - Thunderblade73 + Cleaned up string pluralization methods. - alexia + Moved many regex patterns in the repo and code cleanup. - CalMWolfs ++ Improved purse pattern. - j10a1n15 ++ Added cache to item stack → neu internal name. - hannibal2 ++ Added cache to internal name → item name. - hannibal2 ++ Added debug option to show SkyHanni item name in item lore. - hannibal2 ++ Created ActionBarUpdateEvent and used it. - CalMWolfs ++ Added Rounded Rectangles Renderable. - VixidDev ++ Added progress Bar Renderable. - Thunderblade73 ++ Added Horizontal Container Renderable. - Thunderblade73 ++ Added GetFromSackAPI. - Thunderblade73 ++ Improved Packet Test. - Thunderblade73 ++ Increases the feature set of the packet test and improves usability. ## Version 0.22 diff --git a/FEATURES.md b/FEATURES.md index 78d704ded4d2..939814d0c214 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -147,6 +147,8 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Show pet items XP Share and Tier Boost as small icons next to the pet in an inventory. - Thunderblade73 + Shift Click Brewing. - Thunderblade73 + Makes normal clicks to shift clicks in Brewing Stand inventory. ++ Low Quiver Notification. - CarsCupcake + + This will notify you via title if your quiver is low on arrows according to chat message.
diff --git a/build.gradle.kts b/build.gradle.kts index c3a6bdcc710a..be9ec6eaad62 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,7 +14,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.23.Beta.20" +version = "0.23.Beta.21" val gitHash by lazy { val baos = ByteArrayOutputStream() diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 09629c07c927..062740d2d125 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -389,7 +389,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.23.Beta.20", + version = "0.23.Beta.21", ) class SkyHanniMod { From bf1d0bcf5dba383b9699a663d4014e1faa988c9e Mon Sep 17 00:00:00 2001 From: Empa <42304516+ItsEmpa@users.noreply.github.com> Date: Tue, 20 Feb 2024 17:43:09 +0100 Subject: [PATCH 5/8] Discord FaQ formatting changes #1033 --- DISCORD_FAQ.md | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/DISCORD_FAQ.md b/DISCORD_FAQ.md index 00d89bfd887f..ec3e5dc8816b 100644 --- a/DISCORD_FAQ.md +++ b/DISCORD_FAQ.md @@ -1,7 +1,7 @@ _Frequently Asked Questions_ > **1: How do I open the SkyHanni Menu?** -> Use the command `/sh` +> Use the command `/sh`. > **2: Why does SkyHanni tell me to update NotEnoughUpdates (NEU) even if I already have the latest version?** > To make the mod work, you need to use the latest version from <#1123201092193366027>. @@ -11,45 +11,48 @@ _Frequently Asked Questions_ > Do `/sh scale` to change the global GUI scale of all elements at once. > **4: My Garden Crop Milestones are not accurate. What should I do?** -> To sync your Crop Milestones with SkyHanni, open /cropmilestones once. +> To sync your Crop Milestones with SkyHanni, open `/cropmilestones` once. > **5: How can I move GUIs like Coins/Copper in SkyMart?** > Use the command `/sh open hotkey` to set a hotkey, and press it inside the GUI you want to move. -> **6: Will SkyHanni support Minecraft versions 1.19 or 1.20? (Foraging Update)** +> **6: Will SkyHanni support Minecraft versions 1.20? (Foraging Update)** > The Foraging update isn't expected to release for several months. -> Thus, we'll wait for other mods in the community to update for Minecraft versions 1.19 or 1.20. -> Switching from 1.8.9 to 1.19 will take some time, and we plan to discontinue support for 1.8.9 afterward since we won't support multiple versions at once. +> Thus, we'll wait for other mods in the community to update for Minecraft version 1.20. +> Switching from 1.8.9 to 1.20 will take some time, and we plan to discontinue support for 1.8.9 afterward since we won't support multiple versions at once. > **7: My Jacob Contest Display crops are wrong, how do I fix this?** -> Run the command `/shclearcontestdata` to clear the Jacob contenst data. +> Run the command `/shclearcontestdata` to clear the Jacob contest data. > **8: How can I get bigger crop hit boxes?** -> Use [Patcher]() to have 1.12 hit boxes in 1.8.9. +> Use [Patcher]() to have 1.12 hitboxes in 1.8.9. > **9: Why does my Item Tracker feature not track this item?** > 1. Check if the item goes directly into your sacks. > 2. If it does, enable the sack pickup chat message from Hypixel: -> 3. Go to `hypixel settings --> personal -> chat feedback` and enable `sack notifications` -> 4. If you want the [Sacks] messages to be hidden, do `/sh sacks hider` and enable that +> - Go to `Hypixel Settings --> Personal -> Chat Feedback` and enable `Sack Notifications`. +> 3. If you want the [Sacks] messages to be hidden, do `/sh sacks hider` and enable that. > **10: How do I remove SkyHanni GUI elements?** -> 1. Type `/sh gui` -> 2. Hover over the UI element -> 3. See the element name in the top center of screen -> 4. Search for that element with /sh name -> 5. Disable this feature +> 1. Type `/sh gui`. +> 2. Hover over the UI element. +> 3. See the element name in the top center of screen. +> 4. Search for that element with `/sh `. +> 5. Disable this feature. > **11: How do I reset a SkyHanni tracker?** > 1. Do you want to **view only the current session**? -> 2. Open the inventory (Press E) and hover over the display. -> 3. Then click on [session]. -> 1. Do you want to **remove one specific item** from the tracker? -> 2. Open the inventory (Press E) and hover over the display. -> 3. Then shift-click on an item in the list to remove it. -> 1. Do you want to reset the total stats of a tracker? -> 2. To reset a tracker, use the in-game command /shcommands . -> 3. Execute the obtained command to reset the tracker. +> - Open the inventory (Press E) and hover over the display. +> - Then click on `[This Session]`. +> 2. Do you want to **reset the current session**? +> - Open the inventory (Press E) and hover over the display. +> - Then click on `Reset Session!`. +> 3. Do you want to **remove one specific item** from the tracker? +> - Open the inventory (Press E) and hover over the display. +> - Then shift-click on an item in the list to remove it. +> 4. Do you want to reset the total stats of a tracker? +> - To reset a tracker, use the in-game command `/shcommands `. +> - Execute the obtained command to reset the tracker. *This FAQ was last updated on February 5th, 2024. From 0afd88ff901b70017e74c95d11818fe46d5a2574 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 20 Feb 2024 17:44:16 +0100 Subject: [PATCH 6/8] add new update date to faq --- DISCORD_FAQ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DISCORD_FAQ.md b/DISCORD_FAQ.md index ec3e5dc8816b..9b33b02195bb 100644 --- a/DISCORD_FAQ.md +++ b/DISCORD_FAQ.md @@ -55,5 +55,5 @@ _Frequently Asked Questions_ > - Execute the obtained command to reset the tracker. -*This FAQ was last updated on February 5th, 2024. +*This FAQ was last updated on February 20th, 2024. If you believe there's something that should be added to this list, please tell us, so we can add it.* From b7869646ae203cb129cb6e626643ce3f31080907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linnea=20Gr=C3=A4f?= Date: Tue, 20 Feb 2024 17:57:18 +0100 Subject: [PATCH 7/8] Added shader reload capabilities for chroma resource packs. #958 --- .../hannibal2/skyhanni/utils/shader/Shader.kt | 95 +++++++++++++------ 1 file changed, 64 insertions(+), 31 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/shader/Shader.kt b/src/main/java/at/hannibal2/skyhanni/utils/shader/Shader.kt index 6a95655ca71f..f846c3d4d025 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/shader/Shader.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/shader/Shader.kt @@ -2,11 +2,14 @@ package at.hannibal2.skyhanni.utils.shader import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.LorenzUtils -import java.util.function.Supplier +import net.minecraft.client.Minecraft +import net.minecraft.client.renderer.OpenGlHelper +import net.minecraft.client.resources.IReloadableResourceManager import net.minecraft.client.shader.ShaderLinkHelper import org.apache.commons.lang3.StringUtils import org.lwjgl.opengl.GL11 import org.lwjgl.opengl.OpenGLException +import java.util.function.Supplier /** * Superclass for shader objects to compile and attach vertex and fragment shaders to the shader program @@ -15,44 +18,74 @@ import org.lwjgl.opengl.OpenGLException * * Credit: [Shader.java](https://github.com/BiscuitDevelopment/SkyblockAddons/blob/main/src/main/java/codes/biscuit/skyblockaddons/shader/Shader.java) */ -abstract class Shader(vertex: String, fragment: String) { +abstract class Shader(val vertex: String, val fragment: String) { + + var shaderProgram: Int = -1 + private var vertexShaderID: Int = -1 + private var fragmentShaderID: Int = -1 - var shaderProgram: Int = ShaderLinkHelper.getStaticShaderLinkHelper().createProgram() private val uniforms: MutableList> = mutableListOf() var created = false init { - run { - val vertexShaderID = ShaderManager.loadShader(ShaderType.VERTEX, vertex).also { if (it == -1) return@run } - ShaderManager.attachShader(shaderProgram, vertexShaderID) - - val fragmentShaderID = ShaderManager.loadShader(ShaderType.FRAGMENT, fragment).also { if (it == -1) return@run } - ShaderManager.attachShader(shaderProgram, fragmentShaderID) - - ShaderHelper.glLinkProgram(shaderProgram) - - if (ShaderHelper.glGetProgrami(shaderProgram, ShaderHelper.GL_LINK_STATUS) == GL11.GL_FALSE) { - val errorMessage = "Failed to link vertex shader $vertex and fragment shader $fragment. Features that " + - "utilise this shader will not work correctly, if at all." - val errorLog = StringUtils.trim(ShaderHelper.glGetShaderInfoLog(shaderProgram, 1024)) - - if (ShaderManager.inWorld()) { - ErrorManager.logErrorWithData( - OpenGLException("Shader linking error."), - errorMessage, - "Link Error:\n" to errorLog - ) - } else { - LorenzUtils.consoleLog("$errorMessage $errorLog") - } - - return@run - } + recompile() + (Minecraft.getMinecraft().resourceManager as IReloadableResourceManager).registerReloadListener { + recompile() + } + } - this.registerUniforms() - created = true + fun deleteOldShaders() { + if (vertexShaderID >= 0) { + OpenGlHelper.glDeleteShader(vertexShaderID) + vertexShaderID = -1 + } + if (fragmentShaderID >= 0) { + OpenGlHelper.glDeleteShader(fragmentShaderID) + fragmentShaderID = -1 } + if (shaderProgram >= 0) { + OpenGlHelper.glDeleteProgram(shaderProgram) + shaderProgram = -1 + } + uniforms.clear() + created = false + } + + fun recompile() { + deleteOldShaders() + shaderProgram = ShaderLinkHelper.getStaticShaderLinkHelper().createProgram() + if (shaderProgram < 0) return + + vertexShaderID = ShaderManager.loadShader(ShaderType.VERTEX, vertex) + if (vertexShaderID < 0) return + ShaderManager.attachShader(shaderProgram, vertexShaderID) + + fragmentShaderID = ShaderManager.loadShader(ShaderType.FRAGMENT, fragment) + if (fragmentShaderID < 0) return + ShaderManager.attachShader(shaderProgram, fragmentShaderID) + + ShaderHelper.glLinkProgram(shaderProgram) + + if (ShaderHelper.glGetProgrami(shaderProgram, ShaderHelper.GL_LINK_STATUS) == GL11.GL_FALSE) { + val errorMessage = "Failed to link vertex shader $vertex and fragment shader $fragment. Features that " + + "utilise this shader will not work correctly, if at all." + val errorLog = StringUtils.trim(ShaderHelper.glGetShaderInfoLog(shaderProgram, 1024)) + + if (ShaderManager.inWorld()) { + ErrorManager.logErrorWithData( + OpenGLException("Shader linking error."), + errorMessage, + "Link Error:\n" to errorLog + ) + } else { + LorenzUtils.consoleLog("$errorMessage $errorLog") + } + return + } + + this.registerUniforms() + created = true } abstract fun registerUniforms() From 5e83fa9cd9d53f6a7f9d702e77a0873db3487b8f Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Tue, 20 Feb 2024 17:59:42 +0100 Subject: [PATCH 8/8] Fixed Queued Gfs description. #1031 --- .../skyhanni/config/features/inventory/GetFromSackConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/GetFromSackConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/GetFromSackConfig.java index 9454bd3fe564..af6942176381 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/GetFromSackConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/GetFromSackConfig.java @@ -8,7 +8,7 @@ public class GetFromSackConfig { @Expose - @ConfigOption(name = "Queued GfS", desc = "If §e/gfs §for §e/getfromsacks §fis used it queues up the commands so all items are guarantied to be received.") + @ConfigOption(name = "Queued GfS", desc = "If §e/gfs §7or §e/getfromsacks §7is used it queues up the commands so all items are guarantied to be received.") @ConfigEditorBoolean @FeatureToggle public boolean queuedGFS = true;