Skip to content

Commit

Permalink
Merge branch 'refs/heads/beta' into fork/j10a1n15/chunked
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Jun 13, 2024
2 parents fcbf19b + 045c397 commit 6642ac4
Show file tree
Hide file tree
Showing 202 changed files with 4,537 additions and 1,225 deletions.
42 changes: 35 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,46 @@ ij_any_block_comment_add_space = true
ij_any_line_comment_add_space = true

# Max line length
max_line_length = 120
max_line_length = 140

# Java Files
[*.java]
# Java files should not use wildcard imports
ij_java_names_count_to_use_import_on_demand = 999
ij_java_class_count_to_use_import_on_demand = 999
ij_java_packages_to_use_import_on_demand = 999
ij_java_names_count_to_use_import_on_demand = 2147483647
ij_java_class_count_to_use_import_on_demand = 2147483647
ij_java_packages_to_use_import_on_demand = 2147483647

[*.kt]
ktlint_code_style = intellij_idea

# Kotlin files should not use wildcard imports
ij_kotlin_name_count_to_use_star_import = 999
ij_kotlin_name_count_to_use_star_import_for_members = 999
ij_kotlin_packages_to_use_import_on_demand = 999
ij_kotlin_name_count_to_use_star_import = 2147483647
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
ij_kotlin_enum_constants_wrap = split_into_lines
ij_kotlin_allow_trailing_comma_on_call_site = true
ij_kotlin_allow_trailing_comma = true
ij_kotlin_packages_to_use_import_on_demand = unset
ktlint_standard_chain-wrapping = always

ktlint_standard_multiline-if-else = disabled
ktlint_standard_no-empty-first-line-in-class-body = disabled
ktlint_standard_no-single-line-block-comment = disabled
ktlint_standard_no-blank-line-before-rbrace = disabled
ktlint_standard_no-consecutive-blank-lines = disabled
ktlint_standard_no-empty-first-line-in-method-block = disabled
ktlint_standard_comment-spacing = disabled
ktlint_standard_string-template = disabled
ktlint_standard_trailing-comma-on-call-site = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled
ktlint_standard_context-receiver-wrapping = disabled
ktlint_standard_multiline-expression-wrapping = false
ktlint_standard_string-template-indent = disabled
ktlint_standard_no-trailing-spaces = disabled
ktlint_standard_function-signature = disabled
ktlint_standard_wrapping = disabled
ktlint_standard_argument-list-wrapping = disabled
ktlint_standard_class-signature = disabled
ktlint_standard_final-newline = disabled

