Skip to content

Commit

Permalink
Merge branch 'refs/heads/refactor' into branch-2
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt
#	src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
#	src/main/java/at/hannibal2/skyhanni/features/misc/PartyMemberOutlines.kt
#	src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt
#	src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt
#	src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt
#	src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt
  • Loading branch information
catgirlseraid committed May 14, 2024
2 parents a764aa5 + 104eff0 commit fb36f03
Show file tree
Hide file tree
Showing 129 changed files with 1,076 additions and 557 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/remove-labels-on-pr-close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ name: "Remove All Labels"

on:
pull_request_target:
types: [closed]
types: [ closed ]

jobs:
remove_very_soon:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: rogerluan/label-remover@v1.0.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- uses: rogerluan/label-remover@v1.0.1
with:
github_token: ${{ secrets.github_token }}
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ plugins {
}

group = "at.hannibal2.skyhanni"
version = "0.25.Beta.25"
version = "0.25.Beta.26"

val gitHash by lazy {
val baos = ByteArrayOutputStream()
Expand Down
17 changes: 17 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@
+ Added /shignore. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/1469)
+ This lets you block users from running party commands.
+ Option to Replace Roman Numerals. - Mikecraft1224 (https://github.com/hannibal002/SkyHanni/pull/1722)
+ Added a simple Ferocity Display. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1765)
+ Shows the Ferocity stat as a single GUI element.
+ Requires the Tab List widget to be enabled and Ferocity to be selected to work.

### Improvements

Expand Down Expand Up @@ -234,6 +237,8 @@
+ Maeve's Garden visitor dialogue is no longer hidden, preventing confusion about potential bugs.
+ Displays the middle of the plot while the pest line is showing. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1647)
+ This makes it clearer when the guess points to the middle of the plot rather than to a pest.
+ Improved pest count accuracy in plot detection. - Empa (https://github.com/hannibal002/SkyHanni/pull/1764)
+ Added options to show crops per second and crops per hour in the Crop Milestone Display. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1536)

#### Diana Improvements

Expand Down Expand Up @@ -327,6 +332,7 @@
+ Click an item that can be upgraded/purchased with chocolate to set it as a reminder goal.
+ Works with Rabbits, Barn, Time Tower, etc.
+ Option to display this timer universally, even outside the inventory.
+ Added a display for the time remaining until Tower Charges are full. - Empa (https://github.com/hannibal002/SkyHanni/pull/1760)

#### Slayer Improvements

Expand Down Expand Up @@ -358,6 +364,7 @@
+ Renamed Deep Caverns parkour to Deep Caverns Guide. - seraid (https://github.com/hannibal002/SkyHanni/pull/1443)
+ Make Fossil Excavator a category rather than accordion. - walker (https://github.com/hannibal002/SkyHanni/pull/1441)
+ Disabled colored blocks in the Mineshaft. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1749)
+ Disabled mining commissions block color in Dwarven Mines. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1790)

#### Event Improvements

Expand Down Expand Up @@ -398,6 +405,7 @@
+ Improved wording for Chocolate Factory spam filter and upgrade notification config options. -
CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1729)
+ Added an option to only receive Rabbit Crush warnings during the Hoppity event. - Empa (https://github.com/hannibal002/SkyHanni/pull/1762)
+ Warn when all three Hoppity eggs are ready to be found. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1747)

#### Rift Improvements

Expand Down Expand Up @@ -430,6 +438,8 @@
+ Architect Draft messages can now be copied and pasted. - raven (https://github.com/hannibal002/SkyHanni/pull/1732)
+ Updated setting description for clarity. - seraid (https://github.com/hannibal002/SkyHanni/pull/1736)
+ The GUI position editor can now edit all GUIs that were visible within the last 20 seconds, including those inside inventories. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1768)
+ Improved the performance of scoreboard and tab list reading. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1779)
+ Improved performance of minion nametag feature and removed unnecessary checks between blocks. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1780)

### Fixes

