- All Known Subinterfaces:
Area.Cuboid
,Area.Line
,Area.Single
,Area.Sphere
@Experimental
public sealed interface Area
extends Iterable<BlockVec>
permits Area.Single, Area.Line, Area.Cuboid, Area.Sphere
Represents a collection of aligned block coordinates in a 3D space.
If switched over, consider a fallback to the iterator as more implementations may be added in the future.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
static interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptiondefault Area.Cuboid
bound()
Returns the bounding box of thisstatic Area.Cuboid
static Area.Cuboid
static Area.Cuboid
static Area.Line
default Area
offset
(int x, int y, int z) default Area
static Area.Cuboid
section
(int sectionX, int sectionY, int sectionZ) static Area.Single
single
(int x, int y, int z) static Area.Single
static Area.Sphere
split()
Splits this area into multiple section aligned cuboids.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
offset
-
offset
-
bound
Returns the bounding box of this- Returns:
- a cuboid representing the bounding box with the lowest and highest points
-
split
List<Area.Cuboid> split()Splits this area into multiple section aligned cuboids.Single sections may have multiple cuboids if they are not perfect cuboids.
- Returns:
- list of sub-cuboids covering this area
-
single
-
single
-
line
-
cuboid
-
cube
-
box
-
section
-
sphere
-