Package kr.toxicity.model.api.event
Interface ModelDamageSource
public interface ModelDamageSource
Represents the source of damage inflicted on a model's hitbox.
This interface abstracts the platform-specific damage source details.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescription@Nullable PlatformEntityReturns the entity that caused the damage (e.g., the shooter of an arrow).@Nullable PlatformLocationReturns the location where the damage occurred.@Nullable PlatformEntityReturns the entity that directly inflicted the damage (e.g., the arrow itself).floatReturns the amount of food exhaustion caused by this damage.@Nullable PlatformLocationReturns the location of the damage source.booleanChecks if the damage was indirect (e.g., projectile).booleanChecks if this damage should be scaled based on difficulty.
-
Method Details
-
getCausingEntity
Returns the entity that caused the damage (e.g., the shooter of an arrow).- Returns:
- the causing entity, or null if none
- Since:
- 2.0.0
- See Also:
-
getDirectEntity
Returns the entity that directly inflicted the damage (e.g., the arrow itself).- Returns:
- the direct entity, or null if none
- Since:
- 2.0.0
-
getDamageLocation
Returns the location where the damage occurred.- Returns:
- the damage location, or null if unknown
- Since:
- 2.0.0
-
getSourceLocation
Returns the location of the damage source.- Returns:
- the source location, or null if unknown
- Since:
- 2.0.0
-
isIndirect
boolean isIndirect()Checks if the damage was indirect (e.g., projectile).- Returns:
- true if indirect, false otherwise
- Since:
- 2.0.0
-
getFoodExhaustion
float getFoodExhaustion()Returns the amount of food exhaustion caused by this damage.- Returns:
- the food exhaustion
- Since:
- 2.0.0
-
scalesWithDifficulty
boolean scalesWithDifficulty()Checks if this damage should be scaled based on difficulty.- Returns:
- true if scalable, false otherwise
- Since:
- 2.0.0
-