Package org.spongepowered.api.data.type
Interface ShieldItemDamageFunction.MultiplyAdd.Builder
- All Superinterfaces:
ResettableBuilder<ShieldItemDamageFunction.MultiplyAdd,ShieldItemDamageFunction.MultiplyAdd.Builder>
- Enclosing interface:
ShieldItemDamageFunction.MultiplyAdd
public static interface ShieldItemDamageFunction.MultiplyAdd.Builder
extends ResettableBuilder<ShieldItemDamageFunction.MultiplyAdd,ShieldItemDamageFunction.MultiplyAdd.Builder>
-
Method Summary
Modifier and TypeMethodDescriptionbuild()constantDamage(double constantDamage) Sets the constant amount of damage taken.fractionalDamage(double fractionalDamage) Sets fractional amount of damage to take, where a factor of 1 means that the amount of durability lost is equal to attack damage, and a factor of 0 that no durability is lost.minAttackDamage(double minDamage) Sets the minimum amount of damage blocked attack must have had, for the item to take damage at all.Methods inherited from interface org.spongepowered.api.util.ResettableBuilder
reset
-
Method Details
-
minAttackDamage
Sets the minimum amount of damage blocked attack must have had, for the item to take damage at all.- Parameters:
minDamage- minimum attack damage required for any durability loss- Returns:
- This builder, for chaining
-
constantDamage
Sets the constant amount of damage taken.- Parameters:
constantDamage- a constant amount of damage to take- Returns:
- This builder, for chaining
-
fractionalDamage
Sets fractional amount of damage to take, where a factor of 1 means that the amount of durability lost is equal to attack damage, and a factor of 0 that no durability is lost.- Parameters:
fractionalDamage- fractional amount of damage to take- Returns:
- This builder, for chaining
-
build
-