Skip to content

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
CalMWolfs committed Dec 10, 2024
1 parent 4743094 commit 8b769c6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import net.minecraft.nbt.NBTException
import net.minecraft.nbt.NBTTagCompound
import net.minecraft.nbt.NBTTagList
import net.minecraft.nbt.NBTTagString
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.io.File
import java.io.FileInputStream
import java.io.InputStreamReader
Expand Down Expand Up @@ -78,7 +77,7 @@ object EnoughUpdatesManager {
itemMap.clear()
itemMap.putAll(tempItemMap)
}
NeuRepositoryReloadEvent().postAndCatch()
NeuRepositoryReloadEvent.post()
ChatUtils.chat("Reloaded ${itemMap.size} items in the NEU repo")
}
}
Expand Down Expand Up @@ -364,7 +363,7 @@ object EnoughUpdatesManager {
}
}

@SubscribeEvent
@HandleEvent
fun onNeuRepoReload(event: NeuRepositoryReloadEvent) {
neuPetsJson = event.readConstant<NeuPetsJson>("pets")
neuPetNums = event.readConstant<JsonObject>("petnums")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package at.hannibal2.skyhanni.api.enoughupdates

import at.hannibal2.skyhanni.api.enoughupdates.EnoughUpdatesManager
import at.hannibal2.skyhanni.data.jsonobjects.other.HypixelApiTrophyFish
import at.hannibal2.skyhanni.data.jsonobjects.other.HypixelPlayerApiJson
import at.hannibal2.skyhanni.events.NeuProfileDataLoadedEvent
import at.hannibal2.skyhanni.events.NeuRepositoryReloadEvent
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.NumberUtil.isInt
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/at/hannibal2/skyhanni/utils/ItemNameResolver.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.utils

import at.hannibal2.skyhanni.api.enoughupdates.ItemResolutionQuery
import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.events.NeuRepositoryReloadEvent
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName
Expand All @@ -9,7 +10,6 @@ import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary
import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.allLettersFirstUppercase
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent

@SkyHanniModule
object ItemNameResolver {
Expand Down Expand Up @@ -131,7 +131,7 @@ object ItemNameResolver {
return NEUItems.allItemsCache.filter { it.key.removeColor() == removeColor }.values.firstOrNull()
}

@SubscribeEvent
@HandleEvent
fun onNeuRepoReload(event: NeuRepositoryReloadEvent) {
itemNameCache.clear()
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package at.hannibal2.skyhanni.utils

import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.api.enoughupdates.EnoughUpdatesManager
import at.hannibal2.skyhanni.api.enoughupdates.ItemResolutionQuery
import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.config.ConfigManager
import at.hannibal2.skyhanni.data.jsonobjects.repo.MultiFilterJson
import at.hannibal2.skyhanni.events.NeuRepositoryReloadEvent
Expand Down

0 comments on commit 8b769c6

Please sign in to comment.