From 8f7e9ae1711ca4172c7a2fe046666d33033906c2 Mon Sep 17 00:00:00 2001 From: Empa <42304516+ItsEmpa@users.noreply.github.com> Date: Sat, 27 Apr 2024 11:38:40 +0200 Subject: Fix: Remove pest error (#1563) --- .../java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt index bd0ee5407..98e712167 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt @@ -132,13 +132,12 @@ object PestAPI { plot.pests = scoreboardPests - accurateAmount plot.isPestCountInaccurate = false } else if (accurateAmount + inaccurateAmount > scoreboardPests) { // when logic fails and we reach impossible pest counts - sendPestError(true) getInfestedPlots().forEach { it.pests = 0 it.isPestCountInaccurate = true } if (loop > 0) fixPests(loop - 1) - else sendPestError(false) + else sendPestError() } } @@ -282,13 +281,14 @@ object PestAPI { updatePests() } - private fun sendPestError(betaOnly: Boolean) { + private fun sendPestError() { ErrorManager.logErrorStateWithData( "Error getting pest count", "Impossible pest count", "scoreboardPests" to scoreboardPests, "plots" to getInfestedPlots().map { "id: ${it.id} pests: ${it.pests} isInaccurate: ${it.isPestCountInaccurate}" }, - noStackTrace = true, betaOnly = betaOnly + noStackTrace = true, + betaOnly = true ) } -- cgit