Class AttackGoal

java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.AttackGoal

public class AttackGoal extends Goal
Goal that causes its mob to follow and attack its selected target.
Mappings:
Namespace Name
named net/minecraft/entity/ai/goal/AttackGoal
intermediary net/minecraft/class_1371
official cdt
  • Field Details

    • mob

      private final MobEntity mob
      Mappings:
      Namespace Name Mixin selector
      named mob Lnet/minecraft/entity/ai/goal/AttackGoal;mob:Lnet/minecraft/entity/mob/MobEntity;
      intermediary field_6541 Lnet/minecraft/class_1371;field_6541:Lnet/minecraft/class_1308;
      official a Lcdt;a:Lbwh;
    • target

      private LivingEntity target
      Mappings:
      Namespace Name Mixin selector
      named target Lnet/minecraft/entity/ai/goal/AttackGoal;target:Lnet/minecraft/entity/LivingEntity;
      intermediary field_6539 Lnet/minecraft/class_1371;field_6539:Lnet/minecraft/class_1309;
      official b Lcdt;b:Lbwf;
    • cooldown

      private int cooldown
      Mappings:
      Namespace Name Mixin selector
      named cooldown Lnet/minecraft/entity/ai/goal/AttackGoal;cooldown:I
      intermediary field_6540 Lnet/minecraft/class_1371;field_6540:I
      official c Lcdt;c:I
  • Constructor Details

    • AttackGoal

      public AttackGoal(MobEntity mob)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/ai/goal/AttackGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;)V
      intermediary <init> Lnet/minecraft/class_1371;<init>(Lnet/minecraft/class_1308;)V
      official <init> Lcdt;<init>(Lbwh;)V
  • Method Details

    • canStart

      public boolean canStart()
      Specified by:
      canStart in class Goal
      Mappings:
      Namespace Name Mixin selector
      named canStart Lnet/minecraft/entity/ai/goal/Goal;canStart()Z
      intermediary method_6264 Lnet/minecraft/class_1352;method_6264()Z
      official b Lcdd;b()Z
    • shouldContinue

      public boolean shouldContinue()
      Overrides:
      shouldContinue in class Goal
      Mappings:
      Namespace Name Mixin selector
      named shouldContinue Lnet/minecraft/entity/ai/goal/Goal;shouldContinue()Z
      intermediary method_6266 Lnet/minecraft/class_1352;method_6266()Z
      official c Lcdd;c()Z
    • stop

      public void stop()
      Overrides:
      stop in class Goal
      Mappings:
      Namespace Name Mixin selector
      named stop Lnet/minecraft/entity/ai/goal/Goal;stop()V
      intermediary method_6270 Lnet/minecraft/class_1352;method_6270()V
      official e Lcdd;e()V
    • shouldRunEveryTick

      public boolean shouldRunEveryTick()
      Returns if the goal should run every tick or not.

      This returns false by default. If this returns false, the goal will tick once after the entity is spawned, and will tick every other tick.

      Overrides:
      shouldRunEveryTick in class Goal
      Returns:
      if the goal should run every tick or not
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named shouldRunEveryTick Lnet/minecraft/entity/ai/goal/Goal;shouldRunEveryTick()Z
      intermediary method_38846 Lnet/minecraft/class_1352;method_38846()Z
      official V_ Lcdd;V_()Z
    • tick

      public void tick()
      Overrides:
      tick in class Goal
      Mappings:
      Namespace Name Mixin selector
      named tick Lnet/minecraft/entity/ai/goal/Goal;tick()V
      intermediary method_6268 Lnet/minecraft/class_1352;method_6268()V
      official a Lcdd;a()V