From e3c38609edb1316429616f8d380b5436da01c6fa Mon Sep 17 00:00:00 2001 From: Kyprus Date: Fri, 29 Jun 2012 18:20:03 -0400 Subject: [PATCH] Fixed an NPE the can happen when using a builder with path markers. --- .../net/minecraft/src/buildcraft/core/EntityRobot.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/net/minecraft/src/buildcraft/core/EntityRobot.java b/common/net/minecraft/src/buildcraft/core/EntityRobot.java index 659e0826..f40f13ec 100644 --- a/common/net/minecraft/src/buildcraft/core/EntityRobot.java +++ b/common/net/minecraft/src/buildcraft/core/EntityRobot.java @@ -246,9 +246,12 @@ public class EntityRobot extends Entity implements ISpawnHandler { Action a = targets.getFirst(); 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)); - laser.show(); + + if (target != null) { + + laser.setPositions(new Position(posX, posY, posZ), new Position(target.x + 0.5, target.y + 0.5, target.z + 0.5)); + laser.show(); + } } else { laser.hide();