Class EntityExplosionExecutor

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

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

    • explodeTime

      protected int explodeTime
    • explodeForce

      protected int explodeForce
    • currentTick

      protected int currentTick
    • flagMemory

      @Nullable protected MemoryType<Boolean> flagMemory
  • Constructor Details

    • EntityExplosionExecutor

      public EntityExplosionExecutor(int explodeTime, int explodeForce)
    • EntityExplosionExecutor

      public EntityExplosionExecutor(int explodeTime, int explodeForce, @Nullable MemoryType<Boolean> flagMemory)
  • Method Details

    • execute

      public boolean execute(EntityIntelligent entity)
      Description copied from interface: IBehaviorExecutor
      调度器将会持续执行此执行器,直到返回false,或者执行器被中断
      此方法每gt都会调用

      The scheduler will continue to execute this executor until it returns false or the executor is interrupted
      This method will be called every gt

      Specified by:
      execute in interface IBehaviorExecutor
      Parameters:
      entity - 执行目标实体
      Returns:
      boolean
    • onInterrupt

      public void onInterrupt(EntityIntelligent entity)
      Description copied from interface: IBehaviorExecutor
      行为非正常中断时(例如被更高级行为覆盖)调用

      Called when behavior breaks abnormally (e.g. overridden by higher-level behavior)

      Specified by:
      onInterrupt in interface IBehaviorExecutor
      Parameters:
      entity - 目标实体
    • onStop

      public void onStop(EntityIntelligent entity)
      Description copied from interface: IBehaviorExecutor
      行为正常结束时(execute()方法返回false)调用

      Called when the behavior ends normally (the execute() method returns false)

      Specified by:
      onStop in interface IBehaviorExecutor
      Parameters:
      entity - 目标实体
    • explode

      protected void explode(EntityIntelligent entity)