Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IPECTER authored Sep 7, 2023
1 parent 514495b commit 3949e2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patches/server/0046-Async-PathProcessing.patch
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ index fe502445a77afe7e3807afae48d7bf03f370e290..13392bd98a0c7fa9b859c2dfa7a01b24
+ for(Pair<Holder<PoiType>, BlockPos> pair : set) {
+ long2ObjectMap.computeIfAbsent(
+ pair.getSecond().asLong(),
+ (m) -> new JitteredLinearRetry(entity.level.random, time)
+ (m) -> new JitteredLinearRetry(entity.level().random, time)
+ );
+ }
+ return;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3949e2f

Please sign in to comment.