Interface SulfurCubeArchetypeRegistryEntry.ContactDamage
- Enclosing interface:
SulfurCubeArchetypeRegistryEntry
The contact damage a sulfur cube of this archetype will deal when pushed
by another entity.
-
Method Summary
Modifier and TypeMethodDescription@NonNegative floatamount()Returns the damage amount of the damage dealt.booleanReturns whether the sulfur cube of this damage should be recorded in the damage source.Returns the damage type of the damage dealt.of(TypedKey<DamageType> damageType, @NonNegative float amount, boolean attributeToSource) Creates a new contact damage instance based on the passed values.
-
Method Details
-
damageType
TypedKey<DamageType> damageType()Returns the damage type of the damage dealt.- Returns:
- the damage type of the damage dealt
-
amount
@NonNegative float amount()Returns the damage amount of the damage dealt.- Returns:
- the damage amount of the damage dealt
- API Note:
- for non-constant damage this will return one possible sample instead of the exact amount
-
attributeToSource
boolean attributeToSource()Returns whether the sulfur cube of this damage should be recorded in the damage source.- Returns:
- whether the sulfur cube of this damage should be recorded in the damage source
-
of
@Contract(value="_, _, _ -> new", pure=true) static SulfurCubeArchetypeRegistryEntry.ContactDamage of(TypedKey<DamageType> damageType, @NonNegative float amount, boolean attributeToSource) Creates a new contact damage instance based on the passed values.- Parameters:
damageType- the damage type of the damage dealt, as returned bydamageType()amount- the damage amount of the damage dealt, as returned byamount()attributeToSource- whether the sulfur cube of this damage should be recorded, as returned byattributeToSource()- Returns:
- the created instance
-