mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-27 14:13:24 +02:00
Add Point#isZero
This commit is contained in:
parent
95a2805723
commit
0ff69503c5
@ -172,6 +172,10 @@ public interface Point {
|
||||
Double.compare(point.z(), z()) == 0;
|
||||
}
|
||||
|
||||
default boolean isZero() {
|
||||
return x() == 0 && y() == 0 && z() == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets if two points are in the same chunk.
|
||||
*
|
||||
|
@ -914,7 +914,7 @@ public class Entity implements Viewable, Tickable, EventHandler<EntityEvent>, Da
|
||||
* @return true if velocity is not set to 0
|
||||
*/
|
||||
public boolean hasVelocity() {
|
||||
return !velocity.samePoint(Vec.ZERO);
|
||||
return !velocity.isZero();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user