Interface ExplosionExposure
- All Superinterfaces:
net.kyori.adventure.key.Keyed,org.bukkit.Keyed,me.deecaad.core.file.Serializer<ExplosionExposure>
- All Known Implementing Classes:
DefaultExposure,DistanceExposure,OptimizedExposure,VoidExposure
public interface ExplosionExposure
extends org.bukkit.Keyed, me.deecaad.core.file.Serializer<ExplosionExposure>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanSee(org.bukkit.Location origin, org.bukkit.entity.LivingEntity entity) Determines if the given entity can see the givenLocation.default booleancanSee(org.bukkit.Location originLoc, org.bukkit.entity.LivingEntity entity, double fov) Determines if the given entity can see the givenLocation.it.unimi.dsi.fastutil.objects.Object2DoubleMap<org.bukkit.entity.LivingEntity> mapExposures(org.bukkit.Location origin, ExplosionShape shape) This method should return a list of entities that are within thisExplosiontriggered at the givenLocation.Methods inherited from interface org.bukkit.Keyed
getKey, keyMethods inherited from interface me.deecaad.core.file.Serializer
canUsePathTo, getKeyword, getName, getParentKeywords, getWikiLink, letPassThrough, serialize, shouldSerialize, tryPathTo, useLater
-
Field Details
-
FOV
static final double FOV
-
-
Method Details
-
mapExposures
@NotNull it.unimi.dsi.fastutil.objects.Object2DoubleMap<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.Conditions (Like player team, the cause of the explosion, etc.) are not used to filter entities, that is handled separately
The
Doublegeneric represents how much "impact" the player gets. This should be a number (0, 1] Higher numbers mean more damage and knock back.- Parameters:
origin- Where the explosion spawnsshape- The shape of the explosion- Returns:
- The effected players and their impact level
-
canSee
default boolean canSee(@NotNull org.bukkit.Location origin, @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 70 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 org.bukkit.Location originLoc, @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
-