Interface DamageType.Builder

All Superinterfaces:
AbstractBuilder<DamageType>, Builder<DamageType,DamageType.Builder>, CopyableBuilder<DamageType,DamageType.Builder>, ResettableBuilder<DamageType,DamageType.Builder>
Enclosing interface:
DamageType

public static interface DamageType.Builder extends Builder<DamageType,DamageType.Builder>, CopyableBuilder<DamageType,DamageType.Builder>
A builder to create DamageTypes.
  • Method Details

    • name

      Sets the name of the DamageType. Used as part of the death message translation key. TODO falling/intentional game design?
      Parameters:
      name - The name
      Returns:
      This builder, for chaining
    • scaling

      Sets damage scaling
      Parameters:
      scaling - the daamge scaling
      Returns:
      This builder
    • effect

      Sets damage effects
      Parameters:
      effect - the damage effect
      Returns:
      This builder
    • exhaustion

      DamageType.Builder exhaustion(double exhaustion)
      Sets the amount of exhaustion a DamageSource of this type will add to the entity, generally only to players. TODO check if this is still correct

      In vanilla gameplay, the default is 0.1, unless if the damage is absolute or bypasses armor, where the exhaustion gets set to 0.

      Parameters:
      exhaustion - The amount of exhaustion to add to the entity
      Returns:
      This builder