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 Summary
Modifier and TypeMethodDescriptioneffect(DamageEffect effect) Sets damage effectsexhaustion(double exhaustion) Sets the amount of exhaustion aDamageSourceof this type will add to the entity, generally only to players.Sets the name of theDamageType.scaling(DamageScaling scaling) Sets damage scalingMethods inherited from interface net.kyori.adventure.builder.AbstractBuilder
buildMethods inherited from interface org.spongepowered.api.util.CopyableBuilder
from
-
Method Details
-
name
Sets the name of theDamageType. 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
Sets the amount of exhaustion aDamageSourceof this type will add to the entity, generally only to players. TODO check if this is still correctIn 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
-