Interface Area
- 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 interfacestatic interfacestatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescriptiondefault Area.Cuboidbound()Returns the bounding box of thisstatic Area.Cuboidstatic Area.Cuboidstatic Area.Cuboidstatic Area.Linedefault Areaoffset(int x, int y, int z) default Areastatic Area.Cuboidsection(int sectionX, int sectionY, int sectionZ) static Area.Singlesingle(int x, int y, int z) static Area.Singlestatic Area.Spheresplit()Splits this area into multiple section aligned cuboids.Methods inherited from interface 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
-