blob: 0ef239f5e2e0acb202435654d2510500616df3b5 [file] [log] [blame] [raw]
package li.cil.oc.api.event;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import li.cil.oc.api.internal.Agent;
import net.minecraftforge.common.util.ForgeDirection;
public abstract class RobotMoveEvent extends RobotEvent {
/**
* The direction in which the robot will be moving.
*/
public final ForgeDirection direction;
protected RobotMoveEvent(Agent agent, ForgeDirection direction) {
super(agent);
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(Agent agent, ForgeDirection direction) {
super(agent, direction);
}
}
/**
* Fired after a robot moved.
*/
public static class Post extends RobotMoveEvent {
public Post(Agent agent, ForgeDirection direction) {
super(agent, direction);
}
}
}