Package net.minecraft.entity.mob
Class EndermanEntity.TeleportTowardsPlayerGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.TrackTargetGoal
net.minecraft.entity.ai.goal.FollowTargetGoal<PlayerEntity>
net.minecraft.entity.mob.EndermanEntity.TeleportTowardsPlayerGoal
- Enclosing class:
- EndermanEntity
static class EndermanEntity.TeleportTowardsPlayerGoal extends FollowTargetGoal<PlayerEntity>
-
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 private EndermanEntity
enderman
private int
lookAtPlayerWarmup
private TargetPredicate
staringPlayerPredicate
private PlayerEntity
targetPlayer
private int
ticksSinceUnseenTeleport
private TargetPredicate
validTargetPredicate
Fields inherited from class net.minecraft.entity.ai.goal.FollowTargetGoal
reciprocalChance, targetClass, targetEntity, targetPredicate
Fields inherited from class net.minecraft.entity.ai.goal.TrackTargetGoal
checkVisibility, maxTimeWithoutVisibility, mob, target
-
Constructor Summary
Constructors Constructor Description TeleportTowardsPlayerGoal(EndermanEntity enderman, Predicate<LivingEntity> predicate)
-
Method Summary
Modifier and Type Method Description boolean
canStart()
boolean
shouldContinue()
void
start()
void
stop()
void
tick()
Methods inherited from class net.minecraft.entity.ai.goal.FollowTargetGoal
findClosestTarget, getSearchBox, setTargetEntity
Methods inherited from class net.minecraft.entity.ai.goal.TrackTargetGoal
canTrack, getFollowRange, setMaxTimeWithoutVisibility
Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, toString
-
Field Details
-
enderman
-
targetPlayer
-
lookAtPlayerWarmup
private int lookAtPlayerWarmup -
ticksSinceUnseenTeleport
private int ticksSinceUnseenTeleport -
staringPlayerPredicate
-
validTargetPredicate
-
-
Constructor Details
-
TeleportTowardsPlayerGoal
public TeleportTowardsPlayerGoal(EndermanEntity enderman, @Nullable Predicate<LivingEntity> predicate)
-
-
Method Details
-
canStart
public boolean canStart()- Overrides:
canStart
in classFollowTargetGoal<PlayerEntity>
-
start
public void start()- Overrides:
start
in classFollowTargetGoal<PlayerEntity>
-
stop
public void stop()- Overrides:
stop
in classTrackTargetGoal
-
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinue
in classTrackTargetGoal
-
tick
public void tick()
-