Merge pull request #2023 from AEnterprise/6.1.x

fix game crashing when placing robot without a redstone board installed
This commit is contained in:
SpaceToad 2014-09-15 18:21:43 +01:00
commit 97f1b11ce1

View file

@ -783,6 +783,9 @@ public class BlockGenericPipe extends BlockBuildCraft {
DockingStation station = pipe.container.getStation(rayTraceResult.sideHit);
if (!station.isTaken()) {
if (((ItemRobot) currentItem.getItem()).getRobotNBT(currentItem) == null) {
return true;
}
EntityRobot robot = ((ItemRobot) currentItem.getItem())
.createRobot(currentItem, world);
robot.setUniqueRobotId(robot.getRegistry().getNextRobotId());