Class ActionProperties

java.lang.Object
nokunami.floral_warfare.api.common.ai.action.ActionProperties

public class ActionProperties extends Object
  • Constructor Details

    • ActionProperties

      public ActionProperties(int actionInterval, int preAnim, int postAnim)
  • Method Details

    • actionProperties

      public static ActionProperties actionProperties(int interval, int preAnim, int postAnim)
    • setActionInterval

      public ActionProperties setActionInterval(int actionInterval, int preAnim, int postAnim)
    • postAction

      public ActionProperties postAction(int duration)
      Parameters:
      duration - set the duration for Post Action, (Capped by postAnimation)
    • repeat

      public ActionProperties repeat(int i)
    • repeat

      public ActionProperties repeat(int i, boolean anim)
    • setTicking

      public ActionProperties setTicking(boolean ticking)
    • getPreAnimation

      public int getPreAnimation()
    • getPostAnimation

      public int getPostAnimation()
    • getPostTick

      public int getPostTick()
    • getRepeats

      public int getRepeats()
    • shouldRepeatAnimation

      public boolean shouldRepeatAnimation()
    • alwaysTick

      public boolean alwaysTick()
    • getActionDuration

      public int getActionDuration()
    • shouldTickPost

      public boolean shouldTickPost()
    • setGoalPredicate

      public ActionProperties setGoalPredicate(Predicate<net.minecraft.world.entity.LivingEntity> predicate)
    • getGoalPredicate

      public Predicate<net.minecraft.world.entity.LivingEntity> getGoalPredicate()
    • testPredicate

      public boolean testPredicate(net.minecraft.world.entity.LivingEntity entity)
    • setUpdatesEveryTick

      public ActionProperties setUpdatesEveryTick(BiPredicate<net.minecraft.world.entity.LivingEntity,ActionInstance> predicate)
    • getUpdatesEveryTick

      public BiPredicate<net.minecraft.world.entity.LivingEntity,@Nullable ActionInstance> getUpdatesEveryTick()
    • updatesEveryTick

      public boolean updatesEveryTick(net.minecraft.world.entity.LivingEntity entity, @Nullable @Nullable ActionInstance instance)
    • checkTickPost

      public boolean checkTickPost(ActionInstance cooldown)