Class GiveGiftToHero
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<Villager>
net.minecraft.world.entity.ai.behavior.GiveGiftToHero
- All Implemented Interfaces:
- BehaviorControl<Villager>
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.BehaviorBehavior.Status
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate booleanprivate static final Map<VillagerProfession, ResourceKey<LootTable>> Deprecated.private static final intprivate static final intprivate static final floatprivate static final intprivate static final intprivate longprivate intFields inherited from class net.minecraft.world.entity.ai.behavior.BehaviorDEFAULT_DURATION, entryCondition
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate static intcalculateTimeUntilNextGift(ServerLevel p_22994_) protected booleancanStillUse(ServerLevel p_23026_, Villager p_23027_, long p_23028_) protected booleancheckExtraStartConditions(ServerLevel p_23003_, Villager p_23004_) getItemToThrow(Villager p_23010_) getNearestTargetableHero(Villager p_23040_) private booleanprivate booleanisHeroVisible(Villager p_23030_) private booleanisWithinThrowingDistance(Villager p_23015_, Player p_23016_) protected voidstart(ServerLevel p_23006_, Villager p_23007_, long p_23008_) protected voidstop(ServerLevel p_23046_, Villager p_23047_, long p_23048_) private voidthrowGift(Villager p_23012_, LivingEntity p_23013_) protected voidtick(ServerLevel p_23036_, Villager p_23037_, long p_23038_) Methods inherited from class net.minecraft.world.entity.ai.behavior.BehaviordebugString, doStop, getStatus, hasRequiredMemories, tickOrStop, timedOut, tryStart
- 
Field Details- 
THROW_GIFT_AT_DISTANCEprivate static final int THROW_GIFT_AT_DISTANCE- See Also:
 
- 
MIN_TIME_BETWEEN_GIFTSprivate static final int MIN_TIME_BETWEEN_GIFTS- See Also:
 
- 
MAX_TIME_BETWEEN_GIFTSprivate static final int MAX_TIME_BETWEEN_GIFTS- See Also:
 
- 
TIME_TO_DELAY_FOR_HEAD_TO_FINISH_TURNINGprivate static final int TIME_TO_DELAY_FOR_HEAD_TO_FINISH_TURNING- See Also:
 
- 
GIFTSDeprecated.Neo: use thedata mapinstead
- 
SPEED_MODIFIERprivate static final float SPEED_MODIFIER- See Also:
 
- 
timeUntilNextGiftprivate int timeUntilNextGift
- 
giftGivenDuringThisRunprivate boolean giftGivenDuringThisRun
- 
timeSinceStartprivate long timeSinceStart
 
- 
- 
Constructor Details- 
GiveGiftToHeropublic GiveGiftToHero(int p_22992_) 
 
- 
- 
Method Details- 
checkExtraStartConditions- Overrides:
- checkExtraStartConditionsin class- Behavior<Villager>
 
- 
start
- 
canStillUse- Overrides:
- canStillUsein class- Behavior<Villager>
 
- 
tick
- 
stop
- 
throwGift
- 
getItemToThrow
- 
isHeroVisible
- 
getNearestTargetableHero
- 
isHero
- 
isWithinThrowingDistance
- 
calculateTimeUntilNextGift
 
- 
data mapinstead