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

Functions

Link copied to clipboard
@Nullable
abstract fun getCausingEntity(): @Nullable PlatformEntity
Returns the entity that caused the damage (e.g., the shooter of an arrow).
Link copied to clipboard
@Nullable
abstract fun getDamageLocation(): @Nullable PlatformLocation
Returns the location where the damage occurred.
Link copied to clipboard
@Nullable
abstract fun getDirectEntity(): @Nullable PlatformEntity
Returns the entity that directly inflicted the damage (e.g., the arrow itself).
Link copied to clipboard
abstract fun getFoodExhaustion(): Float
Returns the amount of food exhaustion caused by this damage.
Link copied to clipboard
@Nullable
abstract fun getSourceLocation(): @Nullable PlatformLocation
Returns the location of the damage source.
Link copied to clipboard
abstract fun isIndirect(): Boolean
Checks if the damage was indirect (e.g., projectile).
Link copied to clipboard
Checks if this damage should be scaled based on difficulty.