feat: add stuckEntityPoiRetryDelay config (#12949)

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
This commit is contained in:
MC_XiaoHei
2025-08-24 00:39:19 +08:00
committed by GitHub
parent 79cf1353b9
commit ea014f7a77
2 changed files with 4 additions and 1 deletions
@@ -4,7 +4,7 @@
return false;
} else {
mutableLong.setValue(time + 20L + level.getRandom().nextInt(20));
+ if (mob.getNavigation().isStuck()) mutableLong.add(200); // Paper - Perf: Wait an additional 10s to check again if they're stuck // TODO Modifies Vanilla behavior, add config option
+ if (level.paperConfig().entities.behavior.stuckEntityPoiRetryDelay.enabled() && mob.getNavigation().isStuck()) mutableLong.add(level.paperConfig().entities.behavior.stuckEntityPoiRetryDelay.intValue()); // Paper - Next stuck check delay config
PoiManager poiManager = level.getPoiManager();
map.long2ObjectEntrySet().removeIf(entry -> !entry.getValue().isStillValid(time));
Predicate<BlockPos> predicate1 = pos -> {