From 9a64d7ec1b123cf16fe6af56e0e0c05e2883bce5 Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Fri, 4 Mar 2011 14:23:45 +0000 Subject: [PATCH] Implemented Entity.get/setMomentum --- .../org/bukkit/craftbukkit/entity/CraftEntity.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index aed3bd8e28..e40ba0bd40 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -177,4 +177,14 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public CraftServer getServer() { return server; } + + public Vector getMomentum() { + return new Vector(entity.motX, entity.motY, entity.motZ); + } + + public void setMomentum(Vector value) { + entity.motX = value.getX(); + entity.motY = value.getY(); + entity.motZ = value.getZ(); + } }