blob: 216f9d50a4200b3e75e4d303773f11f8b0c6d799 [file] [log] [blame] [raw]
package li.cil.oc.api.event;
import li.cil.oc.api.machine.Robot;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.event.Cancelable;
public abstract class RobotMoveEvent extends RobotEvent {
/**
* The direction in which the robot will be moving.
*/
public final ForgeDirection direction;
protected RobotMoveEvent(Robot robot, ForgeDirection direction) {
super(robot);
this.direction = direction;
}
/**
* Fired when a robot is about to move.
* <p/>
* Canceling the event will prevent the robot from moving.
*/
@Cancelable
public static class Pre extends RobotMoveEvent {
public Pre(Robot robot, ForgeDirection direction) {
super(robot, direction);
}
}
/**
* Fired after a robot moved.
*/
public static class Post extends RobotMoveEvent {
public Post(Robot robot, ForgeDirection direction) {
super(robot, direction);
}
}
}