mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-23 23:39:34 +01:00
Implemented Entity.get/setMomentum
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
95a285bfe9
commit
7e0c663e2a
1 changed files with 10 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue