From 355cb791a6feac2955d12b41df375fd957a8cf34 Mon Sep 17 00:00:00 2001 From: Taiyou06 Date: Sat, 7 Jun 2025 12:49:27 +0200 Subject: [PATCH] disable async target find when pwt enabled --- .../leaf/config/modules/async/AsyncTargetFinding.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncTargetFinding.java b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncTargetFinding.java index c2ebeb42..c22f1ce4 100644 --- a/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncTargetFinding.java +++ b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncTargetFinding.java @@ -1,8 +1,8 @@ - package org.dreeam.leaf.config.modules.async; import org.dreeam.leaf.config.ConfigModules; import org.dreeam.leaf.config.EnumConfigCategory; +import org.dreeam.leaf.config.LeafConfig; public class AsyncTargetFinding extends ConfigModules { @@ -33,6 +33,11 @@ public class AsyncTargetFinding extends ConfigModules { asyncTargetFindingInitialized = true; enabled = config.getBoolean(getBasePath() + ".enabled", enabled); + // Disable if parallel world ticking is enabled, as they are incompatible. + if (enabled && SparklyPaperParallelWorldTicking.enabled) { + LeafConfig.LOGGER.warn("Async Target Finding is incompatible with Parallel World Ticking. Disabling Async Target Finding automatically."); + enabled = false; + } alertOther = config.getBoolean(getBasePath() + ".async-alert-other", true); searchBlock = config.getBoolean(getBasePath() + ".async-search-block", true); searchEntity = config.getBoolean(getBasePath() + ".async-search-entity", true);