diff options
3 files changed, 7 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt index eaa7f87cf..ebf444535 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt @@ -271,7 +271,7 @@ class FarmingWeightDisplay { } else { leaderboardPosition-- } - ProfileStorageData.profileSpecific?.garden?.farmingWeight?.lastFarmingWeightLeaderboard = + GardenAPI.storage?.farmingWeight?.lastFarmingWeightLeaderboard = leaderboardPosition // Remove passed player to present the next one @@ -374,7 +374,7 @@ class FarmingWeightDisplay { if (wasNotLoaded && config.showLbChange) { checkOffScreenLeaderboardChanges() } - ProfileStorageData.profileSpecific?.garden?.farmingWeight?.lastFarmingWeightLeaderboard = + GardenAPI.storage?.farmingWeight?.lastFarmingWeightLeaderboard = leaderboardPosition lastLeaderboardUpdate = System.currentTimeMillis() isLoadingLeaderboard = false diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/NPCVisitorFix.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/NPCVisitorFix.kt index ba4a5c80e..b367bd55b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/NPCVisitorFix.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/NPCVisitorFix.kt @@ -1,6 +1,5 @@ package at.hannibal2.skyhanni.features.garden.visitor -import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.InventoryOpenEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.garden.visitor.VisitorOpenEvent @@ -24,8 +23,6 @@ import kotlin.time.Duration.Companion.seconds * Fixing the visitor detection problem with Anita and Jacob, as those two are on the garden twice when visiting. */ object NPCVisitorFix { - - private val storage get() = ProfileStorageData.profileSpecific?.garden private val staticVisitors = listOf("Jacob", "Anita") private val barnSkinChangePattern by RepoPattern.pattern( @@ -47,7 +44,7 @@ object NPCVisitorFix { // clicked on the real visitor, ignoring if (lastVisitorOpen.passedSince() < 1.seconds) return - val storage = storage ?: return + val storage = GardenAPI.storage ?: return val location = entity.getLorenzVec() storage.npcVisitorLocations[name]?.let { @@ -69,7 +66,7 @@ object NPCVisitorFix { @SubscribeEvent fun onChat(event: LorenzChatEvent) { barnSkinChangePattern.matchMatcher(event.message) { - storage?.npcVisitorLocations?.clear() + GardenAPI.storage?.npcVisitorLocations?.clear() } } @@ -81,7 +78,7 @@ object NPCVisitorFix { return nametags[0] } - val staticLocation = storage?.npcVisitorLocations?.get(visitorName) ?: return null + val staticLocation = GardenAPI.storage?.npcVisitorLocations?.get(visitorName) ?: return null for (entity in nametags.toMutableList()) { val distance = entity.distanceTo(staticLocation) diff --git a/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt b/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt index 5e03464b7..9351fb841 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.test import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.events.BlockClickEvent +import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.withAlpha import at.hannibal2.skyhanni.utils.ChatUtils @@ -13,7 +14,6 @@ import at.hannibal2.skyhanni.utils.RenderUtils.expandBlock import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getItemId import net.minecraft.util.AxisAlignedBB import net.minecraft.util.BlockPos -import net.minecraftforge.client.event.RenderWorldLastEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.awt.Color @@ -69,7 +69,7 @@ object WorldEdit { } @SubscribeEvent - fun onRenderWorldLast(event: RenderWorldLastEvent) { + fun onRenderWorldLast(event: LorenzRenderWorldEvent) { if (!isEnabled()) return leftPos?.let { l -> |