Skip to content

Commit

Permalink
Merge branch 'beta' into backend/scoreboard-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
j10a1n15 committed Oct 18, 2024
2 parents 1fb9860 + f4fa81e commit ba0951f
Show file tree
Hide file tree
Showing 89 changed files with 1,433 additions and 359 deletions.
1 change: 1 addition & 0 deletions .idea/dictionaries/default_user.xml

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

7 changes: 6 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ 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/.

_An explanation how to use intellij and branches will follow here soon._
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.
- 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

_A more in depth explanation how to use intellij and branches will follow here soon._

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

Expand Down
8 changes: 8 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import net.fabricmc.loom.task.RunGameTask
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import skyhannibuildsystem.ChangelogVerification
import skyhannibuildsystem.DownloadBackupRepo

plugins {
idea
Expand Down Expand Up @@ -96,6 +97,12 @@ val headlessLwjgl by configurations.creating {
isTransitive = false
isVisible = false
}

val includeBackupRepo by tasks.registering(DownloadBackupRepo::class) {
this.outputDirectory.set(layout.buildDirectory.dir("downloadedRepo"))
this.branch = "main"
}

tasks.runClient {
this.javaLauncher.set(
javaToolchains.launcherFor {
Expand Down Expand Up @@ -213,6 +220,7 @@ kotlin {

// Tasks:
tasks.processResources {
from(includeBackupRepo)
inputs.property("version", version)
filesMatching(listOf("mcmod.info", "fabric.mod.json")) {
expand("version" to version)
Expand Down
34 changes: 34 additions & 0 deletions buildSrc/src/main/kotlin/skyhannibuildsystem/DownloadBackupRepo.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package skyhannibuildsystem

import org.gradle.api.DefaultTask
import org.gradle.api.file.DirectoryProperty
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.TaskAction
import java.net.URL

// Code taken from NotEnoughUpdates
abstract class DownloadBackupRepo : DefaultTask() {

@get:OutputDirectory
abstract val outputDirectory: DirectoryProperty

@get:Input
abstract var branch: String

@get:Internal
val repoFile get() = outputDirectory.get().asFile.resolve("assets/skyhanni/repo.zip")

@TaskAction
fun downloadRepo() {
val downloadUrl = URL("https://github.com/hannibal002/SkyHanni-Repo/archive/refs/heads/$branch.zip")
val file = repoFile
file.parentFile.mkdirs()
file.outputStream().use { out ->
downloadUrl.openStream().use { inp ->
inp.copyTo(out)
}
}
}
}
69 changes: 69 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
+ Added an easier way to check your unique Hoppity Eggs collected on each island. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/2625)
+ Shows your progress in the Warp Menu.
+ Can be automatically hidden when an island is complete.
+ Added the ability to block opening the Chocolate Factory when Booster Cookie is inactive. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2713)
+ Added a feature to block opening Hoppity's trade menu from Abiphone calls if you do not have coins in your purse. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2664)
+ Added the ability to prevent closing Meal Eggs that have Rabbit the Fish inside. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2712)

#### Inventory Features

Expand All @@ -26,6 +29,17 @@
+ Added Precision Mining Highlighter. - Cuz_Im_Clicks (https://github.com/hannibal002/SkyHanni/pull/2614)
+ Draws a box over the Precision Mining particles.
+ Added highlighting boxes to Crystal Nucleus crystals during Hoppity's Hunt. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2598)
+ Added Flowstate Helper. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/2561)
+ Displays stats for the Flowstate enchantment on mining tools.

#### Dungeon Features

+ Added Terminal Waypoints. - Stella (https://github.com/hannibal002/SkyHanni/pull/2719)
+ Displays waypoints during the F7/M7 Goldor Phase.

#### Chat Features

+ Added chat compacting for 'items in stash' warnings. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2639)

### Improvements

Expand All @@ -38,11 +52,30 @@
+ Replaced repeated SkyHanni messages with the previous message. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2700)
+ Added support for Guilds in player-related tab completions. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/2637)
+ Added support for all Guild and Friend commands in tab completions. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/2637)
+ Reordered commands in categories. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2642)
+ Renamed some commands for clarity. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2642)

#### Combat Improvements

+ Added Totem of Corruption and Enrager to the Ability Cooldown feature. - DungeonHub (https://github.com/hannibal002/SkyHanni/pull/2706)

#### Mining Improvements

+ Made the "You need a stronger tool to mine ..." chat filter hide every such message, not just Crystal Hollows gemstones. - Luna (https://github.com/hannibal002/SkyHanni/pull/2724)
+ Added an option to draw a line to your golden or diamond goblin. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2717)

#### Diana Improvements

+ Added support for detecting and handling Inquisitor spawn messages from other mods from chat. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2720)

