mirror of
https://github.com/PaperMC/Paper
synced 2026-08-20 18:26:12 -04:00
Only scan world if Villager profession has secondary POI (#14144)
This commit is contained in:
parent
714512e3bc
commit
2035ad384c
1 changed files with 10 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
--- a/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
||||
+++ b/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
||||
@@ -27,6 +_,7 @@
|
||||
List<GlobalPos> jobSites = Lists.newArrayList();
|
||||
int horizontalSearch = 4;
|
||||
|
||||
+ if (!body.getVillagerData().profession().value().secondaryPoi().isEmpty()) // Paper - Perf: Only scan world if Villager profession has secondary POI
|
||||
for (int x = -4; x <= 4; x++) {
|
||||
for (int y = -2; y <= 2; y++) {
|
||||
for (int z = -4; z <= 4; z++) {
|
||||
Loading…
Add table
Add a link
Reference in a new issue