- All Known Implementing Classes:
BoundingBox
,Entity
,EntityCreature
,EntityProjectile
,ExperienceOrb
,ItemEntity
,LivingEntity
,Player
,ShapeImpl
public interface Shape
-
Method Summary
Modifier and TypeMethodDescriptionboolean
intersectBox
(Point positionRelative, BoundingBox boundingBox) Checks if two bounding boxes intersect.boolean
intersectBoxSwept
(Point rayStart, Point rayDirection, Point shapePos, BoundingBox moving, SweepResult finalResult) Checks if a moving bounding box will hit this shape.default boolean
intersectEntity
(Point src, Entity entity) Used to know if thisBoundingBox
intersects with the bounding box of an entity.default boolean
isFaceFull
(BlockFace face) Returns true if the given block face is completely covered by this shape, false otherwise.boolean
isOccluded
(Shape shape, BlockFace face) Relative EndRelative Start
-
Method Details
-
isOccluded
-
isFaceFull
Returns true if the given block face is completely covered by this shape, false otherwise.- Parameters:
face
- The face to test
-
intersectBox
Checks if two bounding boxes intersect.- Parameters:
positionRelative
- Relative position of bounding box to check withboundingBox
- Bounding box to check for intersections with- Returns:
- is an intersection found
-
intersectBoxSwept
boolean intersectBoxSwept(Point rayStart, Point rayDirection, Point shapePos, BoundingBox moving, SweepResult finalResult) Checks if a moving bounding box will hit this shape.- 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
-
intersectEntity
Used to know if thisBoundingBox
intersects with the bounding box of an entity.- Parameters:
entity
- the entity to check the bounding box- Returns:
- true if this bounding box intersects with the entity, false otherwise
-
relativeStart
Point relativeStart()Relative Start- Returns:
- Start of shape
-
relativeEnd
Point relativeEnd()Relative End- Returns:
- End of shape
-