Class OptimizedExposure

java.lang.Object
me.deecaad.weaponmechanics.weapon.explode.exposures.OptimizedExposure
All Implemented Interfaces:
me.deecaad.core.file.Serializer<ExplosionExposure>, ExplosionExposure, net.kyori.adventure.key.Keyed, org.bukkit.Keyed

public class OptimizedExposure extends Object implements ExplosionExposure
  • Field Summary

    Fields inherited from interface me.deecaad.weaponmechanics.weapon.explode.exposures.ExplosionExposure

    FOV
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for serializer.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.NamespacedKey
     
    static void
    lerp(org.bukkit.util.Vector reuse, org.bukkit.util.Vector min, org.bukkit.util.Vector max, double x, double y, double z)
     
    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.
    serialize(me.deecaad.core.file.SerializeData data)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface me.deecaad.weaponmechanics.weapon.explode.exposures.ExplosionExposure

    canSee, canSee

    Methods inherited from interface org.bukkit.Keyed

    key

    Methods inherited from interface me.deecaad.core.file.Serializer

    canUsePathTo, getKeyword, getName, getParentKeywords, getWikiLink, letPassThrough, shouldSerialize, tryPathTo, useLater
  • Constructor Details

    • OptimizedExposure

      public OptimizedExposure()
      Default constructor for serializer.
  • Method Details

    • getKey

      @NotNull public org.bukkit.NamespacedKey getKey()
      Specified by:
      getKey in interface org.bukkit.Keyed
    • mapExposures

      @NotNull public it.unimi.dsi.fastutil.objects.Object2DoubleMap<org.bukkit.entity.LivingEntity> mapExposures(@NotNull org.bukkit.Location origin, @NotNull ExplosionShape shape)
      Description copied from interface: ExplosionExposure
      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.

      Specified by:
      mapExposures in interface ExplosionExposure
      Parameters:
      origin - Where the explosion spawns
      shape - The shape of the explosion
      Returns:
      The effected players and their impact level
    • lerp

      public static void lerp(org.bukkit.util.Vector reuse, org.bukkit.util.Vector min, org.bukkit.util.Vector max, double x, double y, double z)
    • serialize

      @NotNull public ExplosionExposure serialize(@NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException
      Specified by:
      serialize in interface me.deecaad.core.file.Serializer<ExplosionExposure>
      Throws:
      me.deecaad.core.file.SerializerException