diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/laneswitch/FarmingLaneConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/laneswitch/FarmingLaneConfig.java index 667e3233109d..bb7ea595b94d 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/laneswitch/FarmingLaneConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/laneswitch/FarmingLaneConfig.java @@ -2,13 +2,18 @@ import at.hannibal2.skyhanni.config.FeatureToggle; import at.hannibal2.skyhanni.config.core.config.Position; +import at.hannibal2.skyhanni.features.garden.CropType; import com.google.gson.annotations.Expose; import io.github.notenoughupdates.moulconfig.annotations.Accordion; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDraggableList; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorInfoText; import io.github.notenoughupdates.moulconfig.annotations.ConfigLink; import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; +import java.util.ArrayList; +import java.util.List; + public class FarmingLaneConfig { @Expose @@ -37,4 +42,11 @@ public class FarmingLaneConfig { @FeatureToggle public boolean cornerWaypoints = false; + @Expose + @ConfigOption( + name = "Ignored Crops", + desc = "Add the crops you wish to not setup a lane for." + ) + @ConfigEditorDraggableList() + public List ignoredCrops = new ArrayList<>(); } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt index ba0eaee5dd4e..b9b091e53a27 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt @@ -43,6 +43,7 @@ object FarmingLaneAPI { private fun warnNoLane(crop: CropType?) { if (crop == null || currentLane != null) return + if (crop in config.ignoredCrops) return if (!GardenAPI.hasFarmingToolInHand()) return if (FarmingLaneCreator.detection) return if (!config.distanceDisplay && !config.laneSwitchNotification.enabled) return