Class InLoveExecutor

java.lang.Object
cn.nukkit.entity.ai.executor.InLoveExecutor
All Implemented Interfaces:
IBehaviorExecutor

@PowerNukkitXOnly @Since("1.6.0.0-PNX") public class InLoveExecutor extends Object implements IBehaviorExecutor
  • Field Details

    • duration

      protected int duration
    • currentTick

      protected int currentTick
  • Constructor Details

    • InLoveExecutor

      public InLoveExecutor(int duration)
  • Method Details

    • execute

      public boolean execute(EntityIntelligent entity)
      Description copied from interface: IBehaviorExecutor
      调度器将会持续执行此执行器,直到返回false,或者执行器被中断
      此方法每gt都会调用
      Specified by:
      execute in interface IBehaviorExecutor
      Parameters:
      entity - 执行目标实体
      Returns:
      boolean
    • onInterrupt

      public void onInterrupt(EntityIntelligent entity)
      Description copied from interface: IBehaviorExecutor
      行为非正常中断时(例如被更高级行为覆盖)调用
      Specified by:
      onInterrupt in interface IBehaviorExecutor
      Parameters:
      entity - 目标实体
    • sendLoveParticle

      protected void sendLoveParticle(EntityIntelligent entity)