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 asq
intermediary net/minecraft/class_4807
named net/minecraft/entity/ai/brain/task/AttackTask
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status
-
Field Summary
Fields Modifier and Type Field Description private int
distance
private float
forwardMovement
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
requiredMemoryStates
-
Constructor Summary
Constructors Constructor Description AttackTask(int distance, float forwardMovement)
-
Method Summary
Modifier and Type Method Description private LivingEntity
getAttackTarget(E entity)
private boolean
isAttackTargetVisible(E entity)
private boolean
isNearAttackTarget(E entity)
protected void
run(ServerWorld serverWorld, E e, long long2)
protected boolean
shouldRun(ServerWorld serverWorld, E e)
Methods inherited from class net.minecraft.entity.ai.brain.task.Task
finishRunning, getStatus, isTimeLimitExceeded, keepRunning, shouldKeepRunning, stop, tick, toString, tryStarting
-
Field Details
-
distance
private final int distance- Mappings:
Namespace Name Mixin selector official b
Lasq;b: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 c
Lasq;c: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>
Lasq;<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
- Overrides:
shouldRun
in classTask<E extends MobEntity>
- Mappings:
Namespace Name Mixin selector official a
Lasq;a(Laav;Larj;)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
- Overrides:
run
in classTask<E extends MobEntity>
- Mappings:
Namespace Name Mixin selector official a
Lasq;a(Laav;Larj;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
- Mappings:
Namespace Name Mixin selector official a
Lasq;a(Larj;)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
- Mappings:
Namespace Name Mixin selector official b
Lasq;b(Larj;)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
- Mappings:
Namespace Name Mixin selector official c
Lasq;c(Larj;)Lari;
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;
-