From 57efe36b45eb81aeea505b1aa8579e0d8cc760a7 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 2 Apr 2023 21:58:15 +0200 Subject: Fixed a bug where crops per minute could not be calculated when entering the server for the first time with skyhanni --- src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt index 5294d79a1..5d9fb4713 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt @@ -3,9 +3,9 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.CropMilestoneUpdateEvent import at.hannibal2.skyhanni.events.InventoryOpenEvent -import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.utils.ItemUtils.getLore +import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.regex.Pattern @@ -27,7 +27,7 @@ class GardenCropMilestones { // } @SubscribeEvent - fun onProfileJoin(event: ProfileJoinEvent) { + fun onWorldChange(event: WorldEvent.Load) { if (cropCounter.isEmpty()) { for (crop in CropType.values()) { crop.setCounter(0) -- cgit