Interface SprayableEntity

All Known Implementing Classes:
CatEntityMixin, FoxEntityMixin

public interface SprayableEntity
An entity that can be sprayed.
Since:
1.6.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    SprayableEntity.EscapeSprayGoal<T extends net.minecraft.entity.mob.PathAwareEntity & SprayableEntity>
    A goal that causes a sprayed entity to run away from its sprayer.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns whether this entity can be sprayed.
    default int
    Returns the number of charges that it takes to spray this entity.
    @Nullable net.minecraft.entity.LivingEntity
    Returns this entity's spray source.
    int
    Returns the amount of ticks remaining in the current spray.
    default boolean
    Returns whether this entity is currently sprayed.
    default void
    astral$setSprayed(@Nullable net.minecraft.entity.LivingEntity source, int ticks)
    Sprays this entity.
    void
    astral$setSprayed(@Nullable net.minecraft.entity.LivingEntity source, int ticks, boolean initialSpray)
    Sprays this entity.
    default void
    Un-sprays this entity.
    default void
    Ticks this entity's spray status.
  • Method Details

    • astral$setSprayed

      void astral$setSprayed(@Nullable @Nullable net.minecraft.entity.LivingEntity source, int ticks, boolean initialSpray)
      Sprays this entity.
      Parameters:
      source - The source entity, if applicable.
      ticks - The amount of ticks to be sprayed for.
      initialSpray - Whether this is the first spray on this entity.
      Since:
      1.6.0
    • astral$setSprayed

      default void astral$setSprayed(@Nullable @Nullable net.minecraft.entity.LivingEntity source, int ticks)
      Sprays this entity.
      Parameters:
      source - The source entity, if applicable.
      ticks - The amount of ticks to be sprayed for.
      Since:
      1.6.0
    • astral$setUnsprayed

      default void astral$setUnsprayed()
      Un-sprays this entity.
      Since:
      1.6.0
    • astral$getSpraySource

      @Nullable @Nullable net.minecraft.entity.LivingEntity astral$getSpraySource()
      Returns this entity's spray source.
      Returns:
      This entity's spray source.
      Since:
      1.6.0
    • astral$getSprayTicks

      int astral$getSprayTicks()
      Returns the amount of ticks remaining in the current spray.
      Returns:
      The amount of ticks remaining in the current spray.
      Since:
      1.6.0
    • astral$getSprayCharges

      default int astral$getSprayCharges()
      Returns the number of charges that it takes to spray this entity.
      Returns:
      The number of charges that it takes to spray this entity.
      Since:
      1.6.0
    • astral$isSprayed

      default boolean astral$isSprayed()
      Returns whether this entity is currently sprayed.
      Returns:
      Whether this entity is currently sprayed.
      Since:
      1.6.0
    • astral$canSpray

      default boolean astral$canSpray()
      Returns whether this entity can be sprayed.
      Returns:
      Whether this entity can be sprayed.
      Since:
      1.6.0
    • astral$sprayTick

      default void astral$sprayTick()
      Ticks this entity's spray status.
      Since:
      1.6.0