Package de.z0rdak.yawp.core.area
Class CuboidArea
java.lang.Object
de.z0rdak.yawp.core.area.MarkedArea
de.z0rdak.yawp.core.area.CuboidArea
- All Implemented Interfaces:
IMarkableArea
Represents and wraps a simple AxisAlignedBB.
This area is marked by two positions and thus spans a cuboid shape
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCuboidArea(net.minecraft.core.BlockPos p1, net.minecraft.core.BlockPos p2) CuboidArea(net.minecraft.world.level.levelgen.structure.BoundingBox area) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(CuboidArea inner) booleancontains(SphereArea inner) booleancontains(net.minecraft.core.BlockPos pos) booleancontainsOther(IMarkableArea inner) static CuboidAreaexpand(CuboidArea area, int min, int max) net.minecraft.world.level.levelgen.structure.BoundingBoxgetArea()net.minecraft.core.BlockPosnet.minecraft.core.BlockPosSet<net.minecraft.core.BlockPos>getFrame()Returns the outer frame of the cuboid area as a set of BlockPos.Set<net.minecraft.core.BlockPos>getHull()Returns the hull of the cuboid area as a set of BlockPos.Set<net.minecraft.core.BlockPos>getType()List<net.minecraft.core.BlockPos>Returns the vertices of the cuboid area as a list of BlockPos.intgetXsize()intgetYsize()intgetZsize()booleanintersects(IMarkableArea other) booleanintersects(SphereArea other) Set<net.minecraft.core.BlockPos>toString()Methods inherited from class de.z0rdak.yawp.core.area.MarkedArea
getAreaType, getDisplay, updateDisplay
-
Field Details
-
CODEC
-
-
Constructor Details
-
CuboidArea
public CuboidArea(net.minecraft.world.level.levelgen.structure.BoundingBox area) -
CuboidArea
public CuboidArea(net.minecraft.core.BlockPos p1, net.minecraft.core.BlockPos p2)
-
-
Method Details
-
getType
-
expand
-
contains
public boolean contains(net.minecraft.core.BlockPos pos) -
contains
-
contains
-
getVertices
Returns the vertices of the cuboid area as a list of BlockPos. Z+ p7-----p8 /| /| Y+ p5------p6| | | | | | p3----|-p4 |/ |/ p1------p2 X+- Returns:
- [p1, p2, p3, p4, p5, p6, p7, p8] as list of BlockPos
-
getHull
Returns the hull of the cuboid area as a set of BlockPos. The hull is the outermost layer of blocks of the cuboid area. The hull is calculated by iterating through the faces of the cuboid area and collecting the blocks in each face.- Returns:
- hull as set of BlockPos of cuboid area
-
intersects
-
getArea
public net.minecraft.world.level.levelgen.structure.BoundingBox getArea() -
getXsize
public int getXsize() -
getZsize
public int getZsize() -
getYsize
public int getYsize() -
getAreaP1
public net.minecraft.core.BlockPos getAreaP1() -
getAreaP2
public net.minecraft.core.BlockPos getAreaP2() -
toString
-
markedBlocks
-
getFrame
Returns the outer frame of the cuboid area as a set of BlockPos.- Returns:
- outer frame as set of BlockPos of cuboid area
-
getMinimalOutline
-
containsOther
-
intersects
-