net.minecraft.world.entity.ai.behavior

public class GiveGiftToHero

extends Behavior<Villager>

All mapped superinterfaces:

BehaviorControl

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

Field summary

Modifier and TypeField
private static final int
c
THROW_GIFT_AT_DISTANCE
field_30117
MAX_DISTANCE
private static final int
d
MIN_TIME_BETWEEN_GIFTS
field_30118
DEFAULT_DURATION
private static final int
e
MAX_TIME_BETWEEN_GIFTS
field_30119
MAX_NEXT_GIFT_DELAY
private static final int
f
TIME_TO_DELAY_FOR_HEAD_TO_FINISH_TURNING
field_30120
RUN_TIME
private static final Map<VillagerProfession, ResourceKey<LootTable>>
g
GIFTS
field_18984
GIFTS
private static final float
h
SPEED_MODIFIER
field_30121
WALK_SPEED
private int
i
timeUntilNextGift
field_18985
ticksLeft
private boolean
j
giftGivenDuringThisRun
field_18986
done
private long
k
timeSinceStart
field_18987
startTime

Constructor summary

ModifierConstructor
public (int delay)

Method summary

Modifier and TypeMethod
protected boolean
a(ash arg0, cpj arg1)
checkExtraStartConditions(ServerLevel arg0, Villager arg1)
method_19962(class_3218 arg0, class_1646 arg1)
shouldRun(ServerWorld arg0, VillagerEntity arg1)
protected void
a(ash arg0, cpj 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)
protected boolean
b(ash arg0, cpj 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)
protected void
c(ash arg0, cpj 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)
protected void
d(ash arg0, cpj 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)
private void
a(ash arg0, cpj arg1, bwg arg2)
throwGift(ServerLevel arg0, Villager arg1, LivingEntity arg2)
method_19957(class_3218 arg0, class_1646 arg1, class_1309 arg2)
giveGifts(ServerWorld world, VillagerEntity villager, LivingEntity recipient)
private static ResourceKey<LootTable>
a(cpj arg0)
getLootTableToThrow(Villager arg0)
method_64173(class_1646 arg0)
getGiftLootTable(VillagerEntity villager)
private boolean
b(cpj arg0)
isHeroVisible(Villager arg0)
method_19964(class_1646 arg0)
isNearestPlayerHero(VillagerEntity villager)
private Optional<Player>
c(cpj arg0)
getNearestTargetableHero(Villager arg0)
method_19966(class_1646 arg0)
getNearestPlayerIfHero(VillagerEntity villager)
private boolean
a(cpx arg0)
isHero(Player arg0)
method_19959(class_1657 arg0)
isHero(PlayerEntity player)
private boolean
a(cpj arg0, cpx arg1)
isWithinThrowingDistance(Villager arg0, Player arg1)
method_19958(class_1646 arg0, class_1657 arg1)
isCloseEnough(VillagerEntity villager, PlayerEntity player)
private static int
a(ash arg0)
calculateTimeUntilNextGift(ServerLevel arg0)
method_19961(class_3218 arg0)
getNextGiftDelay(ServerWorld world)