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 cew
-
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, TargetPredicate.EntityPredicate predicate) ActiveTargetGoal
(MobEntity mob, Class<T> targetClass, int reciprocalChance, boolean checkVisibility, boolean checkCanNavigate, TargetPredicate.EntityPredicate targetPredicate) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canStart()
protected void
private TargetPredicate
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, castToServerWorld, getControls, getServerWorld, 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
Lcew;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
Lcew;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
Lcew;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
Lcew;c:Lbwf;
-
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
Lcew;d:Lcgw;
-
-
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>
Lcew;<init>(Lbwh;Ljava/lang/Class;Z)V
-
ActiveTargetGoal
public ActiveTargetGoal(MobEntity mob, Class<T> targetClass, boolean checkVisibility, TargetPredicate.EntityPredicate predicate) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;ZLnet/minecraft/entity/ai/TargetPredicate$EntityPredicate;)V
intermediary <init>
Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;ZLnet/minecraft/class_4051$class_10254;)V
official <init>
Lcew;<init>(Lbwh;Ljava/lang/Class;ZLcgw$a;)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>
Lcew;<init>(Lbwh;Ljava/lang/Class;ZZ)V
-
ActiveTargetGoal
public ActiveTargetGoal(MobEntity mob, Class<T> targetClass, int reciprocalChance, boolean checkVisibility, boolean checkCanNavigate, @Nullable TargetPredicate.EntityPredicate targetPredicate) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;IZZLnet/minecraft/entity/ai/TargetPredicate$EntityPredicate;)V
intermediary <init>
Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;IZZLnet/minecraft/class_4051$class_10254;)V
official <init>
Lcew;<init>(Lbwh;Ljava/lang/Class;IZZLcgw$a;)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
Lcew;a(D)Lfbs;
-
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
Lcew;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 d
Lcdd;d()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
Lcew;a(Lbwf;)V
-
getAndUpdateTargetPredicate
- Mappings:
Namespace Name Mixin selector named getAndUpdateTargetPredicate
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;getAndUpdateTargetPredicate()Lnet/minecraft/entity/ai/TargetPredicate;
intermediary method_61438
Lnet/minecraft/class_1400;method_61438()Lnet/minecraft/class_4051;
official i
Lcew;i()Lcgw;
-