Cone

public class Cone extends Shape

Constructors

Link copied to clipboard
public void Cone(Location top, Location bottom, double baseRadius, double borderRadius)
Constructs a Cone shape.

Properties

Link copied to clipboard
public List<Location> edgeLocations

Functions

Link copied to clipboard
public boolean borderContains(Location position)
Determines if a location is on the "border" of the cone.
public boolean borderContains(LivingEntity livingEntity)
Link copied to clipboard
public boolean contains(Location position)
Checks whether a given location is inside the cone.
public boolean contains(LivingEntity livingEntity)
For a living entity we test multiple points along the entity's bounding box.
Link copied to clipboard
public Location getCenter()
The center of the cone is defined as the midpoint between the top and bottom.
Link copied to clipboard
public List<Location> getEdgeLocations()
Returns the edge (border) locations of the cone.
Link copied to clipboard
public List<Location> getLocations()
Returns all the locations inside the cone.
Link copied to clipboard
public void visualize(Particle particle)
Visualizes the cone by spawning a particle at every location within the cone.