Ability to get min and max of AABBBlock
This commit is contained in:
parent
0fcd02c80d
commit
45ab550d06
@ -74,6 +74,22 @@ public class AABBBlock implements BlockSet, Cloneable {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Vector getMin() {
|
||||||
|
return pos1.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector getMax() {
|
||||||
|
return pos2.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlockVector getMinBlock() {
|
||||||
|
return pos1.toBlockVector();
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlockVector getMaxBlock() {
|
||||||
|
return pos2.clone().add(new Vector(-1, -1, -1)).toBlockVector();
|
||||||
|
}
|
||||||
|
|
||||||
public AABBBlock shift(int x, int y, int z) {
|
public AABBBlock shift(int x, int y, int z) {
|
||||||
return new AABBBlock(this, x, y, z);
|
return new AABBBlock(this, x, y, z);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user