Skip to content

Commit

Permalink
Merge branch 'hannibal002:beta' into customscoreboard
Browse files Browse the repository at this point in the history
  • Loading branch information
j10a1n15 authored Nov 25, 2023
2 parents fc1f06c + 8615ad0 commit ee1f956
Show file tree
Hide file tree
Showing 166 changed files with 1,920 additions and 883 deletions.
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SkyHanni - Change Log

## Version 0.21.1 (unreleased)
## Version 0.21.1

### New Features

Expand All @@ -14,7 +14,6 @@

### Changes


#### Garden Changes

+ Added mythic/Maeve visitor support. - walker & hannibal2
Expand All @@ -25,13 +24,20 @@
+ Use the crop fortune from tab in Farming Fortune HUD. - alexia
+ Shows the last saved ff value in gray while switching tools instead of the question mark. - hannibal2
+ Removed chat message that your crop milestone data is correct. - hannibal2
+ Removed the message when crop milestones look different in the menu than stored SkyHanni data. - hannibal2
+ We already have the correct data now, and Hypixel rounds the numbers in the menu poorly.
+ Only show the Total Crop Milestone info in crop milestone inventory when below tier 20. - hannibal2
+ Hypixel now has their own line for the same information for tier 20+
+ Make the FF Display only visible while holding a farming tool in hand. - hannibal2
+ Hide in crop milestone display the line with time remaining entirely when the milestone is maxed. - hannibal2

#### Other Changes

+ Added guess seconds to the Visitor Timer when the tab list doesn't show seconds. - hannibal2
+ Add option to hide the chat message when toggling /shmouselock. - hannibal2
+ Reminds to use the GUI Position Editor hotkey. - hannibal2
+ Reminds every 30 minutes after using /sh gui or clicking the GUI edit button.
+ Added Bookworm Book to the Estimated Item Value feature. - jani

### Fixes

Expand All @@ -52,6 +58,11 @@
+ Added cooldown to prevent spam clicking on farming weight buttons to open many web pages. - hannibal2
+ Fixed clickable farming weight GUI no longer opens #1000 in lb website. - hannibal2
+ Fixed /ff upgrade suggests updating bustling reforge even when no farming armor is found. - hannibal2
+ Fixed maxed sunder fortune in the /ff stats breakdown. - alexia
+ Fixed the farming contest summary not showing when the crop is buffed by Anita Talisman/Ring/Artifact. - hannibal2
+ Fixed Farming Fortune Display not showing for non crop-specific tools. - hannibal2
+ Fixed green thumb fortune in /ff to include Maeve. - hannibal2
+ Fixed crops per second and time remaining not using the 100 base ff in their formula. - alexia

#### Other Fixes

Expand All @@ -64,6 +75,8 @@
+ Fixed Sack Display sometimes not formatting a million correctly. - Hize
+ Fixed Estimated Item Value getting shown in stats breakdown menu. - hannibal2
+ Fixed a bug with the ender chest and SkyHanni GUI editor. - hannibal2
+ Fixed crimson isle faction icon in tab list showing twice and not going away fully when enabling the "hide faction"
option of advanced player list. - hannibal2

### Technical Details

Expand All @@ -80,6 +93,14 @@
+ The new data gets compared to the currently saved data, differences are getting replaced and the result gets put
into the clipboard. The clipboard context can be used to update the repo content.

### Removed Features

+ Removed 100 Farming Fortune from "Show As Drop Multiplier" from all displays (also known as "base ff"). - hannibal2
+ This can cause some numbers to show 100 FF too much. Simply update the values to fix it.
+ Those "base FF" values were never really part of your farming fortune stats. They are just a result of looking at
the crop drop formula. SkyHanni used those values to be more comparable with other Discord Bots and spreadsheets.
This also caused confusion, so we have removed it entirely now.

## Version 0.21

### New Features
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
}

group = "at.hannibal2.skyhanni"
version = "0.21.1.Beta.6"
version = "0.21.1"

// Toolchains:
java {
Expand Down
34 changes: 17 additions & 17 deletions src/main/java/SkyHanniInstallerFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ private JLabel getPictureLabel() {
margin = 5;

BufferedImage myPicture = ImageIO.read(Objects.requireNonNull(getClass()
.getClassLoader()
.getResourceAsStream("assets/skyhanni/logo.png"), "Logo not found."));
.getClassLoader()
.getResourceAsStream("assets/skyhanni/logo.png"), "Logo not found."));
Image scaled = myPicture.getScaledInstance(w - margin * 2, h - margin, Image.SCALE_SMOOTH);
logo = new JLabel(new ImageIcon(scaled));
logo.setName("Logo");
Expand Down Expand Up @@ -222,8 +222,8 @@ private JTextArea getTextArea() {
descriptionText.setOpaque(false);
descriptionText.setPreferredSize(new Dimension(w - margin * 2, h - margin));
descriptionText.setText(
"This installer will copy SkyHanni into your forge mods folder for you, and replace any old versions that already exist. " +
"Close this if you prefer to do this yourself!");
"This installer will copy SkyHanni into your forge mods folder for you, and replace any old versions that already exist. " +
"Close this if you prefer to do this yourself!");
descriptionText.setWrapStyleWord(true);