Expand Down Expand Up @@ -514,6 +524,8 @@
+ Fixed stash getting detected as private message. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1716)
+ Fixed spaces in chat formatting. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1704)
+ Fixed player chat spacing issue with the crimson faction icon. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1770)
+ Fixed extra space in chat formatting. - Jordyrat (https://github.com/hannibal002/SkyHanni/pull/1785)
+ Fixed incorrect chat format when using the Hypixel command /show. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1781)

#### GUI Fixes

Expand Down Expand Up @@ -567,6 +579,7 @@
+ Fixed more double objectives in Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1731)
+ Fixed missing Hay Eaten line in Custom Scoreboard in Rift. - Empa (https://github.com/hannibal002/SkyHanni/pull/1721)
+ Fixed Custom Scoreboard showing the Spooky Festival Time twice. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1757)
+ Fixed unknown scoreboard lines chat error message when Hypixel sends incomplete line data. - Empa (https://github.com/hannibal002/SkyHanni/pull/1761)

#### Dungeon Fixes

Expand Down Expand Up @@ -612,6 +625,7 @@
+ Fixed the Chocolate Factory upgrade warning incorrectly displaying when no upgrade was possible. -
CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1741)
+ Fixed a case where the chocolate factory upgrade warning did not work. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1758)
+ Fixed Chocolate Factory time remaining calculations while the Time Tower is active. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1774)

#### Rift Fixes

Expand All @@ -620,6 +634,7 @@
+ Fixed Blood Effigies timers in the Rift. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1649)
+ Fixed timers showing even when above the set respawn time.
+ Fixed display flickering due to milliseconds.
+ Fixed duplicate word "soul" in an Enigma Waypoint. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1776)

#### Mining Fixes

