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
    Modifier and Type
    Field
    Description
    static final double
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    canSee(org.bukkit.Location origin, org.bukkit.entity.LivingEntity entity)
    Determines if the given entity can see the given Location.
    default boolean
    canSee(org.bukkit.Location originLoc, org.bukkit.entity.LivingEntity entity, double fov)
    Determines if the given entity can see the given Location.
    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 this Explosion triggered at the given Location.

    Methods inherited from interface org.bukkit.Keyed

    getKey, key

    Methods 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 this Explosion triggered at the given Location.

      Conditions (Like player team, the cause of the explosion, etc.) are not used to filter entities, that is handled separately

      The Double generic 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 spawns
      shape - 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 given Location. This method assumes the entity's field of view is a 70 degree angle
      Parameters:
      origin - The point to check if the entity can see
      entity - 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 given Location.
      Parameters:
      originLoc - The point to check if the entity can see
      entity - The entity to check against
      fov - The field of view of the entity
      Returns:
      true if the entity can see the origin