Fixed an NPE the can happen when using a builder with path markers.
This commit is contained in:
parent
f135d09d03
commit
e3c38609ed
1 changed files with 6 additions and 3 deletions
|
@ -246,9 +246,12 @@ public class EntityRobot extends Entity implements ISpawnHandler {
|
||||||
|
|
||||||
Action a = targets.getFirst();
|
Action a = targets.getFirst();
|
||||||
BptSlotInfo target = a.slot;
|
BptSlotInfo target = a.slot;
|
||||||
|
|
||||||
laser.setPositions(new Position(posX, posY, posZ), new Position(target.x + 0.5, target.y + 0.5, target.z + 0.5));
|
if (target != null) {
|
||||||
laser.show();
|
|
||||||
|
laser.setPositions(new Position(posX, posY, posZ), new Position(target.x + 0.5, target.y + 0.5, target.z + 0.5));
|
||||||
|
laser.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
laser.hide();
|
laser.hide();
|
||||||
|
|
Loading…
Reference in a new issue