package net.minecraft.src.weasel;

import net.minecraft.src.PC_INBT;
import net.minecraft.src.weasel.exception.WeaselRuntimeException;
import net.minecraft.src.weasel.exception.PauseRequestedException;

/**
 * Weasel instruction
 * 
 * @author MightyPork
 * @copy (c) 2012
 *
 */
public interface IInstruction extends PC_INBT{

	/**
	 * Execute the instruction
	 * @param engine the weasel engine
	 * @param instructionList the instruction list the instruction is in
	 * @throws PauseRequestedException thrown at the end of instruction if Weasel Engine should pause program and wait for external resume call.
	 * @throws WeaselRuntimeException thrown if execution of this instruction failed.
	 */
	public void execute(Weasel engine, InstructionList instructionList) throws PauseRequestedException, WeaselRuntimeException;

	/**
	 * Set instruction address in Instruction List
	 * @param address address
	 */
	public void setAddress(int address);

}
