aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <nea@nea.moe>2023-03-19 17:58:54 +0100
committerGitHub <noreply@github.com>2023-03-19 17:58:54 +0100
commit86d6cc6bf29172fb13ed6aab2ca0676631336da9 (patch)
treed5e0fc0aa6a556c44f497d818f36e674a0f2e317 /src/main/java
parent4d3e68e8777ac174b938ad63c3367a20e99e06ac (diff)
parent6913b635b9d20cc6736aef64bad9f5d517a2f644 (diff)
downloadSkyHanni-yaw_snapping.tar.gz
SkyHanni-yaw_snapping.tar.bz2
SkyHanni-yaw_snapping.zip
Merge branch 'beta' into yaw_snappingyaw_snapping
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt26
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/Features.java22
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Ashfang.java16
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Bazaar.java2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Chat.java27
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/CommandsFeatures.java2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/DamageIndicator.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Diana.java2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Dungeon.java34
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Fishing.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Garden.java138
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Hidden.java7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java37
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/ItemAbilities.java4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Minions.java12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Misc.java33
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Mobs.java4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Summonings.java8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ApiDataLoader.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/HyPixelData.kt28
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/InventoryData.kt34
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/IslandType.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/SkillExperience.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ToolTipData.kt21
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/CollectionUpdateEvent.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/GardenToolChangeEvent.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/InventoryOpenEvent.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/LorenzToolTipEvent.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt25
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarCancelledBuyOrderClipboard.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarOrderHelper.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt45
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt21
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/CropMoneyDisplay.kt171
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/DicerRngDropCounter.kt130
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/EliteFarmingWeight.kt235
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt98
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenBestCropTime.kt84
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneDisplay.kt148
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenCustomKeybinds.kt47
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenDeskInSBMenu.kt51
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenInventoryNumbers.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt147
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextPlotPrice.kt10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt48
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorTimer.kt11
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/SkyMartBestProfit.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/JacobFarmingContestsInventory.kt162
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt57
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt51
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt57
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/MixinGuiContainer.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/MixinGuiNewChat.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt13
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt32
67 files changed, 1761 insertions, 478 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java
index d50326d5d..a61134c92 100644
--- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java
+++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java
@@ -73,7 +73,7 @@ import java.util.List;
public class SkyHanniMod {
public static final String MODID = "skyhanni";
- public static final String VERSION = "0.17.Beta.7";
+ public static final String VERSION = "0.17.Beta.19";
public static Features feature;
@@ -115,6 +115,7 @@ public class SkyHanniMod {
loadModule(new RenderGuiData());
loadModule(new GardenCropMilestones());
loadModule(new OwnInventoryData());
+ loadModule(new ToolTipData());
// APIs
loadModule(new BazaarApi());
@@ -216,6 +217,12 @@ public class SkyHanniMod {
loadModule(new GardenCustomKeybinds());
loadModule(new ChickenHeadTimer());
loadModule(new GardenOptimalSpeed());
+ loadModule(new GardenDeskInSBMenu());
+ loadModule(new GardenLevelDisplay());
+ loadModule(new EliteFarmingWeight());
+ loadModule(new DicerRngDropCounter());
+ loadModule(new CropMoneyDisplay());
+ loadModule(new JacobFarmingContestsInventory());
Commands.INSTANCE.init();
diff --git a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
index e79e60dfb..f86819895 100644
--- a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
@@ -1,11 +1,13 @@
package at.hannibal2.skyhanni.api
+import at.hannibal2.skyhanni.events.CollectionUpdateEvent
import at.hannibal2.skyhanni.events.InventoryOpenEvent
import at.hannibal2.skyhanni.events.ProfileApiDataLoadedEvent
import at.hannibal2.skyhanni.events.ProfileJoinEvent
import at.hannibal2.skyhanni.features.bazaar.BazaarApi
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.name
+import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.util.regex.Pattern
@@ -14,10 +16,19 @@ class CollectionAPI {
private val counterPattern = Pattern.compile("(?:.*) §e(.*)§6\\/(?:.*)")
private val singleCounterPattern = Pattern.compile("§7Total Collected: §e(.*)")
+ private val hypixelApiHasWrongItems = listOf(
+ "WOOL",
+ "CORRUPTED_FRAGMENT",
+ "EGG",
+ "POISONOUS_POTATO",
+ )
+
@SubscribeEvent
fun onProfileDataLoad(event: ProfileApiDataLoadedEvent) {
val profileData = event.profileData
- for ((rawName, rawCounter) in profileData["collection"].asJsonObject.entrySet()) {
+ val jsonElement = profileData["collection"]?: return
+ val asJsonObject = jsonElement.asJsonObject ?: return
+ for ((rawName, rawCounter) in asJsonObject.entrySet()) {
val counter = rawCounter.asLong
var itemName = BazaarApi.getBazaarDataForInternalName(rawName)?.itemName
if (rawName == "MUSHROOM_COLLECTION") {
@@ -29,16 +40,19 @@ class CollectionAPI {
if (rawName == "GEMSTONE_COLLECTION") {
itemName = "Gemstone"
}
+
// Hypixel moment
- if (rawName == "WOOL" || rawName == "CORRUPTED_FRAGMENT") {
- continue
- }
+ if (hypixelApiHasWrongItems.contains(rawName)) continue
+
if (itemName == null) {
- println("collection name is null for '$rawName'")
+ LorenzUtils.debug("collection name is null for '$rawName'")
+ println()
continue
}
collectionValue[itemName] = counter
}
+
+ CollectionUpdateEvent().postAndCatch()
}
@SubscribeEvent
@@ -59,6 +73,7 @@ class CollectionAPI {
collectionValue[name] = counter
}
}
+ CollectionUpdateEvent().postAndCatch()
}
if (inventoryName.endsWith(" Collections")) {
@@ -83,6 +98,7 @@ class CollectionAPI {
}
}
}
+ CollectionUpdateEvent().postAndCatch()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/config/Features.java b/src/main/java/at/hannibal2/skyhanni/config/Features.java
index c9ab200ca..e087b790c 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/Features.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/Features.java
@@ -203,6 +203,26 @@ public class Features extends Config {
editOverlay(activeConfigCategory, 200, 16, garden.optimalSpeedPos);
return;
}
+
+ if (runnableId.equals("gardenLevel")) {
+ editOverlay(activeConfigCategory, 200, 16, garden.gardenLevelPos);
+ return;
+ }
+
+ if (runnableId.equals("eliteFarmingWeight")) {
+ editOverlay(activeConfigCategory, 200, 16, garden.eliteFarmingWeightPos);
+ return;
+ }
+
+ if (runnableId.equals("dicerCounter")) {
+ editOverlay(activeConfigCategory, 200, 16, garden.dicerCounterPos);
+ return;
+ }
+
+ if (runnableId.equals("moneyPerHour")) {
+ editOverlay(activeConfigCategory, 200, 16, garden.moneyPerHourPos);
+ return;
+ }
}
@Expose
@@ -266,7 +286,7 @@ public class Features extends Config {
public Bingo bingo = new Bingo();
@Expose
- @Category(name = "Mobs", desc = "Visual Help for Mobs")
+ @Category(name = "Mobs", desc = "Visual help for Mobs")
public Mobs mobs = new Mobs();
@Expose
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Ashfang.java b/src/main/java/at/hannibal2/skyhanni/config/features/Ashfang.java
index 9708f5dd4..5c7c719ae 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Ashfang.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Ashfang.java
@@ -10,7 +10,7 @@ import com.google.gson.annotations.Expose;
public class Ashfang {
@Expose
- @ConfigOption(name = "Freeze", desc = "Show the cooldown how long Ashfang blocks all your abilities.")
+ @ConfigOption(name = "Freeze", desc = "Show the cooldown for how long Ashfang blocks your abilities.")
@ConfigEditorBoolean
public boolean freezeCooldown = false;
@@ -20,7 +20,7 @@ public class Ashfang {
public Position freezeCooldownPos = new Position(10, 10, false, true);
@Expose
- @ConfigOption(name = "Reset Time", desc = "Show the cooldown until ashfang pulls his underlings back.")
+ @ConfigOption(name = "Reset Time", desc = "Show the cooldown until Ashfang pulls his underlings back.")
@ConfigEditorBoolean
public boolean nextResetCooldown = false;
@@ -30,7 +30,7 @@ public class Ashfang {
public Position nextResetCooldownPos = new Position(10, 10, false, true);
@Expose
- @ConfigOption(name = "Gravity Orbs", desc = "Showing the Gravity Orbs more clearly.")
+ @ConfigOption(name = "Gravity Orbs", desc = "Shows the Gravity Orbs more clearly.")
@ConfigEditorBoolean
public boolean gravityOrbs = false;
@@ -40,7 +40,7 @@ public class Ashfang {
public String gravityOrbsColor = "0:120:255:85:85";
@Expose
- @ConfigOption(name = "Blazing Souls", desc = "Showing the Blazing Souls more clearly.")
+ @ConfigOption(name = "Blazing Souls", desc = "Shows the Blazing Souls more clearly.")
@ConfigEditorBoolean
public boolean blazingSouls = false;
@@ -50,22 +50,22 @@ public class Ashfang {
public String blazingSoulsColor = "0:245:85:255:85";
@Expose
- @ConfigOption(name = "Highlight Blazes", desc = "Highlight the different blazes in their respected color.")
+ @ConfigOption(name = "Highlight Blazes", desc = "Highlight the different blazes in their respective colors.")
@ConfigEditorBoolean
public boolean highlightBlazes = false;
@Expose
- @ConfigOption(name = "Hide Particles", desc = "Hide particles around the ashfang boss.")
+ @ConfigOption(name = "Hide Particles", desc = "Hide particles around the Ashfang boss.")
@ConfigEditorBoolean
public boolean hideParticles = false;
@Expose
- @ConfigOption(name = "Hide Names", desc = "Hide the name of full health blazes around ashfang (only useful when highlight blazes is enabled)")
+ @ConfigOption(name = "Hide Names", desc = "Hide the names of full health blazes around Ashfang (only useful when highlight blazes is enabled)")
@ConfigEditorBoolean
public boolean hideNames = false;
@Expose
- @ConfigOption(name = "Hide Damage", desc = "Hide damage splashes around ashfang.")
+ @ConfigOption(name = "Hide Damage", desc = "Hide damage splashes around Ashfang.")
@ConfigEditorBoolean
public boolean hideDamageSplash = false;
}
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Bazaar.java b/src/main/java/at/hannibal2/skyhanni/config/features/Bazaar.java
index 2e3ea2195..a324d2a86 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Bazaar.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Bazaar.java
@@ -29,7 +29,7 @@ public class Bazaar {
public boolean cancelledBuyOrderClipboard = true;
@Expose
- @ConfigOption(name = "Update Timer", desc = "A countdown timer for upcoming Bazzar data update.")
+ @ConfigOption(name = "Update Timer", desc = "A countdown timer for the next Bazaar data update.")
@ConfigEditorBoolean
public boolean updateTimer = false;
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java b/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java
index 4b4610d75..4eb0547d0 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java
@@ -8,7 +8,7 @@ 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.")
+ "new area discoveries, and bestiary 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 35c764116..b9f83a887 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java
@@ -7,7 +7,7 @@ import org.lwjgl.input.Keyboard;
public class Chat {
@Expose
- @ConfigOption(name = "Peek Chat", desc = "Hold this key to keep the chat open")
+ @ConfigOption(name = "Peek Chat", desc = "Hold this key to keep the chat open.")
@ConfigEditorKeybind(defaultKey = Keyboard.KEY_Z)
public int peekChat = Keyboard.KEY_Z;
@@ -29,7 +29,7 @@ public class Chat {
public boolean empty = true;
@Expose
- @ConfigOption(name = "Warping", desc = "Block 'sending request to join ..' and 'warping ..' messages.")
+ @ConfigOption(name = "Warping", desc = "Block 'sending request to join...' and 'warping...' messages.")
@ConfigEditorBoolean
@ConfigAccordionId(id = 0)
public boolean warping = true;
@@ -41,7 +41,7 @@ public class Chat {
public boolean welcome = true;
@Expose
- @ConfigOption(name = "Guild Exp", desc = "Hide Guild Exp messages.")
+ @ConfigOption(name = "Guild Exp", desc = "Hide guild exp messages.")
@ConfigEditorBoolean
@ConfigAccordionId(id = 0)
public boolean guildExp = true;
@@ -59,11 +59,24 @@ public class Chat {
public boolean winterGift = true;
@Expose
- @ConfigOption(name = "Powder Mining", desc = "Hide messages while opening chests in crystal hollows.")
+ @ConfigOption(name = "Powder Mining", desc = "Hide messages while opening chests in crystal hollows. " +
+ "(Except power numbers over 1k, Prehistoric Egg and Robotron Parts)")
@ConfigEditorBoolean
@ConfigAccordionId(id = 0)
public boolean powderMining = true;
+ @Expose
+ @ConfigOption(name = "Kill Combo", desc = "Hide messages about the current kill combo from the Grandma Wolf Pet.")
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 0)
+ public boolean killCombo = false;
+
+ @Expose
+ @ConfigOption(name = "Watchdog", desc = "Hide the message where hypixel is flexing how many players they have banned over the last week.")
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 0)
+ public boolean watchDog = true;
+
//TODO remove
@Expose
@ConfigOption(name = "Others", desc = "Hide other annoying messages.")
@@ -89,7 +102,7 @@ public class Chat {
public boolean chatFilter = false;
@Expose
- @ConfigOption(name = "Dungeon Filter", desc = "Hide annoying messages in the dungeon.")
+ @ConfigOption(name = "Dungeon Filter", desc = "Hide annoying messages in dungeons.")
@ConfigEditorBoolean
public boolean dungeonMessages = true;
@@ -99,8 +112,8 @@ public class Chat {
public boolean dungeonBossMessages = false;
@Expose
- @ConfigOption(name = "Hide Far Deaths", desc = "Hide the death messages of other players, " +
- "except for players who are close to the player, inside dungeon or during a Kuudra fight.")
+ @ConfigOption(name = "Hide Far Deaths", desc = "Hide other players' death messages, " +
+ "except for players who are nearby or during dungeons/a Kuudra fight.")
@ConfigEditorBoolean
public boolean hideFarDeathMessages = false;
//TODO jawbus + x
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/CommandsFeatures.java b/src/main/java/at/hannibal2/skyhanni/config/features/CommandsFeatures.java
index ed1ea7f56..385f471d7 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/CommandsFeatures.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/CommandsFeatures.java
@@ -7,7 +7,7 @@ import com.google.gson.annotations.Expose;
public class CommandsFeatures {
@Expose
- @ConfigOption(name = "Fandom Wiki", desc = "Using §ehypixel-skyblock.fandom.com §7instead of Hypixel wiki")
+ @ConfigOption(name = "Fandom Wiki", desc = "Use Fandom wiki (§ehypixel-skyblock.fandom.com§7) instead of the Hypixel wiki (§ewiki.hypixel.net§7).")
@ConfigEditorBoolean
public boolean useFandomWiki = false;
}
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/DamageIndicator.java b/src/main/java/at/hannibal2/skyhanni/config/features/DamageIndicator.java
index c392edeba..a491090d4 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/DamageIndicator.java
+++ b/src/main/java/at/hannibal2/skyhanni/con