geforkt von Mirrors/Paper
Fix some logic on villager poi max attempts
Hopefully will help #3462
Dieser Commit ist enthalten in:
Ursprung
6bff219f15
Commit
8e9b42b127
@ -79,14 +79,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ ++poiAttempts;
|
||||
+ PathEntity pathentity = entitycreature.getNavigation().a(com.google.common.collect.ImmutableSet.of(pos), 8, false, this.a.d());
|
||||
+
|
||||
+ if (poiAttempts <= maxPoiAttempts && pathentity != null && pathentity.h()) {
|
||||
+ if (pathentity != null && pathentity.h()) {
|
||||
+ record.decreaseVacancy();
|
||||
+ GlobalPos globalPos = GlobalPos.create(worldserver.getWorldProvider().getDimensionManager(), pos);
|
||||
+ entitycreature.getBehaviorController().setMemory(this.b, globalPos);
|
||||
+ break OUT;
|
||||
+ }
|
||||
+ if (poiAttempts > maxPoiAttempts) {
|
||||
+ this.e.long2LongEntrySet().removeIf((entry) -> entry.getLongValue() < this.d);
|
||||
+ if (poiAttempts >= maxPoiAttempts) {
|
||||
+ break OUT;
|
||||
+ }
|
||||
+ }
|
||||
@ -94,6 +93,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ // Clean up - vanilla does this only when it runs out, but that would push it to try farther POI's...
|
||||
+ this.e.long2LongEntrySet().removeIf((entry) -> entry.getLongValue() < this.d);
|
||||
+ /*
|
||||
Predicate<BlockPosition> predicate = (blockposition) -> {
|
||||
long j = blockposition.asLong();
|
||||
|
@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
private static ExecutorService k() {
|
||||
- int i = MathHelper.clamp(Runtime.getRuntime().availableProcessors() - 1, 1, 7);
|
||||
+ int i = Math.min(8, Math.max(Runtime.getRuntime().availableProcessors() - 2, 3)); // Paper - use more reasonable default - 2 is hard minimum to avoid using unlimited threads
|
||||
+ int i = Math.min(8, Math.max(Runtime.getRuntime().availableProcessors() - 2, 2)); // Paper - use more reasonable default - 2 is hard minimum to avoid using unlimited threads
|
||||
+ i = Integer.getInteger("Paper.WorkerThreadCount", i); // Paper - allow overriding
|
||||
Object object;
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren