net.minecraft.world.entity.ai.behavior

public class GiveGiftToHero

extends Behavior<Villager>

azx
net.minecraft.world.entity.ai.behavior.GiveGiftToHero
net.minecraft.class_4243
net.minecraft.entity.ai.brain.task.GiveGiftsToHeroTask
net.minecraft.src.C_589_
net.minecraft.world.entity.ai.behavior.BehaviorVillageHeroGift

Field summary

Modifier and TypeField
private static final int
a
THROW_GIFT_AT_DISTANCE
field_30117
MAX_DISTANCE
f_147546_
private static final int
c
MIN_TIME_BETWEEN_GIFTS
field_30118
DEFAULT_DURATION
f_147547_
private static final int
d
MAX_TIME_BETWEEN_GIFTS
field_30119
field_30119
f_147548_
private static final int
e
TIME_TO_DELAY_FOR_HEAD_TO_FINISH_TURNING
field_30120
RUN_TIME
f_147549_
private static final Map<VillagerProfession, ResourceLocation>
f
GIFTS
field_18984
GIFTS
f_147550_
private static final float
g
SPEED_MODIFIER
field_30121
WALK_SPEED
f_147551_
private int
h
timeUntilNextGift
field_18985
ticksLeft
f_22987_
private boolean
i
giftGivenDuringThisRun
field_18986
done
f_22988_
private long
j
timeSinceStart
field_18987
startTime
f_22989_

Constructor summary

ModifierConstructor
public (int delay)

Method summary

Modifier and TypeMethod
protected boolean
a(adw arg0, bnw arg1)
checkExtraStartConditions(ServerLevel arg0, Villager arg1)
method_19962(class_3218 arg0, class_1646 arg1)
shouldRun(ServerWorld arg0, VillagerEntity arg1)
m_6114_(C_12_ p_23004_, C_1118_ arg1)
protected void
a(adw arg0, bnw arg1, long arg2)
start(ServerLevel arg0, Villager arg1, long arg2)
method_19963(class_3218 arg0, class_1646 arg1, long arg2)
run(ServerWorld arg0, VillagerEntity arg1, long arg2)
m_6735_(C_12_ p_23007_, C_1118_ p_23008_, long arg2)
protected boolean
b(adw arg0, bnw arg1, long arg2)
canStillUse(ServerLevel arg0, Villager arg1, long arg2)
method_19965(class_3218 arg0, class_1646 arg1, long arg2)
shouldKeepRunning(ServerWorld arg0, VillagerEntity arg1, long arg2)
m_6737_(C_12_ p_23027_, C_1118_ p_23028_, long arg2)
protected void
c(adw arg0, bnw arg1, long arg2)
tick(ServerLevel arg0, Villager arg1, long arg2)
method_19967(class_3218 arg0, class_1646 arg1, long arg2)
keepRunning(ServerWorld arg0, VillagerEntity arg1, long arg2)
m_6725_(C_12_ p_23037_, C_1118_ p_23038_, long arg2)
protected void
d(adw arg0, bnw arg1, long arg2)
stop(ServerLevel arg0, Villager arg1, long arg2)
method_19968(class_3218 arg0, class_1646 arg1, long arg2)
finishRunning(ServerWorld arg0, VillagerEntity arg1, long arg2)
m_6732_(C_12_ p_23047_, C_1118_ p_23048_, long arg2)
private void
a(bnw arg0, axy arg1)
throwGift(Villager arg0, LivingEntity arg1)
method_19957(class_1646 arg0, class_1309 arg1)
giveGifts(VillagerEntity villager, LivingEntity recipient)
m_23011_(C_1118_ p_23013_, C_524_ arg1)
private List<ItemStack>
a(bnw arg0)
getItemToThrow(Villager arg0)
method_19956(class_1646 arg0)
getGifts(VillagerEntity villager)
m_23009_(C_1118_ arg0)
private boolean
b(bnw arg0)
isHeroVisible(Villager arg0)
method_19964(class_1646 arg0)
isNearestPlayerHero(VillagerEntity villager)
m_23029_(C_1118_ arg0)
private Optional<Player>
c(bnw arg0)
getNearestTargetableHero(Villager arg0)
method_19966(class_1646 arg0)
getNearestPlayerIfHero(VillagerEntity villager)
m_23039_(C_1118_ arg0)
private boolean
a(boj arg0)
isHero(Player arg0)
method_19959(class_1657 arg0)
isHero(PlayerEntity player)
m_23017_(C_1141_ arg0)
private boolean
a(bnw arg0, boj arg1)
isWithinThrowingDistance(Villager arg0, Player arg1)
method_19958(class_1646 arg0, class_1657 arg1)
isCloseEnough(VillagerEntity villager, PlayerEntity player)
m_23014_(C_1118_ p_23016_, C_1141_ arg1)
private static int
a(adw arg0)
calculateTimeUntilNextGift(ServerLevel arg0)
method_19961(class_3218 arg0)
getNextGiftDelay(ServerWorld world)
m_22993_(C_12_ p_22994_)