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 official boo
intermediary net/minecraft/class_1400
named net/minecraft/entity/ai/goal/ActiveTargetGoal
-
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 official i
Lboo;i:I
intermediary field_36304
Lnet/minecraft/class_1400;field_36304:I
named DEFAULT_RECIPROCAL_CHANCE
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;DEFAULT_RECIPROCAL_CHANCE:I
-
targetClass
- Mappings:
Namespace Name Mixin selector official a
Lboo;a:Ljava/lang/Class;
intermediary field_6643
Lnet/minecraft/class_1400;field_6643:Ljava/lang/Class;
named targetClass
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;targetClass: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 official b
Lboo;b:I
intermediary field_6641
Lnet/minecraft/class_1400;field_6641:I
named reciprocalChance
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;reciprocalChance:I
-
targetEntity
- Mappings:
Namespace Name Mixin selector official c
Lboo;c:Lbfz;
intermediary field_6644
Lnet/minecraft/class_1400;field_6644:Lnet/minecraft/class_1309;
named targetEntity
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;targetEntity:Lnet/minecraft/entity/LivingEntity;
-
targetPredicate
- Mappings:
Namespace Name Mixin selector official d
Lboo;d:Lbqm;
intermediary field_6642
Lnet/minecraft/class_1400;field_6642:Lnet/minecraft/class_4051;
named targetPredicate
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;targetPredicate:Lnet/minecraft/entity/ai/TargetPredicate;
-
-
Constructor Details
-
ActiveTargetGoal
- Mappings:
Namespace Name Mixin selector official <init>
Lboo;<init>(Lbgb;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/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;Z)V
-
ActiveTargetGoal
public ActiveTargetGoal(MobEntity mob, Class<T> targetClass, boolean checkVisibility, Predicate<LivingEntity> targetPredicate) - Mappings:
Namespace Name Mixin selector official <init>
Lboo;<init>(Lbgb;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
named <init>
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;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 official <init>
Lboo;<init>(Lbgb;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/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;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 official <init>
Lboo;<init>(Lbgb;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/ActiveTargetGoal;<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
Lboo;a(D)Leed;
intermediary method_6321
Lnet/minecraft/class_1400;method_6321(D)Lnet/minecraft/class_238;
named getSearchBox
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;getSearchBox(D)Lnet/minecraft/util/math/Box;
-
findClosestTarget
protected void findClosestTarget()- Mappings:
Namespace Name Mixin selector official h
Lboo;h()V
intermediary method_18415
Lnet/minecraft/class_1400;method_18415()V
named findClosestTarget
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;findClosestTarget()V
-
start
public void start()- Overrides:
start
in classTrackTargetGoal
- Mappings:
Namespace Name Mixin selector official c
Lbmv;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
Lboo;a(Lbfz;)V
intermediary method_24632
Lnet/minecraft/class_1400;method_24632(Lnet/minecraft/class_1309;)V
named setTargetEntity
Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;setTargetEntity(Lnet/minecraft/entity/LivingEntity;)V
-