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 ClassesModifier and TypeInterfaceDescriptionstatic classSprayableEntity.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 TypeMethodDescriptiondefault booleanReturns whether this entity can be sprayed.default intReturns the number of charges that it takes to spray this entity.@Nullable net.minecraft.entity.LivingEntityReturns this entity's spray source.intReturns the amount of ticks remaining in the current spray.default booleanReturns whether this entity is currently sprayed.default voidastral$setSprayed(@Nullable net.minecraft.entity.LivingEntity source, int ticks) Sprays this entity.voidastral$setSprayed(@Nullable net.minecraft.entity.LivingEntity source, int ticks, boolean initialSpray) Sprays this entity.default voidUn-sprays this entity.default voidTicks 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
-