mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 18:27:17 +01:00
Implemented Entity.get/setMomentum
This commit is contained in:
parent
770bb9e3b5
commit
9a64d7ec1b
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…
Reference in a new issue