make robots face where they are traveling to
This commit is contained in:
parent
9029c04dd2
commit
7a3822f4f6
3 changed files with 3 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -66,11 +66,6 @@ public class AIRobotPumpBlock extends AIRobot {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void end() {
|
||||
robot.aimItemAt(0, 1, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyCost() {
|
||||
return 20;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue