Interface ExplosionExposure
- All Known Implementing Classes:
DefaultExposure,DistanceExposure,OptimizedExposure,VoidExposure
public interface ExplosionExposure
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanSee(@NotNull org.bukkit.Location origin, @NotNull org.bukkit.entity.LivingEntity entity) Determines if the given entity can see the givenLocation.default booleancanSee(@NotNull org.bukkit.Location originLoc, @NotNull org.bukkit.entity.LivingEntity entity, double fov) Determines if the given entity can see the givenLocation.@NotNull me.deecaad.core.utils.primitive.DoubleMap<org.bukkit.entity.LivingEntity>mapExposures(@NotNull org.bukkit.Location origin, @NotNull ExplosionShape shape) This method should return a list of entities that are within thisExplosiontriggered at the givenLocation.
-
Field Details
-
FOV
static final double FOV
-
-
Method Details
-
mapExposures
@NotNull @NotNull me.deecaad.core.utils.primitive.DoubleMap<org.bukkit.entity.LivingEntity> mapExposures(@NotNull @NotNull org.bukkit.Location origin, @NotNull @NotNull ExplosionShape shape) This method should return a list of entities that are within thisExplosiontriggered at the givenLocation. Conditions (Like player team, the cause of the explosion, etc) are not used to filter entities, that is handled separately TheDoublegeneric represents how much "impact" the player gets. This should be a number (0, 1] Higher numbers mean more damage and knockback- Parameters:
origin- Where the explosion spawnsshape- The shape of the explosion- Returns:
- The effected players and their impact level
-
canSee
default boolean canSee(@NotNull @NotNull org.bukkit.Location origin, @NotNull @NotNull org.bukkit.entity.LivingEntity entity) Determines if the given entity can see the givenLocation. This method assumes the entity's field of view is a 90 degree angle- Parameters:
origin- The point to check if the entity can seeentity- The entity to check against- Returns:
- true if the entity can see the origin
-
canSee
default boolean canSee(@NotNull @NotNull org.bukkit.Location originLoc, @NotNull @NotNull org.bukkit.entity.LivingEntity entity, double fov) Determines if the given entity can see the givenLocation.- Parameters:
originLoc- The point to check if the entity can seeentity- The entity to check againstfov- The field of view of the entity- Returns:
- true if the entity can see the origin
-