#### Fishing Improvements

+ Added an option to always display the Barn Fishing Timer anywhere. - NeoNyaa (https://github.com/hannibal002/SkyHanni/pull/2735)

#### Hoppity Improvements

+ Improved the Time Tower Usage Warning so it doesn't spam messages. - MTOnline (https://github.com/hannibal002/SkyHanni/pull/2730)

#### Misc Improvements

+ Added distance display to waypoints created by Patcher's Send Coords feature. - jani (https://github.com/hannibal002/SkyHanni/pull/2704)
Expand All @@ -63,10 +96,17 @@
+ Fixed an error with compact experiment rewards chat messages. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2702)
+ Fixed Craft Materials Bazaar not working with long item names. - Fazfoxy (https://github.com/hannibal002/SkyHanni/pull/2703)
+ Fixed the debug feature that allows you to add/remove stars being enabled by default. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2715)
+ Fixed displaying the Guardian warning text in the Experimentation Table even when using a Guardian Pet. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2718)
+ Fixed locked Ultimate enchantments being hidden by Enchant Parsing. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/2732)
+ Fixed Chest Value Display on Carpentry Chests. - fazfoxy (https://github.com/hannibal002/SkyHanni/pull/2743)
+ Fixed Compact Item Stars. - Empa, Fazfoxy (https://github.com/hannibal002/SkyHanni/pull/2741)

#### Combat Fixes

+ Fixed Ghost Counter display appearing while in incorrect areas on the map. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2696)
+ Fixed Ashfang Blazes sometimes being highlighted with the wrong color. - Empa (https://github.com/hannibal002/SkyHanni/pull/2112)
+ Fixed Ashfang Reset Cooldown counting in the wrong direction. - Empa (https://github.com/hannibal002/SkyHanni/pull/2112)
+ Fixed Millennia-Aged Blaze not being highlighted by the Area Boss Highlight feature. - jani (https://github.com/hannibal002/SkyHanni/pull/2707)

#### Custom Scoreboard Fixes

Expand All @@ -75,11 +115,32 @@
#### Hoppity Fixes

+ Fixed the chocolate egg share message sometimes displaying the wrong location name. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/2711)
+ Fixed El Dorado not receiving a compacted chat message. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2742)

#### Garden Fixes

+ Fixed farming weight not disappearing when the config option is off. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2731)

#### Crimson Isle Fixes

+ Fixed Replace Lava not working with OptiFine. - CalMWolfs + nopo (https://github.com/hannibal002/SkyHanni/pull/2727)

#### Diana Fixes

+ Fixed Griffin Pet Warning not supporting Diana Autopet rules. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2722)

#### Commands Fixes

+ Fixed /shtranslate not working in most cases. - Obsidian (https://github.com/hannibal002/SkyHanni/pull/2693)

#### Mining Fixes

+ Fixed a crash when attempting to edit the Flowstate Helper config. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2740)

#### Misc Fixes

+ Fixed SkyHanni messages being sent twice. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2736)

### Technical Details

+ Assigned 'backend' label to PRs with 'backend' in the title. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2690)
Expand All @@ -94,6 +155,14 @@
+ Added changelog verification. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2692)
+ This action ensures your PR is in the correct format so that it can be used by the release notes tool.
+ Added dungeon phase detection. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/1865)
+ Added EntityLeaveWorldEvent. - Empa (https://github.com/hannibal002/SkyHanni/pull/2112)
+ Made command registration event-based. - j10a1n15, ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/2642)
+ Added "line to the mob" handler. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2717)
+ No longer use NEU GUI elements for the auto-update button. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2725)
+ Added SkyHanni notifications. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2630)
+ Moved Hoppity Warp Menu config to `HoppityWarpMenuConfig`. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2712)
+ Migrated some LorenzEvents without parameters to SkyHanniEvents. - Empa (https://github.com/hannibal002/SkyHanni/pull/2744)
+ Changed SkyHanniEvents without parameters to be objects. - Empa (https://github.com/hannibal002/SkyHanni/pull/2744)

## Version 0.27

Expand Down
8 changes: 8 additions & 0 deletions docs/FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
+ More chat filters. - Mikecraft1224 (https://github.com/hannibal002/SkyHanni/pull/1750)
+ Filters for rare dungeon chest rewards and sacrifice messages from other players.
+ Add config option to hide achievement spam on Alpha. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2076)
+ Added chat compacting for 'items in stash' warnings. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2639)

</details>
<details open><summary>
Expand Down Expand Up @@ -115,6 +116,8 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
+ Optionally draws a line to them as well.
+ Added a Secret Chime for Dungeons with adjustable pitch and sound. - Ovi_1 (https://github.com/hannibal002/SkyHanni/pull/2478)
+ The sound and pitch of chimes in dungeons are customizable.
+ Added Terminal Waypoints. - Stella (https://github.com/hannibal002/SkyHanni/pull/2719)
+ Displays waypoints during the F7/M7 Goldor Phase.

</details>
<details open><summary>
Expand Down Expand Up @@ -917,6 +920,8 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
+ Added Precision Mining Highlighter. - Cuz_Im_Clicks (https://github.com/hannibal002/SkyHanni/pull/2614)
+ Draws a box over the Precision Mining particles.
+ Added highlighting boxes to Crystal Nucleus crystals during Hoppity's Hunt. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2598)
+ Added Flowstate Helper. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/2561)
+ Displays stats for the Flowstate enchantment on mining tools.

</details>
<details open><summary>
Expand Down Expand Up @@ -1016,6 +1021,9 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
+ Added an easier way to check your unique Hoppity Eggs collected on each island. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/2625)
+ Shows your progress in the Warp Menu.
+ Can be automatically hidden when an island is complete.
+ Added the ability to block opening the Chocolate Factory when Booster Cookie is inactive. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2713)
+ Added a feature to block opening Hoppity's trade menu from Abiphone calls if you do not have coins in your purse. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2664)
+ Added the ability to prevent closing Meal Eggs that have Rabbit the Fish inside. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2712)

