Class MeleeAttackTask

java.lang.Object
net.minecraft.entity.ai.brain.task.Task<MobEntity>
net.minecraft.entity.ai.brain.task.MeleeAttackTask

public class MeleeAttackTask extends Task<MobEntity>
Mappings:
Namespace Name
official bdz
intermediary net/minecraft/class_4816
named net/minecraft/entity/ai/brain/task/MeleeAttackTask
  • Field Details

    • interval

      private final int interval
      Mappings:
      Namespace Name Mixin selector
      official a Lbdz;a:I
      intermediary field_22308 Lnet/minecraft/class_4816;field_22308:I
      named interval Lnet/minecraft/entity/ai/brain/task/MeleeAttackTask;interval:I
  • Constructor Details

    • MeleeAttackTask

      public MeleeAttackTask(int interval)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbdz;<init>(I)V
      intermediary <init> Lnet/minecraft/class_4816;<init>(I)V
      named <init> Lnet/minecraft/entity/ai/brain/task/MeleeAttackTask;<init>(I)V
  • Method Details

    • shouldRun

      protected boolean shouldRun(ServerWorld serverWorld, MobEntity mobEntity)
      Overrides:
      shouldRun in class Task<MobEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Lbdz;a(Lafo;Lbbh;)Z
      intermediary method_24588 Lnet/minecraft/class_4816;method_24588(Lnet/minecraft/class_3218;Lnet/minecraft/class_1308;)Z
      named shouldRun Lnet/minecraft/entity/ai/brain/task/MeleeAttackTask;shouldRun(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/mob/MobEntity;)Z
    • isHoldingUsableRangedWeapon

      private boolean isHoldingUsableRangedWeapon(MobEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official a Lbdz;a(Lbbh;)Z
      intermediary method_25942 Lnet/minecraft/class_4816;method_25942(Lnet/minecraft/class_1308;)Z
      named isHoldingUsableRangedWeapon Lnet/minecraft/entity/ai/brain/task/MeleeAttackTask;isHoldingUsableRangedWeapon(Lnet/minecraft/entity/mob/MobEntity;)Z
    • run

      protected void run(ServerWorld serverWorld, MobEntity mobEntity, long long2)
      Overrides:
      run in class Task<MobEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Lbdz;a(Lafo;Lbbh;J)V
      intermediary method_24590 Lnet/minecraft/class_4816;method_24590(Lnet/minecraft/class_3218;Lnet/minecraft/class_1308;J)V
      named run Lnet/minecraft/entity/ai/brain/task/MeleeAttackTask;run(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/mob/MobEntity;J)V
    • getAttackTarget

      private LivingEntity getAttackTarget(MobEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official b Lbdz;b(Lbbh;)Lbbf;
      intermediary method_25944 Lnet/minecraft/class_4816;method_25944(Lnet/minecraft/class_1308;)Lnet/minecraft/class_1309;
      named getAttackTarget Lnet/minecraft/entity/ai/brain/task/MeleeAttackTask;getAttackTarget(Lnet/minecraft/entity/mob/MobEntity;)Lnet/minecraft/entity/LivingEntity;