Add Sector#getMatrix method.

This commit is contained in:
Major-
2015-03-02 06:27:38 +00:00
parent 0591256fbf
commit 4ae78658df
@@ -146,6 +146,17 @@ public final class Sector {
return ImmutableSet.copyOf(filtered);
}
/**
* Gets the {@link CollisionMatrix} at the specified height level.
*
* @param height The height level.
* @return The CollisionMatrix.
*/
public CollisionMatrix getMatrix(int height) {
Preconditions.checkElementIndex(height, matrices.length, "Matrix height level must be [0, " + matrices.length + ").");
return matrices[height];
}
/**
* Moves the {@link Entity} that was in the specified {@code old} {@link Position}, to the current position of the
* Entity.