Expand Down Expand Up @@ -706,6 +721,7 @@
j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1698)
+ Fixed Active Effects in Compact Tab List always showing 0. - Luna (https://github.com/hannibal002/SkyHanni/pull/1706)
+ Fixed bugged minion name tags on your private island when opening a minion. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1630)
+ Fixed supercrafted items being incorrectly added to profit trackers. - Empa (https://github.com/hannibal002/SkyHanni/pull/1784)

### Technical Details

Expand Down Expand Up @@ -886,6 +902,7 @@
ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/1696)
+ Useful for hiding extra layers of a player such as armor, capes, Items and so on.
+ Removed code duplication in AxisAlignedBB.getCorners. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1756)
+ Added a RemovalListener to TimeLimitedCache and TimeLimitedSet. - Empa (https://github.com/hannibal002/SkyHanni/pull/1761)

### Removed Features

Expand Down
3 changes: 3 additions & 0 deletions docs/FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,9 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
+ Inventory background to GUI editor. - seraid (https://github.com/hannibal002/SkyHanni/pull/1622)
+ Added option to hide item tooltips inside the Harp. - raven (https://github.com/hannibal002/SkyHanni/pull/1700)
+ Option to Replace Roman Numerals. - Mikecraft1224 (https://github.com/hannibal002/SkyHanni/pull/1722)
+ Simple Ferocity Display. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1765)
+ Shows the Ferocity stat as a single GUI element.
+ Requires the Tab List widget to be enabled and Ferocity to be selected to work.

</details>
<details open><summary>
Expand Down
26 changes: 18 additions & 8 deletions src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import at.hannibal2.skyhanni.data.ActionBarStatsData
import at.hannibal2.skyhanni.data.ChatManager
import at.hannibal2.skyhanni.data.CropAccessoryData
import at.hannibal2.skyhanni.data.EntityMovementData
import at.hannibal2.skyhanni.data.EventCounter
import at.hannibal2.skyhanni.data.FameRanks
import at.hannibal2.skyhanni.data.FixedRateTimerManager
import at.hannibal2.skyhanni.data.FriendAPI
Expand Down Expand Up @@ -87,6 +88,7 @@ import at.hannibal2.skyhanni.features.chat.playerchat.PlayerChatFilter
import at.hannibal2.skyhanni.features.chat.playerchat.PlayerChatModifier
import at.hannibal2.skyhanni.features.chroma.ChromaManager
import at.hannibal2.skyhanni.features.combat.BestiaryData
import at.hannibal2.skyhanni.features.combat.FerocityDisplay
import at.hannibal2.skyhanni.features.combat.HideDamageSplash
import at.hannibal2.skyhanni.features.combat.damageindicator.DamageIndicatorManager
import at.hannibal2.skyhanni.features.combat.endernodetracker.EnderNodeTracker
Expand Down Expand Up @@ -445,8 +447,8 @@ import at.hannibal2.skyhanni.test.TestCopyRngMeterValues
import at.hannibal2.skyhanni.test.TestExportTools
import at.hannibal2.skyhanni.test.TestShowSlotNumber
import at.hannibal2.skyhanni.test.WorldEdit
import at.hannibal2.skyhanni.test.command.CopyNearbyParticlesCommand
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.test.command.TrackParticlesCommand
import at.hannibal2.skyhanni.test.command.TrackSoundsCommand
import at.hannibal2.skyhanni.test.hotswap.HotswapSupport
import at.hannibal2.skyhanni.utils.ChatUtils
Expand Down Expand Up @@ -483,7 +485,7 @@ import org.apache.logging.log4j.Logger
clientSideOnly = true,
useMetadata = true,
guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop",
version = "0.25.Beta.25",
version = "0.25.Beta.26",
)
class SkyHanniMod {

Expand Down Expand Up @@ -514,6 +516,7 @@ class SkyHanniMod {
loadModule(EntityMovementData())
loadModule(EntityOutlineRenderer)
loadModule(EntityUtils)
loadModule(EventCounter)
loadModule(FixedRateTimerManager())
loadModule(GardenBestCropTime())
loadModule(GardenComposterUpgradesData())
Expand Down Expand Up @@ -710,6 +713,7 @@ class SkyHanniMod {
loadModule(FarmingLaneCreator)
loadModule(FarmingLaneFeatures)
loadModule(FarmingWeightDisplay())
loadModule(FerocityDisplay())
loadModule(FirePillarDisplay())
loadModule(FireVeilWandParticles())
loadModule(FishingBaitWarnings())
Expand Down Expand Up @@ -893,7 +897,7 @@ class SkyHanniMod {
loadModule(SulphurSkitterBox())
loadModule(SummoningMobManager())
loadModule(SummoningSoulsName())
loadModule(SuperCraftFeatures())
loadModule(SuperCraftFeatures)
loadModule(SuperpairsClicksAlert())
loadModule(TabListReader)
loadModule(TabListRenderer)
Expand Down Expand Up @@ -932,26 +936,24 @@ class SkyHanniMod {
loadModule(WildStrawberryDyeNotification())
loadModule(WrongFungiCutterWarning())

init()

// test stuff
loadModule(ButtonOnPause())
loadModule(CopyNearbyParticlesCommand)
loadModule(FixGhostEntities)
loadModule(HighlightMissingRepoItems())
loadModule(PacketTest)
loadModule(ParkourWaypointSaver())
loadModule(SkyHanniDebugsAndTests())
loadModule(SkyHanniDebugsAndTests)
loadModule(TestBingo)
loadModule(TestCopyBestiaryValues)
loadModule(TestCopyRngMeterValues)
loadModule(TestShowSlotNumber())
loadModule(TrackParticlesCommand)
loadModule(TrackSoundsCommand)
loadModule(WorldEdit)
PreInitFinishedEvent().postAndCatch()

loadModule(MobDebug())
init()
PreInitFinishedEvent().postAndCatch()
}

@Mod.EventHandler
Expand All @@ -969,10 +971,18 @@ class SkyHanniMod {
} catch (e: Exception) {
Exception("Error reading repo data", e).printStackTrace()
}
// TODO rework
loadedClasses.clear()
}

private val loadedClasses = mutableSetOf<Any>()

fun loadModule(obj: Any) {
modules.add(obj)
if (!loadedClasses.add(obj.javaClass.name)) {
println("Loading module twice: ${obj.javaClass.name}")
}

MinecraftForge.EVENT_BUS.register(obj)
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/at/hannibal2/skyhanni/api/BlockChangeAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
object BlockChangeAPI {

@SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true)
fun onChatPacket(event: PacketEvent.ReceiveEvent) {
fun onPacketReceive(event: PacketEvent.ReceiveEvent) {
if (event.packet is S23PacketBlockChange) {
val blockPos = event.packet.blockPosition ?: return
val blockState = event.packet.blockState ?: return
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
@@ -1,5 +1,6 @@
package at.hannibal2.skyhanni.api

import at.hannibal2.skyhanni.data.item.SkyhanniItems
import at.hannibal2.skyhanni.events.CollectionUpdateEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.ItemAddEvent
Expand All @@ -9,7 +10,6 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
import at.hannibal2.skyhanni.utils.NEUItems
import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull
import at.hannibal2.skyhanni.utils.NumberUtil.formatLong
Expand Down Expand Up @@ -38,7 +38,7 @@ object CollectionAPI {

// TODO repo
private val incorrectCollectionNames = mapOf(
"Mushroom" to "RED_MUSHROOM".asInternalName()
"Mushroom" to SkyhanniItems.RED_MUSHROOM()
)

@SubscribeEvent
Expand Down
36 changes: 13 additions & 23 deletions src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -203,37 +203,27 @@ object SkillAPI {
}

@SubscribeEvent
fun onDebugDataCollectCurrent(event: DebugDataCollectEvent) {
event.title("Current Skill")
fun onDebugDataCollect(event: DebugDataCollectEvent) {
event.title("Skills")
val storage = storage
if (storage == null) {
event.addIrrelevant("SkillMap is empty")
return
}

val skillType = activeSkill
if (skillType == null) {
event.addIrrelevant("activeSkill is null")
return
}

event.addData {
storage[skillType]?.let { skillInfo ->
addDebug(skillType, skillInfo)
event.addIrrelevant {
val activeSkill = activeSkill
if (activeSkill == null) {
add("activeSkill is null")
} else {
add("active skill:")
storage[activeSkill]?.let { skillInfo ->
addDebug(activeSkill, skillInfo)
}
add("")
add("")
}
}
}

@SubscribeEvent
fun onDebugDataCollectAll(event: DebugDataCollectEvent) {
event.title("All Skills")
val storage = storage
if (storage == null) {
event.addIrrelevant("SkillMap is empty")
return
}

event.addIrrelevant {
for ((skillType, skillInfo) in storage) {
addDebug(skillType, skillInfo)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ class ConfigManager {

// debug features
"features.dev.DebugConfig.trackSoundPosition",
"features.dev.DebugConfig.trackParticlePosition",
"features.dev.DevConfig.debugPos",
"features.dev.DevConfig.debugLocationPos",
"features.dev.DevConfig.debugItemPos",
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/at/hannibal2/skyhanni/config/Features.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import at.hannibal2.skyhanni.config.features.skillprogress.SkillProgressConfig;
import at.hannibal2.skyhanni.config.features.slayer.SlayerConfig;
import at.hannibal2.skyhanni.config.storage.Storage;
import at.hannibal2.skyhanni.utils.LorenzUtils;
import at.hannibal2.skyhanni.utils.datetime.DateUtils;
import com.google.gson.annotations.Expose;
import io.github.notenoughupdates.moulconfig.Config;
import io.github.notenoughupdates.moulconfig.Social;
Expand All @@ -43,7 +43,7 @@ public boolean shouldAutoFocusSearchbar() {

@Override
public HorizontalAlign alignCategory(ProcessedCategory category, boolean isSelected) {
if (LorenzUtils.INSTANCE.isAprilFoolsDay())
if (DateUtils.isAprilFools())
return HorizontalAlign.RIGHT;
return super.alignCategory(category, isSelected);
}
Expand All @@ -65,7 +65,7 @@ public void saveNow() {
@Override
public String getTitle() {
String modName = "SkyHanni";
if (LorenzUtils.INSTANCE.isAprilFoolsDay())
if (DateUtils.isAprilFools())
modName = new StringBuilder().append("اسکای هانی").reverse().toString(); // Minecraft does not render RTL strings very nicely, so we reverse the string here. Not authentic, but close enough.

return modName + " " + SkyHanniMod.getVersion() + " by §channibal2§r, config by §5Moulberry §rand §5nea89";
Expand Down
Loading

0 comments on commit fb36f03

Please sign in to comment.