make robots face where they are traveling to

This commit is contained in:
Hea3veN 2015-02-09 22:01:37 -03:00
parent 9029c04dd2
commit 7a3822f4f6
3 changed files with 3 additions and 5 deletions

View file

@ -41,6 +41,7 @@ public class AIRobotGotoBlock extends AIRobotGoto {
finalX = x;
finalY = y;
finalZ = z;
robot.aimItemAt((int) Math.floor(finalX), (int) Math.floor(finalY), (int) Math.floor(finalZ));
}
public AIRobotGotoBlock(EntityRobotBase robot, int x, int y, int z, double iMaxDistance) {
@ -55,6 +56,7 @@ public class AIRobotGotoBlock extends AIRobotGoto {
finalX = path.getLast().x;
finalY = path.getLast().y;
finalZ = path.getLast().z;
robot.aimItemAt((int) Math.floor(finalX), (int) Math.floor(finalY), (int) Math.floor(finalZ));
setNextInPath();
}

View file

@ -66,11 +66,6 @@ public class AIRobotPumpBlock extends AIRobot {
}
@Override
public void end() {
robot.aimItemAt(0, 1, 0);
}
@Override
public int getEnergyCost() {
return 20;

View file

@ -26,6 +26,7 @@ public class AIRobotStraightMoveTo extends AIRobotGoto {
x = ix;
y = iy;
z = iz;
robot.aimItemAt((int) Math.floor(x), (int) Math.floor(y), (int) Math.floor(z));
}
@Override