Class PickupWantedItemTask<E extends LivingEntity>
- java.lang.Object
-
- net.minecraft.entity.ai.brain.task.Task<E>
-
- net.minecraft.entity.ai.brain.task.PickupWantedItemTask<E>
-
public class PickupWantedItemTask<E extends LivingEntity> 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 int
maxDistToWalk
private java.util.function.Predicate<E>
predicate
private float
speedModifier
-
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
entryCondition
-
-
Constructor Summary
Constructors Constructor Description PickupWantedItemTask(float p_i231520_1_, boolean p_i231520_2_, int p_i231520_3_)
PickupWantedItemTask(java.util.function.Predicate<E> p_i231521_1_, float p_i231521_2_, boolean p_i231521_3_, int p_i231521_4_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkExtraStartConditions(ServerWorld p_212832_1_, E p_212832_2_)
private ItemEntity
getClosestLovedItem(E p_233909_1_)
protected void
start(ServerWorld p_212831_1_, E p_212831_2_, long p_212831_3_)
-
Methods inherited from class net.minecraft.entity.ai.brain.task.Task
canStillUse, doStop, getStatus, stop, tick, tickOrStop, timedOut, toString, tryStart
-
-
-
-
Field Detail
-
predicate
private final java.util.function.Predicate<E extends LivingEntity> predicate
-
maxDistToWalk
private final int maxDistToWalk
-
speedModifier
private final float speedModifier
-
-
Constructor Detail
-
PickupWantedItemTask
public PickupWantedItemTask(float p_i231520_1_, boolean p_i231520_2_, int p_i231520_3_)
-
PickupWantedItemTask
public PickupWantedItemTask(java.util.function.Predicate<E> p_i231521_1_, float p_i231521_2_, boolean p_i231521_3_, int p_i231521_4_)
-
-
Method Detail
-
checkExtraStartConditions
protected boolean checkExtraStartConditions(ServerWorld p_212832_1_, E p_212832_2_)
- Overrides:
checkExtraStartConditions
in classTask<E extends LivingEntity>
-
start
protected void start(ServerWorld p_212831_1_, E p_212831_2_, long p_212831_3_)
- Overrides:
start
in classTask<E extends LivingEntity>
-
getClosestLovedItem
private ItemEntity getClosestLovedItem(E p_233909_1_)
-
-