aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-26 15:46:54 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-26 15:46:54 +0100
commita5540841c951f2f694cf48f8dd093f69e9d36c44 (patch)
treebfe652984b93789a98e699793baf16776acb9fdc /src/main/java/at/hannibal2/skyhanni/features
parent69b7a4688ed84b89b21545ebb382cf8a4f57307c (diff)
downloadskyhanni-a5540841c951f2f694cf48f8dd093f69e9d36c44.tar.gz
skyhanni-a5540841c951f2f694cf48f8dd093f69e9d36c44.tar.bz2
skyhanni-a5540841c951f2f694cf48f8dd093f69e9d36c44.zip
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingTrackerCategoryManager.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt2
6 files changed, 7 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt
index a7dd3e845..241d208a3 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt
@@ -39,7 +39,7 @@ class BazaarApi {
holder.getData(this)
} else null
- fun isBazaarItem(stack: ItemStack) = stack.getInternalName().isBazaarItem()
+ fun isBazaarItem(stack: ItemStack): Boolean = stack.getInternalName().isBazaarItem()
fun NEUInternalName.isBazaarItem() = NEUItems.manager.auctionManager.getBazaarInfo(asString()) != null
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt
index 9dab12e79..671b42848 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt
@@ -18,7 +18,6 @@ import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary
import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
-import io.github.moulberry.notenoughupdates.NotEnoughUpdates
import io.github.moulberry.notenoughupdates.recipes.CraftingRecipe
import net.minecraft.client.Minecraft
import net.minecraft.item.ItemStack
@@ -145,7 +144,7 @@ class MinionCraftHelper {
allIngredients.clear()
- for (internalId in NotEnoughUpdates.INSTANCE.manager.itemInformation.keys) {
+ for (internalId in NEUItems.allNeuRepoItems().keys) {
val internalName = internalId.asInternalName()
if (internalName.endsWith("_GENERATOR_1")) {
if (internalName == "REVENANT_GENERATOR_1".asInternalName() ||
diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt
index 147775fed..c486f6f50 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt
@@ -22,7 +22,7 @@ object ViewRecipeCommand {
val list by lazy {
val list = mutableListOf<String>()
- for ((key, value) in NEUItems.manager.itemInformation) {
+ for ((key, value) in NEUItems.allNeuRepoItems()) {
if (value.has("recipe")) {
list.add(key.lowercase())
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingTrackerCategoryManager.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingTrackerCategoryManager.kt
index 2006975ad..8c240799f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingTrackerCategoryManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingTrackerCategoryManager.kt
@@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.data.jsonobjects.repo.FishingProfitItemsJson
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
-import io.github.moulberry.notenoughupdates.NotEnoughUpdates
+import at.hannibal2.skyhanni.utils.NEUItems
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
object FishingTrackerCategoryManager {
@@ -28,7 +28,7 @@ object FishingTrackerCategoryManager {
fun onNeuRepoReload(event: io.github.moulberry.notenoughupdates.events.RepositoryReloadEvent) {
val totalDrops = mutableListOf<String>()
val dropCategories = mutableMapOf<String, MutableList<NEUInternalName>>()
- for ((seaCreature, data) in NotEnoughUpdates.INSTANCE.manager.itemInformation.filter { it.key.endsWith("_SC") }) {
+ for ((seaCreature, data) in NEUItems.allNeuRepoItems().filter { it.key.endsWith("_SC") }) {
val asJsonObject = data.getAsJsonArray("recipes")[0].asJsonObject
val drops = asJsonObject.getAsJsonArray("drops")
.map { it.asJsonObject.get("id").asString }.map { it.split(":").first() }
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
index 0b695149b..c9ff17c5b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
@@ -45,7 +45,6 @@ import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.TimeUtils
import at.hannibal2.skyhanni.utils.renderables.Renderable
-import io.github.moulberry.notenoughupdates.NotEnoughUpdates
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.util.Collections
@@ -551,7 +550,7 @@ object ComposterOverlay {
private fun updateOrganicMatterFactors(baseValues: Map<NEUInternalName, Double>): Map<NEUInternalName, Double> {
val map = mutableMapOf<NEUInternalName, Double>()
- for ((internalName, _) in NotEnoughUpdates.INSTANCE.manager.itemInformation) {
+ for ((internalName, _) in NEUItems.allNeuRepoItems()) {
if (internalName == "POTION_AFFINITY_TALISMAN"
|| internalName == "CROPIE_TALISMAN"
|| internalName.endsWith("_BOOTS")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt
index e46b9e56e..9c3d91065 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt
@@ -398,7 +398,7 @@ object CropMoneyDisplay {
SkyHanniMod.coroutineScope.launch {
val map = mutableMapOf<NEUInternalName, Int>()
- for ((rawInternalName, _) in NEUItems.manager.itemInformation) {
+ for ((rawInternalName, _) in NEUItems.allNeuRepoItems()) {
if (rawInternalName == "ENCHANTED_PAPER") continue
if (rawInternalName == "ENCHANTED_BREAD") continue
if (rawInternalName == "SIMPLE_CARROT_CANDY") continue