### The Carnival

Expand Down
2 changes: 1 addition & 1 deletion root.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {

allprojects {
group = "at.hannibal2.skyhanni"
version = "0.28.Beta.2"
version = "0.28.Beta.4"
repositories {
mavenCentral()
mavenLocal()
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.config.ConfigFileType
import at.hannibal2.skyhanni.config.ConfigManager
import at.hannibal2.skyhanni.config.Features
import at.hannibal2.skyhanni.config.SackData
import at.hannibal2.skyhanni.config.commands.RegisterCommandsEvent
import at.hannibal2.skyhanni.config.commands.CommandRegistrationEvent
import at.hannibal2.skyhanni.data.OtherInventoryData
import at.hannibal2.skyhanni.data.jsonobjects.local.FriendsJson
import at.hannibal2.skyhanni.data.jsonobjects.local.JacobContestsJson
Expand Down Expand Up @@ -59,9 +59,9 @@ class SkyHanniMod {

SkyHanniEvents.init(modules)

RegisterCommandsEvent.post()
CommandRegistrationEvent.post()

PreInitFinishedEvent().post()
PreInitFinishedEvent.post()
}

@Mod.EventHandler
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ object CollectionAPI {
val internalName = incorrectCollectionNames[name] ?: NEUInternalName.fromItemName(name)
collectionValue[internalName] = counter
}
CollectionUpdateEvent().postAndCatch()
CollectionUpdateEvent.post()
}

if (inventoryName.endsWith(" Collections")) {
Expand All @@ -83,7 +83,7 @@ object CollectionAPI {
collectionValue[internalName] = counter
}
}
CollectionUpdateEvent().postAndCatch()
CollectionUpdateEvent.post()
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/at/hannibal2/skyhanni/api/FmlEventApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ object FmlEventApi {

@SubscribeEvent
fun onDisconnect(event: FMLNetworkEvent.ClientDisconnectionFromServerEvent) {
ClientDisconnectEvent().post()
ClientDisconnectEvent.post()
}

@SubscribeEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.data.jsonobjects.repo.DisabledEventsJson
import at.hannibal2.skyhanni.events.DebugDataCollectEvent
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.lang.reflect.Method

Expand Down Expand Up @@ -60,7 +61,7 @@ object SkyHanniEvents {
.filter { it.invokeCount > 0 }
.sortedWith(compareBy({ -it.invokeCount }, { it.name }))
.forEach {
add("- ${it.name} (${it.invokeCount} ${it.invokeCount / (MinecraftData.totalTicks / 20)}/s)")
add("- ${it.name} (${it.invokeCount.addSeparators()} ${it.invokeCount / (MinecraftData.totalTicks / 20)}/s)")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.api.event.SkyHanniEvent
import at.hannibal2.skyhanni.config.commands.Commands.commands
import net.minecraftforge.client.ClientCommandHandler

object RegisterCommandsEvent : SkyHanniEvent() {
object CommandRegistrationEvent : SkyHanniEvent() {
fun register(name: String, block: CommandBuilder.() -> Unit) {
val info = CommandBuilder(name).apply(block)
if (commands.any { it.name == name }) {
Expand Down
Loading

0 comments on commit ba0951f

Please sign in to comment.