Class SentinelAttackHelper

java.lang.Object
org.mcmonkey.sentinel.SentinelHelperObject
org.mcmonkey.sentinel.SentinelAttackHelper

public class SentinelAttackHelper extends SentinelHelperObject
Helper for Sentinel NPCs attacking targets.
  • Field Details

    • HIGH_INFLUENCE

      public static double HIGH_INFLUENCE
      Flocker influence constants, for "generateNewFlocker".
    • LOW_INFLUENCE

      public static double LOW_INFLUENCE
      Flocker influence constants, for "generateNewFlocker".
    • FLOCK_RADIUS

      public static double FLOCK_RADIUS
      Flocker influence constants, for "generateNewFlocker".
  • Constructor Details

    • SentinelAttackHelper

      public SentinelAttackHelper()
  • Method Details

    • chase

      public void chase(org.bukkit.entity.LivingEntity entity)
      Causes the NPC to chase a target.
    • generateNewFlocker

      public static net.citizensnpcs.api.ai.flocking.Flocker generateNewFlocker(net.citizensnpcs.api.npc.NPC npc, double radius)
      Generates a Citizens flocker instance to help keep NPCs from clumping.
    • rechase

      public void rechase()
      Repeats the last chase instruction (to ensure the NPC keeps going for a target).
    • seesThreatFrom

      public boolean seesThreatFrom(org.bukkit.entity.LivingEntity entity)
      Returns a boolean indicating whether the NPC sees a threat from the input entity (for use with shield blocking).
    • tryDefendFrom

      public void tryDefendFrom(org.bukkit.entity.LivingEntity entity)
      Causes the entity to prepare to defend against a dangerous opponent (if it sees the threat). This will raise the NPC's shield (if it has one).
    • tryAttack

      public boolean tryAttack(org.bukkit.entity.LivingEntity target)
      Causes the NPC to attempt an attack on a target. Returns whether any attack occurred.
    • rangedPreCalculation

      public boolean rangedPreCalculation(org.bukkit.entity.LivingEntity entity)
      Pre-calculation for ranged attacks. Returns 'true' when the attack should be cancelled.
    • rangedAmmoCalculation

      public void rangedAmmoCalculation()
      Post-calculation for ammo handling.
    • tryAttackInternal

      public boolean tryAttackInternal(org.bukkit.entity.LivingEntity entity)
      Internal attack attempt logic.