Package net.minecraft.entity.ai.goal
Class FollowTargetGoal<T extends LivingEntity>
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.TrackTargetGoal
net.minecraft.entity.ai.goal.FollowTargetGoal<T>
- Direct Known Subclasses:
BeeEntity.BeeFollowTargetGoal
,DisableableFollowTargetGoal
,EndermanEntity.TeleportTowardsPlayerGoal
,FollowTargetIfTamedGoal
,FoxEntity.DefendFriendGoal
,LlamaEntity.ChaseWolvesGoal
,PolarBearEntity.FollowPlayersGoal
,RaidGoal
,ShulkerEntity.SearchForPlayerGoal
,ShulkerEntity.SearchForTargetGoal
,SpiderEntity.FollowTargetGoal
,VindicatorEntity.FollowEntityGoal
public class FollowTargetGoal<T extends LivingEntity> extends TrackTargetGoal
- Mappings:
Namespace Name official ays
intermediary net/minecraft/class_1400
named net/minecraft/entity/ai/goal/FollowTargetGoal
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.goal.Goal
Goal.Control
-
Field Summary
Fields Modifier and Type Field Description protected int
reciprocalChance
protected Class<T>
targetClass
protected LivingEntity
targetEntity
protected TargetPredicate
targetPredicate
Fields inherited from class net.minecraft.entity.ai.goal.TrackTargetGoal
checkVisibility, maxTimeWithoutVisibility, mob, target
-
Constructor Summary
Constructors Constructor Description FollowTargetGoal(MobEntity mob, Class<T> targetClass, boolean checkVisibility)
FollowTargetGoal(MobEntity mob, Class<T> targetClass, boolean checkVisibility, boolean checkCanNavigate)
FollowTargetGoal(MobEntity mob, Class<T> targetClass, int reciprocalChance, boolean checkVisibility, boolean checkCanNavigate, Predicate<LivingEntity> targetPredicate)
-
Method Summary
Modifier and Type Method Description boolean
canStart()
protected void
findClosestTarget()
protected Box
getSearchBox(double distance)
void
setTargetEntity(LivingEntity targetEntity)
void
start()
Methods inherited from class net.minecraft.entity.ai.goal.TrackTargetGoal
canTrack, getFollowRange, setMaxTimeWithoutVisibility, shouldContinue, stop
Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, tick, toString
-
Field Details
-
targetClass
- Mappings:
Namespace Name Mixin selector official a
Lays;a:Ljava/lang/Class;
intermediary field_6643
Lnet/minecraft/class_1400;field_6643:Ljava/lang/Class;
named targetClass
Lnet/minecraft/entity/ai/goal/FollowTargetGoal;targetClass:Ljava/lang/Class;
-
reciprocalChance
protected final int reciprocalChance- Mappings:
Namespace Name Mixin selector official b
Lays;b:I
intermediary field_6641
Lnet/minecraft/class_1400;field_6641:I
named reciprocalChance
Lnet/minecraft/entity/ai/goal/FollowTargetGoal;reciprocalChance:I
-
targetEntity
- Mappings:
Namespace Name Mixin selector official c
Lays;c:Lari;
intermediary field_6644
Lnet/minecraft/class_1400;field_6644:Lnet/minecraft/class_1309;
named targetEntity
Lnet/minecraft/entity/ai/goal/FollowTargetGoal;targetEntity:Lnet/minecraft/entity/LivingEntity;
-
targetPredicate
- Mappings:
Namespace Name Mixin selector official d
Lays;d:Lbal;
intermediary field_6642
Lnet/minecraft/class_1400;field_6642:Lnet/minecraft/class_4051;
named targetPredicate
Lnet/minecraft/entity/ai/goal/FollowTargetGoal;targetPredicate:Lnet/minecraft/entity/ai/TargetPredicate;
-
-
Constructor Details
-
FollowTargetGoal
- Mappings:
Namespace Name Mixin selector official <init>
Lays;<init>(Larj;Ljava/lang/Class;Z)V
intermediary <init>
Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;Z)V
named <init>
Lnet/minecraft/entity/ai/goal/FollowTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;Z)V
-
FollowTargetGoal
public FollowTargetGoal(MobEntity mob, Class<T> targetClass, boolean checkVisibility, boolean checkCanNavigate)- Mappings:
Namespace Name Mixin selector official <init>
Lays;<init>(Larj;Ljava/lang/Class;ZZ)V
intermediary <init>
Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;ZZ)V
named <init>
Lnet/minecraft/entity/ai/goal/FollowTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;ZZ)V
-
FollowTargetGoal
public FollowTargetGoal(MobEntity mob, Class<T> targetClass, int reciprocalChance, boolean checkVisibility, boolean checkCanNavigate, @Nullable Predicate<LivingEntity> targetPredicate)- Mappings:
Namespace Name Mixin selector official <init>
Lays;<init>(Larj;Ljava/lang/Class;IZZLjava/util/function/Predicate;)V
intermediary <init>
Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;IZZLjava/util/function/Predicate;)V
named <init>
Lnet/minecraft/entity/ai/goal/FollowTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;IZZLjava/util/function/Predicate;)V
-
-
Method Details
-
canStart
public boolean canStart() -
getSearchBox
- Mappings:
Namespace Name Mixin selector official a
Lays;a(D)Ldip;
intermediary method_6321
Lnet/minecraft/class_1400;method_6321(D)Lnet/minecraft/class_238;
named getSearchBox
Lnet/minecraft/entity/ai/goal/FollowTargetGoal;getSearchBox(D)Lnet/minecraft/util/math/Box;
-
findClosestTarget
protected void findClosestTarget()- Mappings:
Namespace Name Mixin selector official g
Lays;g()V
intermediary method_18415
Lnet/minecraft/class_1400;method_18415()V
named findClosestTarget
Lnet/minecraft/entity/ai/goal/FollowTargetGoal;findClosestTarget()V
-
start
public void start()- Overrides:
start
in classTrackTargetGoal
- Mappings:
Namespace Name Mixin selector official c
Lawx;c()V
intermediary method_6269
Lnet/minecraft/class_1352;method_6269()V
named start
Lnet/minecraft/entity/ai/goal/Goal;start()V
-
setTargetEntity
- Mappings:
Namespace Name Mixin selector official a
Lays;a(Lari;)V
intermediary method_24632
Lnet/minecraft/class_1400;method_24632(Lnet/minecraft/class_1309;)V
named setTargetEntity
Lnet/minecraft/entity/ai/goal/FollowTargetGoal;setTargetEntity(Lnet/minecraft/entity/LivingEntity;)V
-