ktlint_standard_no-wildcard-imports = enabled
ktlint_standard_function-expression-body = disabled
16 changes: 16 additions & 0 deletions .github/workflows/check-style.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: check-style
on:
- pull_request
jobs:
ktlint:
name: Check Style
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
name: Checkout code
- name: ktlint
uses: ScaCap/action-ktlint@master
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.idea/*
# Use **/*.* since if a directory is ignored, children of that directory *cannot* be unignored using ! again.
.idea/**/*.*
!.idea/icon.svg
!.idea/dictionaries/default_user.xml
!.idea/scopes/Mixins.xml
.vscode/
run/
build/
Expand Down
3 changes: 3 additions & 0 deletions .idea/scopes/Mixins.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 7 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ follow [their guide](https://github.com/NotEnoughUpdates/NotEnoughUpdates/blob/m

If you are not very familiar with git, you might want to try this out: https://learngitbranching.js.org/.

_An explanation how to use intellij and branches will follow here soon.
_An explanation how to use intellij and branches will follow here soon._

Please use a prefix for the name of the PR (E.g. Feature, Fix, Backend, Change).
Please use a prefix for the name of the PR (E.g. Feature, Improvement, Fix, Backend, ...).

You can write in the description of the pr the wording for the changelog as well (optional).
When writing the description of the PR, ensure you fill out the template with the necessary information, including the "WHAT" section, and the changelog entries.

If your PR relies on another PR, please include this information at the beginning of the description. Consider using a
format like "- #821" to illustrate the dependency.
Expand Down Expand Up @@ -81,8 +81,8 @@ format like "- #821" to illustrate the dependency.
- Replace it with `?:` (if null return this).
- This will most likely not be possible to avoid when working with objects from java.
- Don't forget to add `@FeatureToggle` to new standalone features (not options to that feature) in the config.
- Do not use `e.printStackTrace()`, use `CopyErrorCommand.logError(e, "explanation for users")` instead.
- Do not use `MinecraftForge.EVENT_BUS.post(event)`, use `event.postAndCatch()` instead.
- Do not use `e.printStackTrace()`, use `ErrorManager.logErrorWithData(error, "explanation for users", ...extraOptionalData)` instead.
- Do not use `MinecraftForge.EVENT_BUS.post(event)`, use `event.post()` instead.
- Do not use `toRegex()` or `toPattern()`, use `RepoPattern` instead.
- See [RepoPattern.kt](https://github.com/hannibal002/SkyHanni/blob/beta/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPattern.kt)
for more information and usages.
Expand All @@ -106,20 +106,16 @@ This start script will automatically download all required libraries.

### NotEnoughUpdates

SkyHanni requires NEU.
SkyHanni requires **[NotEnoughUpdates](https://github.com/NotEnoughUpdates/NotEnoughUpdates/)**.
We use NEU to get auction house and bazaar price data for items and to read
the [NEU Item Repo](https://github.com/NotEnoughUpdates/NotEnoughUpdates-REPO) for item internal names, display names
and recipes.

For more information, see https://github.com/NotEnoughUpdates/NotEnoughUpdates

### Config

SkyHanni stores the config (settings and user data) as a json object in a single text file.
For rendering the /sh config (categories, toggles, search, etc.),
SkyHanni uses **MoulConfig**, the same config system as NotEnoughUpdates.

For more information, see https://github.com/NotEnoughUpdates/MoulConfig
SkyHanni uses **[MoulConfig](https://github.com/NotEnoughUpdates/MoulConfig)**, the same config system as NotEnoughUpdates.

### Elite Farmers API

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ class ModuleProcessor(private val codeGenerator: CodeGenerator, private val logg
return symbol
}

//TODO remove when KMixins added as it contains KSP annotation helpers.
private fun isDevAnnotation(klass: KSClassDeclaration): Boolean {
val annotation = klass.annotations.find { it.shortName.asString() == "SkyHanniModule" } ?: return false
return annotation.arguments.find { it.name?.asString() == "devOnly" }?.value as? Boolean ?: false
}

// TODO use Kotlin Poet once KMixins is merged
private fun generateFile(symbols: List<KSClassDeclaration>) {

Expand All @@ -92,13 +98,18 @@ class ModuleProcessor(private val codeGenerator: CodeGenerator, private val logg
OutputStreamWriter(file).use {
it.write("package at.hannibal2.skyhanni.skyhannimodule\n\n")
it.write("object LoadedModules {\n")
it.write(" val modules: List<Any> = listOf(\n")
it.write(" val isDev: Boolean = at.hannibal2.skyhanni.utils.system.PlatformUtils.isDevEnvironment\n")
it.write(" val modules: List<Any> = buildList {\n")

symbols.forEach { symbol ->
it.write(" ${symbol.qualifiedName!!.asString()},\n")
if (isDevAnnotation(symbol)) {
it.write(" if (isDev) add(${symbol.qualifiedName!!.asString()})\n")
} else {
it.write(" add(${symbol.qualifiedName!!.asString()})\n")
}
}

it.write(" )\n")
it.write(" }\n")
it.write("}\n")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ package at.hannibal2.skyhanni.skyhannimodule

@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.SOURCE)
annotation class SkyHanniModule
annotation class SkyHanniModule(
/**
* If the module will only be loaded in a development environment.
*/
val devOnly: Boolean = false,
)
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {
}

group = "at.hannibal2.skyhanni"
version = "0.26.Beta.8"
version = "0.26.Beta.9"

val gitHash by lazy {
val baos = ByteArrayOutputStream()
Expand Down
49 changes: 49 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
azurejelly (https://github.com/hannibal002/SkyHanni/pull/1888)
+ Added In-Water Display. - Stella (https://github.com/hannibal002/SkyHanni/pull/1892)
+ Useful when using a Prismarine Blade in Stranded Mode.
+ Added toggle for compacting Garden visitor summary messages. - DavidArthurCole (https://github.com/hannibal002/SkyHanni/pull/2026)

#### Garden Features

Expand Down Expand Up @@ -53,6 +54,10 @@
+ This may be inaccurate if you've already collected eggs on an island.
+ Show total amount of chocolate spent in the Chocolate Shop. -
sayomaki (https://github.com/hannibal002/SkyHanni/pull/1921)
+ Added stray/golden chocolate rabbit production time. - sayomaki (https://github.com/hannibal002/SkyHanni/pull/1978)
+ Display missing egg collection locations. - nea (https://github.com/hannibal002/SkyHanni/pull/1997)
+ Tracks the unique egg location requirements for rabbits from your Hoppity collection.
+ This data is partially enriched using the duplicate egg location tracker.

#### Mining Features

Expand Down Expand Up @@ -98,6 +103,11 @@
+ Added Beacon Power Display. - Empa (https://github.com/hannibal002/SkyHanni/pull/1901)
+ Added Hide Useless Armor Stands. - Empa (https://github.com/hannibal002/SkyHanni/pull/1962)
+ Hides armor stands that briefly appear on Hypixel.
+ Added Custom Wardrobe, a new look for the wardrobe. - j10an15, Empa (https://github.com/hannibal002/SkyHanni/pull/2039)
+ Highly customizable: Colors, display sizes.
+ Estimated Price Integration.
+ Favorite slots; option to only display favorite slots.
+ Added toggle for compacting Garden visitor summary messages. - DavidArthurCole (https://github.com/hannibal002/SkyHanni/pull/2026)

### Improvements

Expand All @@ -116,6 +126,7 @@
Jordyrat (https://github.com/hannibal002/SkyHanni/pull/1735)
+ Also shortened the default display.
+ Minor GUI improvements in /ff. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/873)
+ Displays in /ff the fortune from bestiary and armor stats for enchantments and gemstones. - maxime-bodifee (https://github.com/hannibal002/SkyHanni/pull/1861)

#### Hoppity Event Improvements

Expand All @@ -132,6 +143,7 @@
+ Added a distinct sound for the special stray rabbit. - HiZe (https://github.com/hannibal002/SkyHanni/pull/1913)
+ Added collected egg location API import. - appable (https://github.com/hannibal002/SkyHanni/pull/1972)
+ Open your NEU profile viewer and click the chat message to load data.
+ Added Carnival lines to the Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1995)

#### Mining Improvements

Expand All @@ -140,6 +152,8 @@
+ Added Mining Event Icons. Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1305)
+ Moved all SkyMall chat message hiders under the main SkyMall toggle. -
martimavocado (https://github.com/hannibal002/SkyHanni/pull/1971)
+ Powder Tracker: Auto-detect whether Great Explorer is maxed. - Luna (https://github.com/hannibal002/SkyHanni/pull/2032)
+ The configuration option to manually specify this has been removed.

#### Commands Improvements

Expand All @@ -164,6 +178,7 @@
+ Improved Attribute Prices in Estimated Item Value. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2020)
+ Ignoring irrelevant attributes (Resistance, Speed, Experience, etc).
+ No longer counting attribute combos or single attribute prices when cheaper than the base item price.
+ Added option to choose Bazaar price for Copper price. - Trîggered (https://github.com/hannibal002/SkyHanni/pull/2030)

#### Fishing Improvements

Expand Down Expand Up @@ -191,6 +206,10 @@
hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1951)
+ Added information about the current Perkopocalypse Mayor's perks to the Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2003)
+ Added support for Fancy Contributors in nametags. - Empa (https://github.com/hannibal002/SkyHanni/pull/1687)
+ Improved overall performance slightly by about ~1%. - nea (https://github.com/hannibal002/SkyHanni/pull/2033)
+ Improved Hypixel server detection. - Luna (https://github.com/hannibal002/SkyHanni/pull/2064)
+ Added Carnival lines to the Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1995)
+ Added an exclude dungeon toggle to hide far entities. - Iceshadow (https://github.com/hannibal002/SkyHanni/pull/2036)

### Fixes

Expand All @@ -209,6 +228,8 @@
+ Fixed error with SkyMall with Titanium buff. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1967)
+ Fixed swapped mining event display icons. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1958)
+ Fixed Area Walls being broken in Nucleus. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1994)
+ Consider Y=64 part of Magma Fields. - Luna (https://github.com/hannibal002/SkyHanni/pull/2029)
+ Hypixel quietly changed this in or around SkyBlock 0.20.1.

#### Garden Fixes

Expand All @@ -221,6 +242,9 @@
+ This may also fix the display not showing up.
+ Fixed Non-Craftable Items breaking the Visitor Shopping List. - jani/hannibal2/nea (https://github.com/hannibal002/SkyHanni/pull/2019)
+ Fixed stats in visitor inventory not showing under certain circumstances. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2018)
+ Fixed calculation of universal farming fortune in /ff. - maxime-bodifee (https://github.com/hannibal002/SkyHanni/pull/1861)
+ Removed 100 base ff and added garden bonus from bestiary.
+ + Fixed cake buff in /ff. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2034)

#### Chocolate Factory & Hoppity Hunt Fixes

Expand All @@ -234,11 +258,16 @@
appable (https://github.com/hannibal002/SkyHanni/pull/1925)
+ Fixed incorrect API name conversion for Fish the Rabbit. - appable (https://github.com/hannibal002/SkyHanni/pull/1975)
+ Fixed stray rabbit sound not playing for the Golden Rabbit. - HiZe (https://github.com/hannibal002/SkyHanni/pull/1913)
+ Fixed compact chat sometimes breaking when obtaining legendary or higher tier rabbits. - DavidArthurCole (https://github.com/hannibal002/SkyHanni/pull/2041)

#### Custom Scoreboard Fixes

+ Fixed scoreboard player count not displaying in dungeons. -
ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/1894)
+ Fixed showing "No Magical Power detected" message multiple times. - Empa (https://github.com/hannibal002/SkyHanni/pull/2065)
+ Fixed unknown lines not appearing instantly in the Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2063)
+ Fixed Anniversary Line not being detected in Custom Scoreboard. - Empa, j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2058)
+ Fixed Perkapocalypse Mayor's time being longer than Jerry's time in office. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2045)

#### Dungeon Fixes

Expand Down Expand Up @@ -283,6 +312,10 @@

+ Fixed summons not being removed from Summoning Mob Display. - Empa (https://github.com/hannibal002/SkyHanni/pull/1964)

#### Chat Fixes

+ Fixed stash getting detected as a private message. - sayomaki (https://github.com/hannibal002/SkyHanni/pull/2060)

#### Misc Fixes

+ Fixed LorenzToolTipEvent triggering when not actually hovering over an item. -
Expand All @@ -295,6 +328,9 @@
+ Config no longer resets when downgrading versions. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1979)
+ Fixed accidental hiding of boss bars. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1980)
+ Fixed Account Upgrade Reminder feature with simultaneous account and profile upgrades. - appable (https://github.com/hannibal002/SkyHanni/pull/2007)
+ Fixed crash if a key code is set to a non-standard key. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/2066)
+ Fixed corrupted config files not being reset to the default state. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2055)
+ Fixed an error with the chum bucket hider. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2043)

### Technical Details

Expand Down Expand Up @@ -344,6 +380,19 @@
+ Converted classes to objects, then used annotation. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1982)
+ Added annotations to objects. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1974)
+ Added module plugin. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/1974)
+ Moved the drawWaypointFilled function to RenderUtils. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1930)
+ Added mixin search scope. - nea (https://github.com/hannibal002/SkyHanni/pull/2033)
+ Changed `.gitignore` so that subdirectories of the `.idea` folder can be manually unignored. - nea (https://github.com/hannibal002/SkyHanni/pull/2033)
+ Fixed infinite scrolling for scrollables. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2053)
+ DevTool Graph Editor. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1454)
+ Added player, drawInsideRoundedRecWithOutline & doubleLayered Renderable. - j10a1n15, Empa, Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2039)
+ Added render Renderables method, which only takes in one renderable. - Empa (https://github.com/hannibal002/SkyHanni/pull/2039)
+ Added method to remove enchants from any item. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2039)
+ Added method to click on any slot in any window. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2039)
+ Added "addToGUIEditor" param to render Renderables method. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2039)
+ Added the ability to specify a SkyHanniModule to only load in dev. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/2011)
+ Migrated long to SimpleTimeMark in Storage if they are time marks. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2038)
+ Added `HotmData.isMaxLevel`, which also accounts for Blue Cheese. - Luna (https://github.com/hannibal002/SkyHanni/pull/2032)

## Version 0.25

Expand Down
10 changes: 10 additions & 0 deletions docs/FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
+ Checks if you have enough materials to craft the items and depending on that shows the button or not.
+ Overflow Garden crop milestones. - Luna & HiZe (https://github.com/hannibal002/SkyHanni/pull/997)
+ New "Craftable!" message when Visitor Items Needed are craftable. - Paloys (https://github.com/hannibal002/SkyHanni/pull/1891)
+ Added toggle for compacting Garden visitor summary messages. - DavidArthurCole (https://github.com/hannibal002/SkyHanni/pull/2026)

</details>
<details open><summary>
Expand Down Expand Up @@ -923,6 +924,10 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
+ Mark duplicate egg locations in red for unlocking some of the new rabbits. - appable (https://github.com/hannibal002/SkyHanni/pull/1929)
+ Option to always mark nearby duplicate egg locations.
+ Show total amount of chocolate spent in the Chocolate Shop. - sayomaki (https://github.com/hannibal002/SkyHanni/pull/1921)
+ Stray/golden chocolate rabbit production time. - sayomaki (https://github.com/hannibal002/SkyHanni/pull/1978)
+ Display missing egg collection locations. - nea (https://github.com/hannibal002/SkyHanni/pull/1997)
+ Tracks the unique egg location requirements for rabbits from your Hoppity collection.
+ This data is partially enriched using the duplicate egg location tracker.

</details>
<details open><summary>
Expand Down Expand Up @@ -1219,6 +1224,11 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
+ Added Beacon Power Display. - Empa (https://github.com/hannibal002/SkyHanni/pull/1901)
+ Added Hide Useless Armor Stands. - Empa (https://github.com/hannibal002/SkyHanni/pull/1962)
+ Hides armor stands that briefly appear on Hypixel.
+ **Custom Wardrobe**, a new look for the wardrobe. - j10an15, Empa (https://github.com/hannibal002/SkyHanni/pull/2039)
+ Highly customizable: Colors, display sizes.
+ Estimated Price Integration.
+ Favorite slots; option to only display favorite slots.
+ Added a Chat Message if the Perkapocalypse Mayor is unknown. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2009)

</details>
<details open><summary>
Expand Down
Loading

0 comments on commit 6642ac4

Please sign in to comment.