Package net.minestom.server.collision
Class ShapeImpl
java.lang.Object
net.minestom.server.collision.ShapeImpl
- All Implemented Interfaces:
Shape
-
Method Summary
Modifier and TypeMethodDescriptionblock()booleanintersectBox(@NotNull Point position, @NotNull BoundingBox boundingBox) Checks if two bounding boxes intersect.booleanintersectBoxSwept(@NotNull Point rayStart, @NotNull Point rayDirection, @NotNull Point shapePos, @NotNull BoundingBox moving, @NotNull SweepResult finalResult) Checks if a moving bounding box will hit this shape.booleanisFaceFull(@NotNull BlockFace face) Returns true if the given block face is completely covered by this shape, false otherwise.booleanisOccluded(@NotNull Shape shape, @NotNull BlockFace face) @NotNull PointRelative End@NotNull PointRelative StartMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minestom.server.collision.Shape
intersectEntity
-
Method Details
-
relativeStart
Description copied from interface:ShapeRelative Start- Specified by:
relativeStartin interfaceShape- Returns:
- Start of shape
-
relativeEnd
Description copied from interface:ShapeRelative End- Specified by:
relativeEndin interfaceShape- Returns:
- End of shape
-
isOccluded
- Specified by:
isOccludedin interfaceShape
-
isFaceFull
Description copied from interface:ShapeReturns true if the given block face is completely covered by this shape, false otherwise.- Specified by:
isFaceFullin interfaceShape- Parameters:
face- The face to test
-
intersectBox
public boolean intersectBox(@NotNull @NotNull Point position, @NotNull @NotNull BoundingBox boundingBox) Description copied from interface:ShapeChecks if two bounding boxes intersect.- Specified by:
intersectBoxin interfaceShape- Parameters:
position- Relative position of bounding box to check withboundingBox- Bounding box to check for intersections with- Returns:
- is an intersection found
-
intersectBoxSwept
public boolean intersectBoxSwept(@NotNull @NotNull Point rayStart, @NotNull @NotNull Point rayDirection, @NotNull @NotNull Point shapePos, @NotNull @NotNull BoundingBox moving, @NotNull @NotNull SweepResult finalResult) Description copied from interface:ShapeChecks if a moving bounding box will hit this shape.- Specified by:
intersectBoxSweptin interfaceShape- Parameters:
rayStart- Position of the moving shaperayDirection- Movement vectorshapePos- Position of this shapemoving- Bounding Box of moving shapefinalResult- Stores final SweepResult- Returns:
- is an intersection found
-
block
-