This commit is contained in:
Florian Nücke 2015-01-04 15:54:42 +01:00
parent 4c37d53405
commit 5d3879d0a4
3 changed files with 12 additions and 2 deletions

View File

@ -11,7 +11,7 @@ import li.cil.oc.api.detail.*;
*/ */
public class API { public class API {
public static final String ID_OWNER = "OpenComputers|Core"; public static final String ID_OWNER = "OpenComputers|Core";
public static final String VERSION = "4.1.2"; public static final String VERSION = "4.1.3";
public static DriverAPI driver = null; public static DriverAPI driver = null;
public static FileSystemAPI fileSystem = null; public static FileSystemAPI fileSystem = null;

View File

@ -2,7 +2,6 @@ package li.cil.oc.api.internal;
import li.cil.oc.api.driver.EnvironmentHost; import li.cil.oc.api.driver.EnvironmentHost;
import li.cil.oc.api.machine.Machine; import li.cil.oc.api.machine.Machine;
import li.cil.oc.api.network.Environment;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;
import net.minecraft.util.Vec3; import net.minecraft.util.Vec3;
@ -43,4 +42,13 @@ public interface Drone extends EnvironmentHost, Rotatable {
* accumulate. * accumulate.
*/ */
void setTarget(Vec3 value); void setTarget(Vec3 value);
/**
* Get the drones velocity vector.
* <p/>
* Note that this is really just the underlying entity's <tt>motionX/Y/Z</tt>,
* so you can cast this to {@link net.minecraft.entity.Entity} and use that
* instead, if you'd like.
*/
Vec3 getVelocity();
} }

View File

@ -123,6 +123,8 @@ class Drone(val world: World) extends Entity(world) with MachineHost with intern
targetZ = value.zCoord.toFloat targetZ = value.zCoord.toFloat
} }
override def getVelocity = Vec3.createVectorHelper(motionX, motionY, motionZ)
// ----------------------------------------------------------------------- // // ----------------------------------------------------------------------- //
override def canBeCollidedWith = true override def canBeCollidedWith = true