Interface DamageType

All Superinterfaces:
DefaultedRegistryValue, 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

    • 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
    • is

      boolean is(Tag<DamageType> tag)
      Checks whether this damage types matches a damage type tag.
      Specified by:
      is in interface Taggable<DamageType>
      Parameters:
      tag - The tag to check.
      Returns:
      true if this damage type matches the damage type tag.
    • scaling

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

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