Class DamageModifier.Builder
java.lang.Object
org.spongepowered.api.event.cause.entity.damage.DamageModifier.Builder
- All Implemented Interfaces:
AbstractBuilder<DamageModifier>
,Builder<DamageModifier,
,DamageModifier.Builder> CopyableBuilder<DamageModifier,
,DamageModifier.Builder> ResettableBuilder<DamageModifier,
DamageModifier.Builder>
- Enclosing interface:
- DamageModifier
public static final class DamageModifier.Builder
extends Object
implements Builder<DamageModifier,DamageModifier.Builder>, CopyableBuilder<DamageModifier,DamageModifier.Builder>
A builder that creates
DamageModifier
s, for use in both plugin and
implementation requirements.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Sets theCause
for theDamageModifier
to build.from
(DamageModifier value) Resets this builder to the values of the given built object.item
(ItemStackSnapshot snapshot) reset()
Resets this builder to a "default" state such that there is no remaining data to set.type
(Supplier<? extends DamageModifierType> damageModifierType) Sets theDamageModifierType
for theDamageModifier
to build.type
(DamageModifierType damageModifierType) Sets theDamageModifierType
for theDamageModifier
to build.
-
Method Details
-
type
Sets theDamageModifierType
for theDamageModifier
to build.- Parameters:
damageModifierType
- The damage modifier type- Returns:
- This builder, for chaining
-
type
Sets theDamageModifierType
for theDamageModifier
to build.- Parameters:
damageModifierType
- The damage modifier type- Returns:
- This builder, for chaining
-
item
-
item
-
cause
Sets theCause
for theDamageModifier
to build.- Parameters:
cause
- The cause for the damage modifier- Returns:
- This builder, for chaining
-
build
- Specified by:
build
in interfaceAbstractBuilder<DamageModifier>
- Returns:
- The newly created damage modifier
-
from
Description copied from interface:CopyableBuilder
Resets this builder to the values of the given built object.- Specified by:
from
in interfaceCopyableBuilder<DamageModifier,
DamageModifier.Builder> - Parameters:
value
- The built object- Returns:
- This builder, for chaining
-
reset
Description copied from interface:Builder
Resets this builder to a "default" state such that there is no remaining data to set. This is to be the presumed "default" state.- Specified by:
reset
in interfaceBuilder<DamageModifier,
DamageModifier.Builder> - Specified by:
reset
in interfaceResettableBuilder<DamageModifier,
DamageModifier.Builder> - Returns:
- This builder, for chaining
-