Class AttackTask<E extends MobEntity>

java.lang.Object
net.minecraft.entity.ai.brain.task.Task<E>
net.minecraft.entity.ai.brain.task.AttackTask<E>

public class AttackTask<E extends MobEntity>
extends Task<E>
  • Field Details

    • distance

      private final int distance
    • forwardMovement

      private final float forwardMovement
  • Constructor Details

    • AttackTask

      public AttackTask​(int distance, float forwardMovement)
  • Method Details

    • shouldRun

      protected boolean shouldRun​(ServerWorld serverWorld, E e)
      Overrides:
      shouldRun in class Task<E extends MobEntity>
    • run

      protected void run​(ServerWorld serverWorld, E e, long long2)
      Overrides:
      run in class Task<E extends MobEntity>
    • isAttackTargetVisible

      private boolean isAttackTargetVisible​(E entity)
    • isNearAttackTarget

      private boolean isNearAttackTarget​(E entity)
    • getAttackTarget

      private LivingEntity getAttackTarget​(E entity)