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>
Mappings:
Namespace Name
official bcp
intermediary net/minecraft/class_4807
named net/minecraft/entity/ai/brain/task/AttackTask
  • Field Details

    • distance

      private final int distance
      Mappings:
      Namespace Name Mixin selector
      official a Lbcp;a:I
      intermediary field_22285 Lnet/minecraft/class_4807;field_22285:I
      named distance Lnet/minecraft/entity/ai/brain/task/AttackTask;distance:I
    • forwardMovement

      private final float forwardMovement
      Mappings:
      Namespace Name Mixin selector
      official d Lbcp;d:F
      intermediary field_22286 Lnet/minecraft/class_4807;field_22286:F
      named forwardMovement Lnet/minecraft/entity/ai/brain/task/AttackTask;forwardMovement:F
  • Constructor Details

    • AttackTask

      public AttackTask(int distance, float forwardMovement)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbcp;<init>(IF)V
      intermediary <init> Lnet/minecraft/class_4807;<init>(IF)V
      named <init> Lnet/minecraft/entity/ai/brain/task/AttackTask;<init>(IF)V
  • Method Details

    • shouldRun

      protected boolean shouldRun(ServerWorld serverWorld, E e)
      Overrides:
      shouldRun in class Task<E extends MobEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Lbcp;a(Lafo;Lbbh;)Z
      intermediary method_24552 Lnet/minecraft/class_4807;method_24552(Lnet/minecraft/class_3218;Lnet/minecraft/class_1308;)Z
      named shouldRun Lnet/minecraft/entity/ai/brain/task/AttackTask;shouldRun(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/mob/MobEntity;)Z
    • run

      protected void run(ServerWorld serverWorld, E e, long long2)
      Overrides:
      run in class Task<E extends MobEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Lbcp;a(Lafo;Lbbh;J)V
      intermediary method_24553 Lnet/minecraft/class_4807;method_24553(Lnet/minecraft/class_3218;Lnet/minecraft/class_1308;J)V
      named run Lnet/minecraft/entity/ai/brain/task/AttackTask;run(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/mob/MobEntity;J)V
    • isAttackTargetVisible

      private boolean isAttackTargetVisible(E entity)
      Mappings:
      Namespace Name Mixin selector
      official a Lbcp;a(Lbbh;)Z
      intermediary method_24551 Lnet/minecraft/class_4807;method_24551(Lnet/minecraft/class_1308;)Z
      named isAttackTargetVisible Lnet/minecraft/entity/ai/brain/task/AttackTask;isAttackTargetVisible(Lnet/minecraft/entity/mob/MobEntity;)Z
    • isNearAttackTarget

      private boolean isNearAttackTarget(E entity)
      Mappings:
      Namespace Name Mixin selector
      official b Lbcp;b(Lbbh;)Z
      intermediary method_24554 Lnet/minecraft/class_4807;method_24554(Lnet/minecraft/class_1308;)Z
      named isNearAttackTarget Lnet/minecraft/entity/ai/brain/task/AttackTask;isNearAttackTarget(Lnet/minecraft/entity/mob/MobEntity;)Z
    • getAttackTarget

      private LivingEntity getAttackTarget(E entity)
      Mappings:
      Namespace Name Mixin selector
      official c Lbcp;c(Lbbh;)Lbbf;
      intermediary method_24555 Lnet/minecraft/class_4807;method_24555(Lnet/minecraft/class_1308;)Lnet/minecraft/class_1309;
      named getAttackTarget Lnet/minecraft/entity/ai/brain/task/AttackTask;getAttackTarget(Lnet/minecraft/entity/mob/MobEntity;)Lnet/minecraft/entity/LivingEntity;