y += h;
Expand Down Expand Up @@ -251,7 +251,7 @@ private JTextArea getForgeTextArea() {
forgeDescriptionText.setOpaque(false);
forgeDescriptionText.setPreferredSize(new Dimension(w - margin * 2, h - margin));
forgeDescriptionText.setText(
"However, you still need to install Forge client in order to be able to run this mod. Click here to visit the download page for Forge 1.8.9!");
"However, you still need to install Forge client in order to be able to run this mod. Click here to visit the download page for Forge 1.8.9!");
forgeDescriptionText.setForeground(Color.BLUE.darker());
forgeDescriptionText.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
forgeDescriptionText.setWrapStyleWord(true);
Expand Down Expand Up @@ -315,8 +315,8 @@ private JButton getButtonFolder() {

try {
BufferedImage myPicture = ImageIO.read(Objects.requireNonNull(getClass()
.getClassLoader()
.getResourceAsStream("assets/skyhanni/folder.png"), "Folder icon not found."));
.getClassLoader()
.getResourceAsStream("assets/skyhanni/folder.png"), "Folder icon not found."));
Image scaled = myPicture.getScaledInstance(w - 8, h - 6, Image.SCALE_SMOOTH);
buttonChooseFolder = new JButton(new ImageIcon(scaled));
buttonChooseFolder.setName("ButtonFolder");
Expand Down Expand Up @@ -430,7 +430,7 @@ public void mouseClicked(MouseEvent e) {
if (e.getSource() == getForgeTextArea()) {
try {
Desktop.getDesktop().browse(new URI(
"http://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.8.9.html"));
"http://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.8.9.html"));
} catch (IOException | URISyntaxException ex) {
showErrorPopup(ex);
}
Expand Down Expand Up @@ -519,10 +519,10 @@ private boolean findSkyHanniAndDelete(File[] files) {
} catch (Exception ex) {
ex.printStackTrace();
showErrorMessage("Was not able to delete the other SkyHanni files found in your mods folder!" +
System.lineSeparator() +
"Please make sure that your minecraft is currently closed and try again, or feel" +
System.lineSeparator() +
"free to open your mods folder and delete those files manually.");
System.lineSeparator() +
"Please make sure that your minecraft is currently closed and try again, or feel" +
System.lineSeparator() +
"free to open your mods folder and delete those files manually.");
return true;
}
continue;
Expand Down Expand Up @@ -667,10 +667,10 @@ private String getModIDFromInputStream(InputStream inputStream) {
private File getThisFile() {
try {
return new File(SkyHanniInstallerFrame.class
.getProtectionDomain()
.getCodeSource()
.getLocation()
.toURI());
.getProtectionDomain()
.getCodeSource()
.getLocation()
.toURI());
} catch (URISyntaxException ex) {
showErrorPopup(ex);
}
Expand Down Expand Up @@ -700,4 +700,4 @@ public enum OperatingSystem {
MACOS,
UNKNOWN
}
}
}
12 changes: 11 additions & 1 deletion src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ import at.hannibal2.skyhanni.data.EntityMovementData
import at.hannibal2.skyhanni.data.FriendAPI
import at.hannibal2.skyhanni.data.GardenComposterUpgradesData
import at.hannibal2.skyhanni.data.GardenCropMilestones
import at.hannibal2.skyhanni.data.GardenCropMilestonesCommunityFix
import at.hannibal2.skyhanni.data.GardenCropUpgrades
import at.hannibal2.skyhanni.data.GuiEditManager
import at.hannibal2.skyhanni.data.GuildAPI
import at.hannibal2.skyhanni.data.HypixelData
import at.hannibal2.skyhanni.data.ItemAddManager
import at.hannibal2.skyhanni.data.ItemClickData
import at.hannibal2.skyhanni.data.ItemRenderBackground
import at.hannibal2.skyhanni.data.ItemTipHelper
Expand Down Expand Up @@ -119,6 +121,9 @@ import at.hannibal2.skyhanni.features.fishing.SeaCreatureMessageShortener
import at.hannibal2.skyhanni.features.fishing.SharkFishCounter
import at.hannibal2.skyhanni.features.fishing.ShowFishingItemName
import at.hannibal2.skyhanni.features.fishing.ThunderSparksHighlight
import at.hannibal2.skyhanni.features.fishing.tracker.FishingProfitPlayerMoving
import at.hannibal2.skyhanni.features.fishing.tracker.FishingProfitTracker
import at.hannibal2.skyhanni.features.fishing.tracker.FishingTrackerCategoryManager
import at.hannibal2.skyhanni.features.fishing.trophy.OdgerWaypoint
import at.hannibal2.skyhanni.features.fishing.trophy.TrophyFishFillet
import at.hannibal2.skyhanni.features.fishing.trophy.TrophyFishManager
Expand Down Expand Up @@ -333,7 +338,7 @@ import org.apache.logging.log4j.Logger
clientSideOnly = true,
useMetadata = true,
guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop",
version = "0.21.1.Beta.6",
version = "0.21.1",
)
class SkyHanniMod {
@Mod.EventHandler
Expand Down Expand Up @@ -364,6 +369,7 @@ class SkyHanniMod {
loadModule(TabListData())
loadModule(RenderData())
loadModule(GardenCropMilestones)
loadModule(GardenCropMilestonesCommunityFix)
loadModule(GardenCropUpgrades())
loadModule(VisitorListener())
loadModule(OwnInventoryData())
Expand All @@ -384,6 +390,7 @@ class SkyHanniMod {
loadModule(EntityOutlineRenderer)
loadModule(KeyboardManager)
loadModule(AdvancedPlayerList)
loadModule(ItemAddManager())

// APIs
loadModule(BazaarApi())
Expand Down Expand Up @@ -565,6 +572,9 @@ class SkyHanniMod {
loadModule(PlayerTabComplete)
loadModule(GetFromSacksTabComplete)
loadModule(SlayerProfitTracker)
loadModule(FishingProfitTracker)
loadModule(FishingTrackerCategoryManager)
loadModule(FishingProfitPlayerMoving)
loadModule(SlayerItemsOnGround())
loadModule(RestorePieceOfWizardPortalLore())
loadModule(QuickModMenuSwitch)
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.api

import at.hannibal2.skyhanni.events.CollectionUpdateEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.ItemAddEvent
import at.hannibal2.skyhanni.events.ProfileJoinEvent
import at.hannibal2.skyhanni.events.entity.ItemAddInInventoryEvent
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.LorenzUtils
Expand Down Expand Up @@ -69,9 +69,12 @@ class CollectionAPI {
}

@SubscribeEvent
fun onItemAdd(event: ItemAddInInventoryEvent) {
// TODO add support for replenish (higher collection than actual items in inv)
fun onItemAdd(event: ItemAddEvent) {
val internalName = event.internalName
val (_, amount) = NEUItems.getMultiplier(internalName)
if (amount > 1) return

// TODO add support for replenish (higher collection than actual items in inv)
if (internalName.getItemStackOrNull() == null) {
LorenzUtils.debug("CollectionAPI.addFromInventory: item is null for '$internalName'")
return
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import at.hannibal2.skyhanni.utils.NEUItems
import at.hannibal2.skyhanni.utils.jsonobjects.FriendsJson
import at.hannibal2.skyhanni.utils.jsonobjects.JacobContestsJson
import at.hannibal2.skyhanni.utils.jsonobjects.KnownFeaturesJson
import at.hannibal2.skyhanni.utils.tracker.SkyHanniTracker
import com.google.gson.GsonBuilder
import com.google.gson.JsonObject
import com.google.gson.TypeAdapter
Expand All @@ -37,6 +38,8 @@ import java.nio.file.StandardCopyOption
import java.util.UUID
import kotlin.concurrent.fixedRateTimer

typealias TrackerDisplayMode = SkyHanniTracker.DefaultDisplayMode

class ConfigManager {
companion object {
val gson = GsonBuilder().setPrettyPrinting()
Expand Down Expand Up @@ -108,6 +111,15 @@ class ConfigManager {
return IslandType.valueOf(reader.nextString().uppercase())
}
}.nullSafe())
.registerTypeAdapter(TrackerDisplayMode::class.java, object : TypeAdapter<TrackerDisplayMode>() {
override fun write(out: JsonWriter, value: TrackerDisplayMode) {
out.value(value.name)
}

override fun read(reader: JsonReader): TrackerDisplayMode {
return TrackerDisplayMode.valueOf(reader.nextString())
}
}.nullSafe())
.enableComplexMapKeySerialization()
.create()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import com.google.gson.JsonPrimitive

object ConfigUpdaterMigrator {
val logger = LorenzLogger("ConfigMigration")
const val CONFIG_VERSION = 9
const val CONFIG_VERSION = 10
fun JsonElement.at(chain: List<String>, init: Boolean): JsonElement? {
if (chain.isEmpty()) return this
if (this !is JsonObject) return null
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/at/hannibal2/skyhanni/config/Storage.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostData;
import at.hannibal2.skyhanni.features.dungeon.DungeonAPI;
import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasureTracker;
import at.hannibal2.skyhanni.features.fishing.tracker.FishingProfitTracker;
import at.hannibal2.skyhanni.features.fishing.trophy.TrophyRarity;
import at.hannibal2.skyhanni.features.garden.CropAccessory;
import at.hannibal2.skyhanni.features.garden.CropType;
Expand All @@ -20,6 +21,7 @@
import at.hannibal2.skyhanni.features.slayer.SlayerProfitTracker;
import at.hannibal2.skyhanni.utils.LorenzVec;
import at.hannibal2.skyhanni.utils.NEUInternalName;
import at.hannibal2.skyhanni.utils.tracker.SkyHanniTracker;
import com.google.gson.annotations.Expose;
import net.minecraft.item.ItemStack;

Expand Down Expand Up @@ -50,6 +52,9 @@ public class Storage {
@Expose
public Boolean contestSendingAsked = false;

@Expose
public Map<String, SkyHanniTracker.DisplayMode> trackerDisplayModes = new HashMap<>();

@Expose
public Map<UUID, PlayerSpecific> players = new HashMap<>();

Expand Down Expand Up @@ -393,5 +398,15 @@ public static class DungeonStorage {
@Expose
public Map<DungeonAPI.DungeonFloor, Integer> bosses = new HashMap<>();
}

@Expose
public FishingStorage fishing = new FishingStorage();

public static class FishingStorage {

@Expose
public FishingProfitTracker.Data fishingProfitTracker = new FishingProfitTracker.Data();

}
}
}
10 changes: 8 additions & 2 deletions src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigFileType
import at.hannibal2.skyhanni.config.ConfigGuiManager
import at.hannibal2.skyhanni.data.ChatManager
import at.hannibal2.skyhanni.data.GardenCropMilestonesFix
import at.hannibal2.skyhanni.data.GardenCropMilestonesCommunityFix
import at.hannibal2.skyhanni.data.GuiEditManager
import at.hannibal2.skyhanni.data.PartyAPI
import at.hannibal2.skyhanni.features.bingo.BingoCardDisplay
Expand All @@ -18,6 +18,7 @@ import at.hannibal2.skyhanni.features.event.diana.InquisitorWaypointShare
import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasureTracker
import at.hannibal2.skyhanni.features.fame.AccountUpgradeReminder
import at.hannibal2.skyhanni.features.fame.CityProjectFeatures
import at.hannibal2.skyhanni.features.fishing.tracker.FishingProfitTracker
import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.features.garden.GardenCropTimeCommand
import at.hannibal2.skyhanni.features.garden.GardenNextJacobContest
Expand Down Expand Up @@ -176,6 +177,7 @@ object Commands {
) { EnderNodeTracker.resetCommand(it) }
registerCommand("shresetarmordroptracker", "Resets the Armor Drop Tracker") { ArmorDropTracker.resetCommand(it) }
registerCommand("shresetfrozentreasuretracker", "Resets the Frozen Treasure Tracker") { FrozenTreasureTracker.resetCommand(it) }
registerCommand("shresetfishingtracker", "Resets the Frozen Treasure Tracker") { FishingProfitTracker.resetCommand(it) }
registerCommand("shbingotoggle", "Toggle the bingo card display mode") { BingoCardDisplay.toggleCommand() }
registerCommand(
"shfarmingprofile",
Expand Down Expand Up @@ -212,6 +214,10 @@ object Commands {
"shclearminiondata",
"Reset data about minion profit and the name display on the private island"
) { MinionFeatures.clearMinionData() }
registerCommand(
"shwhereami",
"Print current island in chat"
) { SkyHanniDebugsAndTests.whereami() }
registerCommand(
"shconfig",
"Search or reset config elements §c(warning, dangerous!)"
Expand Down Expand Up @@ -324,7 +330,7 @@ object Commands {
registerCommand(
"readcropmilestonefromclipboard",
"Read crop milestone from clipboard. This helps fixing wrong crop milestone data"
) { GardenCropMilestonesFix.readDataFromClipboard() }
) { GardenCropMilestonesCommunityFix.readDataFromClipboard() }
}

private fun internalCommands() {
Expand Down
Loading

0 comments on commit ee1f956

Please sign in to comment.