Interface DamageSource.Builder
- Enclosing interface:
DamageSource
public static interface DamageSource.Builder
Utility class to make building a
DamageSource easier. Only a
DamageType is required.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Create a newDamageSourceinstance using the supplied parameters.withCausingEntity(@NotNull Entity entity) Set theEntitythat caused the damage.withDamageLocation(@NotNull Location location) Set theLocationof the source of damage.withDirectEntity(@NotNull Entity entity) Set theEntitythat directly inflicted the damage.
-
Method Details
-
withCausingEntity
-
withDirectEntity
-
withDamageLocation
-
build
Create a newDamageSourceinstance using the supplied parameters.- Returns:
- the damage source instance
-