net.minecraft.entity.ai.brain.task

public class GiveGiftsToHeroTask

extends MultiTickTask<VillagerEntity>

All mapped superinterfaces:

Task

net.minecraft.world.entity.ai.behavior.GiveGiftToHero
net.minecraft.class_4243
net.minecraft.entity.ai.brain.task.GiveGiftsToHeroTask

Field summary

Modifier and TypeField
private static final int
THROW_GIFT_AT_DISTANCE
field_30117
MAX_DISTANCE
private static final int
MIN_TIME_BETWEEN_GIFTS
field_30118
DEFAULT_DURATION
private static final int
MAX_TIME_BETWEEN_GIFTS
field_30119
MAX_NEXT_GIFT_DELAY
private static final int
TIME_TO_DELAY_FOR_HEAD_TO_FINISH_TURNING
field_30120
RUN_TIME
private static final Map<RegistryKey<VillagerProfession>, RegistryKey<LootTable>>
GIFTS
field_18984
GIFTS
private static final float
SPEED_MODIFIER
field_30121
WALK_SPEED
private int
timeUntilNextGift
field_18985
ticksLeft
private boolean
giftGivenDuringThisRun
field_18986
done
private long
timeSinceStart
field_18987
startTime

Constructor summary

ModifierConstructor
public (int delay)

Method summary

Modifier and TypeMethod
protected boolean
checkExtraStartConditions(ServerLevel level, Villager body)
method_19962(class_3218 arg0, class_1646 arg1)
shouldRun(ServerWorld arg0, VillagerEntity arg1)
protected void
start(ServerLevel level, Villager body, long timestamp)
method_19963(class_3218 arg0, class_1646 arg1, long arg2)
run(ServerWorld arg0, VillagerEntity arg1, long arg2)
protected boolean
canStillUse(ServerLevel level, Villager body, long timestamp)
method_19965(class_3218 arg0, class_1646 arg1, long arg2)
shouldKeepRunning(ServerWorld arg0, VillagerEntity arg1, long arg2)
protected void
tick(ServerLevel level, Villager villager, long timestamp)
method_19967(class_3218 arg0, class_1646 arg1, long arg2)
keepRunning(ServerWorld arg0, VillagerEntity arg1, long arg2)
protected void
stop(ServerLevel level, Villager body, long timestamp)
method_19968(class_3218 arg0, class_1646 arg1, long arg2)
finishRunning(ServerWorld arg0, VillagerEntity arg1, long arg2)
private void
throwGift(ServerLevel level, Villager villager, LivingEntity target)
method_19957(class_3218 arg0, class_1646 arg1, class_1309 arg2)
giveGifts(ServerWorld world, VillagerEntity villager, LivingEntity recipient)
private static RegistryKey<LootTable>
getLootTableToThrow(Villager villager)
method_64173(class_1646 arg0)
getGiftLootTable(VillagerEntity villager)
private boolean
isHeroVisible(Villager body)
method_19964(class_1646 arg0)
isNearestPlayerHero(VillagerEntity villager)
private Optional<PlayerEntity>
getNearestTargetableHero(Villager body)
method_19966(class_1646 arg0)
getNearestPlayerIfHero(VillagerEntity villager)
private boolean
isHero(Player player)
method_19959(class_1657 arg0)
isHero(PlayerEntity player)
private boolean
isWithinThrowingDistance(Villager villager, Player player)
method_19958(class_1646 arg0, class_1657 arg1)
isCloseEnough(VillagerEntity villager, PlayerEntity player)
private static int
calculateTimeUntilNextGift(ServerLevel level)
method_19961(class_3218 arg0)
getNextGiftDelay(ServerWorld world)
protected boolean
checkExtraStartConditions(ServerLevel level, LivingEntity body)
method_18919(class_3218 arg0, class_1309 arg1)
shouldRun(ServerWorld arg0, LivingEntity arg1)
protected boolean
canStillUse(ServerLevel level, LivingEntity body, long timestamp)
method_18927(class_3218 arg0, class_1309 arg1, long arg2)
shouldKeepRunning(ServerWorld arg0, LivingEntity arg1, long arg2)
protected void
stop(ServerLevel level, LivingEntity body, long timestamp)
method_18926(class_3218 arg0, class_1309 arg1, long arg2)
finishRunning(ServerWorld arg0, LivingEntity arg1, long arg2)
protected void
tick(ServerLevel level, LivingEntity villager, long timestamp)
method_18924(class_3218 arg0, class_1309 arg1, long arg2)
keepRunning(ServerWorld arg0, LivingEntity arg1, long arg2)
protected void
start(ServerLevel level, LivingEntity body, long timestamp)
method_18920(class_3218 arg0, class_1309 arg1, long arg2)
run(ServerWorld arg0, LivingEntity arg1, long arg2)
private static void
lambda$throwGift$0(Villager arg0, LivingEntity arg1, ServerLevel arg2, ItemStack arg3)
method_64174(class_1646 arg0, class_1309 arg1, class_3218 arg2, class_1799 arg3)
method_64174(VillagerEntity arg0, LivingEntity arg1, ServerWorld world, ItemStack stack)