Class RidingTask<E extends LivingEntity,T extends Entity>
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<E>
net.minecraft.entity.ai.brain.task.RidingTask<E,T>
public class RidingTask<E extends LivingEntity,T extends Entity> extends Task<E>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status
-
Field Summary
Fields Modifier and Type Field Description private BiPredicate<E,Entity>
alternativeRideCondition
private int
range
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
requiredMemoryStates
-
Constructor Summary
Constructors Constructor Description RidingTask(int range, BiPredicate<E,Entity> alternativeRideCondition)
-
Method Summary
Modifier and Type Method Description private boolean
canRideTarget(E entity, Entity target)
protected void
run(ServerWorld world, E entity, long time)
protected boolean
shouldRun(ServerWorld world, E entity)
Methods inherited from class net.minecraft.entity.ai.brain.task.Task
finishRunning, getStatus, isTimeLimitExceeded, keepRunning, shouldKeepRunning, stop, tick, toString, tryStarting
-
Field Details
-
range
private final int range -
alternativeRideCondition
-
-
Constructor Details
-
RidingTask
-
-
Method Details
-
shouldRun
- Overrides:
shouldRun
in classTask<E extends LivingEntity>
-
canRideTarget
-
run
- Overrides:
run
in classTask<E extends LivingEntity>
-