Interface DamageType

All Superinterfaces:
DataPackSerializable, DefaultedRegistryValue<DamageType>, Nameable, Taggable<DamageType>

A DamageType is a type of "grouping" for DamageSources since a DamageSource instance can be inherently different from another DamageSource by virtue of the Object backing the source. Furthermore, it is impossible to refer to DamageSources statically due to the nature of constructing them. It is possible however, that the parent Object being referred to as the "damage source" can damage an Entity with varying DamageTypes depending on the circumstances.
  • Method Details

    • builder

      static DamageType.Builder builder()
      Creates a new DamageType.Builder to create a DamageType.
      Returns:
      The new builder
    • exhaustion

      double exhaustion()
      Gets the amount of exhaustion this DamageType will add to the entity, generally only to players.

      TODO check this facts:

      In vanilla gameplay this is set to 0.1 by default and overridden to 0 if the type is set to be absolute or as overriding armor.

      Returns:
      The increase in exhaustion
    • scaling

      DamageScaling scaling()
      Returns the damage scaling.
      Returns:
      the damage scaling
    • effect

      DamageEffect effect()
      Returns the damage effect.
      Returns:
      the damage effect