Fix possible NPE in searching code.
This commit is contained in:
parent
7246914605
commit
5c334d7627
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@
|
||||||
+ if (this.attacker.getNavigator().getPath() != null)
|
+ if (this.attacker.getNavigator().getPath() != null)
|
||||||
+ {
|
+ {
|
||||||
+ PathPoint finalPathPoint = this.attacker.getNavigator().getPath().getFinalPathPoint();
|
+ PathPoint finalPathPoint = this.attacker.getNavigator().getPath().getFinalPathPoint();
|
||||||
+ if (entitylivingbase.getDistanceSq(finalPathPoint.xCoord, finalPathPoint.yCoord, finalPathPoint.zCoord) < 1)
|
+ if (finalPathPoint != null && entitylivingbase.getDistanceSq(finalPathPoint.xCoord, finalPathPoint.yCoord, finalPathPoint.zCoord) < 1)
|
||||||
+ {
|
+ {
|
||||||
+ failedPathFindingPenalty = 0;
|
+ failedPathFindingPenalty = 0;
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in a new issue