diff options
author | Appability <appable@icloud.com> | 2023-01-11 21:06:21 -0800 |
---|---|---|
committer | Appability <appable@icloud.com> | 2023-01-11 21:06:21 -0800 |
commit | 6f20dde529a1db8f7590ab2521776b541ea88947 (patch) | |
tree | ce49218f64dc7936380db74b4be2b0430bd08bc3 | |
parent | e87a8136ec9e980f9ea735a45685a6e0c71adf1f (diff) | |
download | AmbientAddons-patch.tar.gz AmbientAddons-patch.tar.bz2 AmbientAddons-patch.zip |
change to metadata (dyeDamage seems to be 15 minus metadata? confusing)patch
also add another trapper thing
3 files changed, 10 insertions, 3 deletions
diff --git a/src/main/kotlin/com/ambientaddons/config/Config.kt b/src/main/kotlin/com/ambientaddons/config/Config.kt index a0f7c32..df56ea7 100644 --- a/src/main/kotlin/com/ambientaddons/config/Config.kt +++ b/src/main/kotlin/com/ambientaddons/config/Config.kt @@ -20,6 +20,7 @@ object Config : Vigilant( var autoTrapper = false var trapperEsp = false var trapperCooldown = 0 + var finneganActive = false var crimsonNotify = false var crimsonColor = Color.CYAN @@ -106,6 +107,11 @@ object Config : Vigilant( name = "Highlight trapper animals", description = "Highlights trapper quests with a beacon beam and box. Legal, as Hypixel uses the glowing status effect for clients that support it." ) + switch( + ::finneganActive, + name = "Finnegan active", + description = "Toggle whether Finnegan is active (30 second cooldown). This will be replaced with an API check in the future." + ) selector( ::trapperCooldown, name = "Show trapper cooldown", diff --git a/src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt b/src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt index 0d1f62d..4ff7761 100644 --- a/src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt +++ b/src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt @@ -7,6 +7,7 @@ import com.ambientaddons.utils.Extensions.chest import com.ambientaddons.utils.Extensions.items import com.ambientaddons.utils.Extensions.stripControlCodes import com.ambientaddons.utils.SBLocation +import gg.essential.universal.UChat import net.minecraft.item.EnumDyeColor import net.minecraftforge.client.event.ClientChatReceivedEvent import net.minecraftforge.client.event.GuiOpenEvent @@ -63,8 +64,8 @@ object MelodyHelper { val chest = event.gui.chest?.lowerChestInventory if (chest?.name != "Click the button on time!" || isThrottled) return val colors = chest.items.map { it?.itemDamage } - val targetPaneCol = colors.indexOf(EnumDyeColor.MAGENTA.dyeDamage) - val movingPaneIndex = colors.indexOf(EnumDyeColor.LIME.dyeDamage) + val targetPaneCol = colors.indexOf(EnumDyeColor.MAGENTA.metadata) + val movingPaneIndex = colors.indexOf(EnumDyeColor.LIME.metadata) val movingPaneCol = movingPaneIndex % 9 val clickSlot = (movingPaneIndex / 9) * 9 + 7 if (targetPaneCol != movingPaneCol) { diff --git a/src/main/kotlin/com/ambientaddons/features/misc/Trapper.kt b/src/main/kotlin/com/ambientaddons/features/misc/Trapper.kt index 7311b7b..5c3e00c 100644 --- a/src/main/kotlin/com/ambientaddons/features/misc/Trapper.kt +++ b/src/main/kotlin/com/ambientaddons/features/misc/Trapper.kt @@ -56,7 +56,7 @@ object Trapper { if (config.autoTrapper) { mc.thePlayer.sendChatMessage(command) } - cooldownEndTime = System.currentTimeMillis() + 30000 + cooldownEndTime = System.currentTimeMillis() + (if (config.finneganActive) 30000 else 60000) } val matchResult = event.message.formattedText.let { trapperRegex.find(it) } if (matchResult != null) { |