Class DamageData

java.lang.Object
com.hypixel.hytale.server.npc.util.DamageData

public class DamageData extends Object
  • Field Details

    • kills

      private final Map<Ref<EntityStore>,Vector3d> kills
    • damageInflicted

      private final it.unimi.dsi.fastutil.objects.Object2DoubleMap<Ref<EntityStore>> damageInflicted
    • damageSuffered

      private final it.unimi.dsi.fastutil.objects.Object2DoubleMap<Ref<EntityStore>> damageSuffered
    • damageByCause

      private final it.unimi.dsi.fastutil.objects.Object2DoubleMap<DamageCause> damageByCause
    • maxDamageSuffered

      private double maxDamageSuffered
    • maxDamageInflicted

      private double maxDamageInflicted
    • mostPersistentAttacker

      @Nullable private Ref<EntityStore> mostPersistentAttacker
    • mostDamagedVictim

      @Nullable private Ref<EntityStore> mostDamagedVictim
  • Constructor Details

    • DamageData

      public DamageData()
  • Method Details

    • reset

      public void reset()
    • onInflictedDamage

      public void onInflictedDamage(Ref<EntityStore> target, double amount)
    • onSufferedDamage

      public void onSufferedDamage(@Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull Damage damage)
    • onKill

      public void onKill(@Nonnull Ref<EntityStore> victim, @Nonnull Vector3d position)
    • haveKill

      public boolean haveKill()
    • haveKilled

      public boolean haveKilled(Ref<EntityStore> entity)
    • getAnyKilled

      @Nullable public Ref<EntityStore> getAnyKilled()
    • getKillPosition

      public Vector3d getKillPosition(Ref<EntityStore> entity)
    • getMaxDamageInflicted

      public double getMaxDamageInflicted()
    • getMaxDamageSuffered

      public double getMaxDamageSuffered()
    • getDamage

      public double getDamage(DamageCause cause)
    • hasSufferedDamage

      public boolean hasSufferedDamage(DamageCause cause)
    • getMostDamagedVictim

      @Nullable public Ref<EntityStore> getMostDamagedVictim()
    • getMostDamagingAttacker

      @Nullable public Ref<EntityStore> getMostDamagingAttacker()
    • getAnyAttacker

      @Nullable public Ref<EntityStore> getAnyAttacker()
    • clone

      @Nonnull public DamageData clone()
      Overrides:
      clone in class Object
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object