DamageSourcePredicate
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
import crafttweaker.api.predicate.DamageSourcePredicate;
Static Methods
Return Type: DamageSourcePredicate
// DamageSourcePredicate.any() as DamageSourcePredicate
DamageSourcePredicate.any();
Return Type: DamageSourcePredicateBuilder
// DamageSourcePredicate.create() as DamageSourcePredicateBuilder
DamageSourcePredicate.create();
Methods
Return Type: boolean
DamageSourcePredicate.matches(player as ServerPlayer, source as DamageSource) as boolean
Parameter | Type |
---|---|
Parameter player | Type ServerPlayer |
Parameter source | Type DamageSource |
Return Type: boolean
DamageSourcePredicate.matches(level as ServerLevel, pos as Vec3, source as DamageSource) as boolean
Parameter | Type |
---|---|
Parameter level | Type ServerLevel |
Parameter pos | Type Vec3 |
Parameter source | Type DamageSource |