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 Details

    • getCausingEntity

      @Nullable @Nullable PlatformEntity 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

      @Nullable @Nullable PlatformEntity 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

      @Nullable @Nullable PlatformLocation getDamageLocation()
      Returns the location where the damage occurred.
      Returns:
      the damage location, or null if unknown
      Since:
      2.0.0
    • getSourceLocation

      @Nullable @Nullable PlatformLocation 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