mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 04:05:50 -07:00
Implemented Entity.get/setMomentum
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user