1.15.1 build 17
This commit is contained in:
1 parent
be273d419a
commit
025855af42
4 files changed
+11
-10
No files matched your search
@@ -151,7 +151,7 @@ public abstract class VillagerEntity_aiMixin extends AbstractTraderEntity
|
||||
pv.x, pv.y+1.5, pv.z,
|
||||
50, 0.1, 0.3, 0.1, 0.0);
|
||||
}
|
||||
else if (method_20642((VillagerEntity)(Object)this, poi.getPos()))
|
||||
else if (canReachHome((VillagerEntity)(Object)this, poi.getPos()))
|
||||
((ServerWorld) getEntityWorld()).spawnParticles(ParticleTypes.END_ROD,
|
||||
pv.x, pv.y+1, pv.z,
|
||||
50, 0.1, 0.3, 0.1, 0.0);
|
||||
@@ -166,9 +166,10 @@ public abstract class VillagerEntity_aiMixin extends AbstractTraderEntity
|
||||
}
|
||||
}
|
||||
|
||||
private boolean method_20642(VillagerEntity villagerEntity_1, BlockPos blockPos_1) {
|
||||
Path path_1 = villagerEntity_1.getNavigation().findPathTo(blockPos_1, PointOfInterestType.HOME.method_21648());
|
||||
return path_1 != null && path_1.reachesTarget();
|
||||
// stolen from VillagerBreedTask
|
||||
private boolean canReachHome(VillagerEntity villager, BlockPos pos) {
|
||||
Path path = villager.getNavigation().findPathTo(pos, PointOfInterestType.HOME.getSearchDistance());
|
||||
return path != null && path.reachesTarget();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user