net.minecraft.entity.ai.brain.task

public class GiveInventoryToLookTargetTask<E extends LivingEntity extends InventoryOwner>

extends MultiTickTask<E>

All mapped superinterfaces:

Task

net.minecraft.world.entity.ai.behavior.GoAndGiveItemsToTarget
net.minecraft.class_7296
net.minecraft.entity.ai.brain.task.GiveInventoryToLookTargetTask

Field summary

Modifier and TypeField
private static final int
CLOSE_ENOUGH_DISTANCE_TO_TARGET
field_38387
COMPLETION_RANGE
private static final int
ITEM_PICKUP_COOLDOWN_AFTER_THROWING
field_38388
ITEM_PICKUP_COOLDOWN_TICKS
private final Vec3d
throwVelocity
field_1_1059
velocityFactor
private final Function<LivingEntity, Optional<LookTarget>>
targetPositionGetter
field_38389
lookTargetFunction
private final float
speedModifier
field_38390
speed
private final GiveInventoryToLookTargetTask$GiveListener<E>
itemThrower
field_1_1058
giveListener

Constructor summary

ModifierConstructor
public (Function<LivingEntity, Optional<LookTarget>> lookTargetFunction, float speed, int runTime, GiveInventoryToLookTargetTask$GiveListener<E> giveListener)

Method summary

Modifier and TypeMethod
protected boolean
checkExtraStartConditions(ServerLevel level, E body)
method_18919(class_3218 arg0, E arg1)
shouldRun(ServerWorld arg0, E arg1)
protected boolean
canStillUse(ServerLevel level, E body, long timestamp)
method_18927(class_3218 arg0, E arg1, long arg2)
shouldKeepRunning(ServerWorld arg0, E arg1, long arg2)
protected void
start(ServerLevel level, E body, long timestamp)
method_18920(class_3218 arg0, E arg1, long arg2)
run(ServerWorld arg0, E arg1, long arg2)
protected void
tick(ServerLevel level, E body, long timestamp)
method_18924(class_3218 arg0, E arg1, long arg2)
keepRunning(ServerWorld arg0, E arg1, long arg2)
private boolean
canThrowItemToTarget(E body)
method_42649(E arg0)
hasItemAndTarget(E entity)
private void
lambda$start$0(LivingEntity arg0, PositionTracker arg1)
method_42650(class_1309 arg0, class_4115 arg1)
method_42650(LivingEntity arg0, LookTarget target)