diff --git a/patches/server/0046-Async-PathProcessing.patch b/patches/server/0046-Async-PathProcessing.patch index d6be26d..f98ea4d 100644 --- a/patches/server/0046-Async-PathProcessing.patch +++ b/patches/server/0046-Async-PathProcessing.patch @@ -34,7 +34,7 @@ index fe502445a77afe7e3807afae48d7bf03f370e290..13392bd98a0c7fa9b859c2dfa7a01b24 + for(Pair, BlockPos> pair : set) { + long2ObjectMap.computeIfAbsent( + pair.getSecond().asLong(), -+ (m) -> new JitteredLinearRetry(entity.level.random, time) ++ (m) -> new JitteredLinearRetry(entity.level().random, time) + ); + } + return; @@ -747,7 +747,7 @@ index a8af51a25b0f99c3a64d9150fdfcd6b818aa7581..bd7a98a3cf36a36fea7db8c2933f925e - this.openSet.clear(); - this.nodeEvaluator.prepare(world, mob); - Node node = this.nodeEvaluator.getStart(); -+ if (!mob.level.plazmaLevelConfiguration().entity.asyncPathProcessing.enabled) this.openSet.clear();// Plazma - it's always cleared in processPath ++ if (!mob.level().plazmaLevelConfiguration().entity.asyncPathProcessing.enabled) this.openSet.clear();// Plazma - it's always cleared in processPath + // Plazma start - use a generated evaluator if we have one otherwise run sync + NodeEvaluator nodeEvaluator = this.nodeEvaluatorGenerator == null ? this.nodeEvaluator : org.plazmamc.plazma.entity.path.NodeEvaluatorCache.takeNodeEvaluator(this.nodeEvaluatorGenerator, this.nodeEvaluator); + nodeEvaluator.prepare(world, mob);