mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-28 18:06:42 +00:00
Added //move and //moveair.
This commit is contained in:
@ -446,6 +446,32 @@ public class Vector {
|
||||
Math.pow(pt.z - z, 2));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to see if a vector is contained with another.
|
||||
*
|
||||
* @param min
|
||||
* @param max
|
||||
* @return
|
||||
*/
|
||||
public boolean containedWithin(Vector min, Vector max) {
|
||||
return x >= min.getX() && x <= max.getX()
|
||||
&& y >= min.getY() && z <= max.getY()
|
||||
&& z >= min.getZ() && z <= max.getY();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to see if a vector is contained with another.
|
||||
*
|
||||
* @param min
|
||||
* @param max
|
||||
* @return
|
||||
*/
|
||||
public boolean containedWithinBlock(Vector min, Vector max) {
|
||||
return getBlockX() >= min.getBlockX() && getBlockX() <= max.getBlockX()
|
||||
&& getBlockY() >= min.getBlockY() && getBlockY() <= max.getBlockY()
|
||||
&& getBlockZ() >= min.getBlockZ() && getBlockZ() <= max.getBlockY();
|
||||
}
|
||||
|
||||
/**
|
||||
* 2D transformation.
|
||||
*
|
||||
|
Reference in New Issue
Block a user