Package net.minecraft.entity.ai.goal
Class ActiveTargetGoal<T extends LivingEntity>
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.TrackTargetGoal
net.minecraft.entity.ai.goal.ActiveTargetGoal<T>
- Direct Known Subclasses:
BeeEntity.StingTargetGoal
,DisableableFollowTargetGoal
,EndermanEntity.TeleportTowardsPlayerGoal
,FoxEntity.DefendFriendGoal
,LlamaEntity.ChaseWolvesGoal
,PolarBearEntity.ProtectBabiesGoal
,RaidGoal
,ShulkerEntity.TargetOtherTeamGoal
,ShulkerEntity.TargetPlayerGoal
,SpiderEntity.TargetGoal
,UntamedActiveTargetGoal
,VindicatorEntity.TargetGoal
A target goal that finds a target by entity class when the goal starts.
- Mappings:
Namespace Name named net/minecraft/entity/ai/goal/ActiveTargetGoal
intermediary net/minecraft/class_1400
official cch
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.goal.Goal
Goal.Control
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
protected final int
The reciprocal of chance to actually search for a target on every tick when this goal is not started.protected @Nullable LivingEntity
protected TargetPredicate
Fields inherited from class net.minecraft.entity.ai.goal.TrackTargetGoal
checkVisibility, maxTimeWithoutVisibility, mob, target
-
Constructor Summary
ConstructorDescriptionActiveTargetGoal
(MobEntity mob, Class<T> targetClass, boolean checkVisibility) ActiveTargetGoal
(MobEntity mob, Class<T> targetClass, boolean checkVisibility, boolean checkCanNavigate) ActiveTargetGoal
(MobEntity mob, Class<T> targetClass, boolean checkVisibility, Predicate<LivingEntity> targetPredicate) ActiveTargetGoal
(MobEntity mob, Class<T> targetClass, int reciprocalChance, boolean checkVisibility, boolean checkCanNavigate, @Nullable Predicate<LivingEntity> targetPredicate) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canStart()
protected void
protected Box
getSearchBox
(double distance) void
setTargetEntity
(@Nullable 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, getTickCount, setControls, shouldRunEveryTick, tick, toGoalTicks, toString
-
Field Details
-
DEFAULT_RECIPROCAL_CHANCE
private static final int DEFAULT_RECIPROCAL_CHANCE- See Also:
- Mappings:
Namespace Name Mixin selector named DEFAULT_RECIPROCAL_CHANCE
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;DEFAULT_RECIPROCAL_CHANCE:I
intermediary field_36304
Lnet/minecraft/class_1400;field_36304:I
official i
Lcch;i:I
-
targetClass
- Mappings:
Namespace Name Mixin selector named targetClass
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;targetClass:Ljava/lang/Class;
intermediary field_6643
Lnet/minecraft/class_1400;field_6643:Ljava/lang/Class;
official a
Lcch;a:Ljava/lang/Class;
-
reciprocalChance
protected final int reciprocalChanceThe reciprocal of chance to actually search for a target on every tick when this goal is not started. This is also the average number of ticks between each search (as in a poisson distribution).- Mappings:
Namespace Name Mixin selector named reciprocalChance
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;reciprocalChance:I
intermediary field_6641
Lnet/minecraft/class_1400;field_6641:I
official b
Lcch;b:I
-
targetEntity
- Mappings:
Namespace Name Mixin selector named targetEntity
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;targetEntity:Lnet/minecraft/entity/LivingEntity;
intermediary field_6644
Lnet/minecraft/class_1400;field_6644:Lnet/minecraft/class_1309;
official c
Lcch;c:Lbtq;
-
targetPredicate
- Mappings:
Namespace Name Mixin selector named targetPredicate
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;targetPredicate:Lnet/minecraft/entity/ai/TargetPredicate;
intermediary field_6642
Lnet/minecraft/class_1400;field_6642:Lnet/minecraft/class_4051;
official d
Lcch;d:Lceh;
-
-
Constructor Details
-
ActiveTargetGoal
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;Z)V
intermediary <init>
Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;Z)V
official <init>
Lcch;<init>(Lbts;Ljava/lang/Class;Z)V
-
ActiveTargetGoal
public ActiveTargetGoal(MobEntity mob, Class<T> targetClass, boolean checkVisibility, Predicate<LivingEntity> targetPredicate) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;ZLjava/util/function/Predicate;)V
intermediary <init>
Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;ZLjava/util/function/Predicate;)V
official <init>
Lcch;<init>(Lbts;Ljava/lang/Class;ZLjava/util/function/Predicate;)V
-
ActiveTargetGoal
public ActiveTargetGoal(MobEntity mob, Class<T> targetClass, boolean checkVisibility, boolean checkCanNavigate) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;ZZ)V
intermediary <init>
Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;ZZ)V
official <init>
Lcch;<init>(Lbts;Ljava/lang/Class;ZZ)V
-
ActiveTargetGoal
public ActiveTargetGoal(MobEntity mob, Class<T> targetClass, int reciprocalChance, boolean checkVisibility, boolean checkCanNavigate, @Nullable @Nullable Predicate<LivingEntity> targetPredicate) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;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
official <init>
Lcch;<init>(Lbts;Ljava/lang/Class;IZZLjava/util/function/Predicate;)V
-
-
Method Details
-
canStart
public boolean canStart() -
getSearchBox
- Mappings:
Namespace Name Mixin selector named getSearchBox
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;getSearchBox(D)Lnet/minecraft/util/math/Box;
intermediary method_6321
Lnet/minecraft/class_1400;method_6321(D)Lnet/minecraft/class_238;
official a
Lcch;a(D)Levn;
-
findClosestTarget
protected void findClosestTarget()- Mappings:
Namespace Name Mixin selector named findClosestTarget
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;findClosestTarget()V
intermediary method_18415
Lnet/minecraft/class_1400;method_18415()V
official h
Lcch;h()V
-
start
public void start()- Overrides:
start
in classTrackTargetGoal
- Mappings:
Namespace Name Mixin selector named start
Lnet/minecraft/entity/ai/goal/Goal;start()V
intermediary method_6269
Lnet/minecraft/class_1352;method_6269()V
official c
Lcao;c()V
-
setTargetEntity
- Mappings:
Namespace Name Mixin selector named setTargetEntity
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;setTargetEntity(Lnet/minecraft/entity/LivingEntity;)V
intermediary method_24632
Lnet/minecraft/class_1400;method_24632(Lnet/minecraft/class_1309;)V
official a
Lcch;a(Lbtq;)V
-