aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCal <cwolfson58@gmail.com>2024-10-30 11:54:17 +1100
committerCal <cwolfson58@gmail.com>2024-10-30 11:54:17 +1100
commit09494f6e0a48e619c486b073189e24288400d689 (patch)
tree055af622ed4dc4cdedcb3ecb14c3662194378210
parent2dc24ced9d10a0fda4df70c90471499abd66595b (diff)
parent3f4bdbab85ba6b54a54b99b23e176d52910c8d66 (diff)
downloadSkyHanni-09494f6e0a48e619c486b073189e24288400d689.tar.gz
SkyHanni-09494f6e0a48e619c486b073189e24288400d689.tar.bz2
SkyHanni-09494f6e0a48e619c486b073189e24288400d689.zip
Merge branch 'refs/heads/beta' into fork/nea89o/formattedtextcompat
# Conflicts: # build.gradle.kts
-rw-r--r--.github/workflows/detekt.yml3
-rw-r--r--.github/workflows/pr-check.yml1
-rw-r--r--CONTRIBUTING.md56
-rw-r--r--build.gradle.kts23
-rw-r--r--detekt/baseline.xml2
-rw-r--r--detekt/src/main/kotlin/formatting/CustomCommentSpacing.kt14
-rw-r--r--docs/CHANGELOG.md47
-rw-r--r--jitpack.yml5
-rw-r--r--root.gradle.kts2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/api/event/EventHandler.kt26
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt21
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/chat/StashConfig.java7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/event/hoppity/HoppityEggsConfig.java4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/DisplayConfig.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/inventory/FocusModeConfig.java14
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ElectionAPI.kt (renamed from src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt)40
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/HotmData.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/IslandGraphs.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/MayorData.kt (renamed from src/main/java/at/hannibal2/skyhanni/data/Mayors.kt)78
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt15
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt87
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/EventsJson.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/PurseChangeEvent.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/ScoreboardUpdateEvent.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/skyblock/AreaChangeEvents.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/StashCompact.kt68
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaShader.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalGoal.kt10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEventSummary.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityRabbitTheFishChecker.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/spook/TheGreatSpook.kt196
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GoldenFishTimer.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/RenderBackground.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/elements/ScoreboardElementLobbyCode.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/elements/ScoreboardElementMayor.kt20
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/elements/ScoreboardElementProfile.kt17
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/events/ScoreboardEventBroodmother.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/FocusMode.kt25
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt13
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/MinisterInCalendar.kt16
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ShiftClickBrewing.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/SuperpairDataDisplay.kt52
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt21
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/RoundedRectangleOutlineShader.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/SkyBlockKickDuration.kt25
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListRenderer.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/EnchantParser.kt40
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/EnchantsJson.kt15
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/FormattedEnchant.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/CraftRoomHolographicMob.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt74
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerType.kt48
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt19
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/graph/GraphEditorBugFinder.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/APIUtils.kt13
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt16
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ComponentMatcherUtils.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ConfigUtils.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUInternalName.kt68
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RegexUtils.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt50
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/compat/GuiScreenUtils.kt12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/renderables/RenderableTooltips.kt17
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt9
-rw-r--r--versions/1.8.9/detekt/baseline.xml2
83 files changed, 905 insertions, 549 deletions
diff --git a/.github/workflows/detekt.yml b/.github/workflows/detekt.yml
index f4251d798..a258661f1 100644
--- a/.github/workflows/detekt.yml
+++ b/.github/workflows/detekt.yml
@@ -29,6 +29,7 @@ jobs:
run: |
./gradlew detektMain --stacktrace
- name: Check if SARIF file exists
+ if: always()
id: check_sarif
run: |
if [ -f "versions/1.8.9/build/reports/detekt/main.sarif" ]; then
@@ -42,7 +43,7 @@ jobs:
chmod +x .github/scripts/process_detekt_sarif.sh
./.github/scripts/process_detekt_sarif.sh versions/1.8.9/build/reports/detekt/main.sarif | tee detekt_output.txt
- name: Upload detekt output as artifact
- if: ${{ steps.check_sarif.outputs.exists == 'true' }}
+ if: ${{ !cancelled() && steps.check_sarif.outputs.exists == 'true' }}
uses: actions/upload-artifact@v4
with:
name: detekt-output
diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml
index a28577b77..4cf997e2c 100644
--- a/.github/workflows/pr-check.yml
+++ b/.github/workflows/pr-check.yml
@@ -43,6 +43,7 @@ jobs:
labels: 'Wrong Title/Changelog'
- name: Check if this is the latest workflow run
+ if: failure()
id: check_latest
run: |
PR_LATEST_SHA=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8229a00d5..a30f9178b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -85,7 +85,7 @@ out [their guide](https://github.com/NotEnoughUpdates/NotEnoughUpdates/blob/mast
If you are not very familiar with git, you might want to try this out: https://learngitbranching.js.org/.
-Proposed changes are better off being in their own branch, you can do this by doing the following from within IntelliJ with the SkyHanni project already open.
+Proposed changes are better off being in their own branch as this makes development easier for both you and the maintainers of this repository, you can do this by following the instructions from within the IntelliJ window with the SkyHanni project already open.
- Click the beta dropdown at the top of IntelliJ
- Click new branch
- Give the branch a name relating to the changes you plan to make
@@ -153,6 +153,37 @@ for more information and usages.
- When updating a config option variable, use the `ConfigUpdaterMigrator.ConfigFixEvent` with event.move() when moving a value, and event.transform() when updating a value. [For Example](https://github.com/hannibal002/SkyHanni/blob/e88f416c48f9659f89b7047d7629cd9a1d1535bc/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt#L276).
- Use American English spelling conventions (e.g., "color" not "colour").
+## Additional Useful Development Tools
+
+### DevAuth
+
+[DevAuth](https://github.com/DJtheRedstoner/DevAuth) is a tool that allows logging in to a Minecraft account while
+debugging in IntelliJ. This is very useful for coding live on Hypixel without the need to compile a jar.
+
+- The library is already downloaded by Gradle.
+- SkyHanni will automatically set up DevAuth.
+- Start Minecraft inside IntelliJ normally.
+ - Click on the link in the console and verify with a Microsoft account.
+ - The verification process will reappear every few days (after the session token expires).
+
+### Hot Swap
+
+Hot Swap allows reloading edited code while debugging, removing the need to restart the whole game every time.
+
+We use [dcevm](https://dcevm.github.io/) and the IntelliJ
+Plugin [HotSwap Agent](https://plugins.jetbrains.com/plugin/9552-hotswapagent) to quickly reload code changes.
+
+Follow [this](https://forums.Minecraftforge.net/topic/82228-1152-3110-intellij-and-gradlew-forge-hotswap-and-dcevm-tutorial/)
+tutorial.
+
+### [Live Plugin](https://plugins.jetbrains.com/plugin/7282-liveplugin)
+
+Allows project specific plugins to run. Eg: Regex Intention
+
+### [Live Templates Sharing](https://plugins.jetbrains.com/plugin/25007-live-templates-sharing)
+
+Imports our custom live templates automatically. Live Templates allow for quicker code writing.
+
## Software Used in SkyHanni
### Basics
@@ -218,29 +249,6 @@ For info on usage, look at [DiscordRPCManager.kt](https://github.com/hannibal002
We use the [auto update library](https://github.com/nea89o/libautoupdate) from nea89.
-## Additional Useful Development Tools
-
-### DevAuth
-
-[DevAuth](https://github.com/DJtheRedstoner/DevAuth) is a tool that allows logging in to a Minecraft account while
-debugging in IntelliJ. This is very useful for coding live on Hypixel without the need to compile a jar.
-
-- The library is already downloaded by Gradle.
-- SkyHanni will automatically set up DevAuth.
-- Start Minecraft inside IntelliJ normally.
- - Click on the link in the console and verify with a Microsoft account.
- - The verification process will reappear every few days (after the session token expires).
-
-### Hot Swap
-
-Hot Swap allows reloading edited code while debugging, removing the need to restart the whole game every time.
-
-We use [dcevm](https://dcevm.github.io/) and the IntelliJ
-Plugin [HotSwap Agent](https://plugins.jetbrains.com/plugin/9552-hotswapagent) to quickly reload code changes.
-
-Follow [this](https://forums.Minecraftforge.net/topic/82228-1152-3110-intellij-and-gradlew-forge-hotswap-and-dcevm-tutorial/)
-tutorial.
-
## 1.21 / Modern version development
You might have noticed that while the SkyHanni source code is found in `src/`, the actual tasks for compiling, building and running the mod
diff --git a/build.gradle.kts b/build.gradle.kts
index d833b509e..6b2aeff5f 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -15,6 +15,8 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import skyhannibuildsystem.ChangelogVerification
import skyhannibuildsystem.DownloadBackupRepo
+import java.io.Serializable
+import java.nio.file.Path
import java.util.zip.ZipFile
import java.util.zip.ZipOutputStream
import kotlin.io.path.moveTo
@@ -439,18 +441,13 @@ tasks.withType<DetektCreateBaselineTask>().configureEach {
outputs.cacheIf { false } // Custom rules won't work if cached
}
-abstract class ShotApplicationJarProcessor @Inject constructor(val shots: Shots) : MinecraftJarProcessor<MinecraftJarProcessor.Spec> {
- private class EnsureCompile(shots: Shots) : ShotApplicationJarProcessor(shots)
+abstract class ShotApplicationJarProcessor @Inject constructor(private val shots: Shots) :
+ MinecraftJarProcessor<MinecraftJarProcessor.Spec>,
+ Serializable {
- override fun buildSpec(context: SpecContext?): MinecraftJarProcessor.Spec? {
- return object : MinecraftJarProcessor.Spec {}
- }
+ override fun buildSpec(context: SpecContext?): MinecraftJarProcessor.Spec? = ShotSpec(shots)
- override fun processJar(
- source: java.nio.file.Path,
- spec: MinecraftJarProcessor.Spec,
- context: ProcessorContext?
- ) {
+ override fun processJar(source: Path, spec: MinecraftJarProcessor.Spec?, context: ProcessorContext?) {
val dest = source.resolveSibling(source.fileName.toString() + "-temp-shot")
ZipFile(source.toFile()).use { input ->
ZipOutputStream(dest.outputStream()).use { output ->
@@ -460,7 +457,7 @@ abstract class ShotApplicationJarProcessor @Inject constructor(val shots: Shots)
dest.moveTo(source, overwrite = true)
}
- override fun getName(): String {
- return "Shots"
- }
+ override fun getName(): String = "Shots"
+
+ private data class ShotSpec(val shots: Shots) : MinecraftJarProcessor.Spec, Serializable
}
diff --git a/detekt/baseline.xml b/detekt/baseline.xml
index 6665e0399..fb620c666 100644
--- a/detekt/baseline.xml
+++ b/