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 Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status - 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate static final Map<VillagerProfession,ResourceLocation> 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.Behavior
DEFAULT_DURATION, entryCondition - 
Constructor Summary
Constructors - 
Method Summary
Modifier 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.Behavior
debugString, doStop, getStatus, hasRequiredMemories, tickOrStop, timedOut, tryStart 
- 
Field Details
- 
THROW_GIFT_AT_DISTANCE
private static final int THROW_GIFT_AT_DISTANCE- See Also:
 
 - 
MIN_TIME_BETWEEN_GIFTS
private static final int MIN_TIME_BETWEEN_GIFTS- See Also:
 
 - 
MAX_TIME_BETWEEN_GIFTS
private static final int MAX_TIME_BETWEEN_GIFTS- See Also:
 
 - 
TIME_TO_DELAY_FOR_HEAD_TO_FINISH_TURNING
private static final int TIME_TO_DELAY_FOR_HEAD_TO_FINISH_TURNING- See Also:
 
 - 
GIFTS
Deprecated.Neo: use thedata mapinstead - 
SPEED_MODIFIER
private static final float SPEED_MODIFIER- See Also:
 
 - 
timeUntilNextGift
private int timeUntilNextGift - 
giftGivenDuringThisRun
private boolean giftGivenDuringThisRun - 
timeSinceStart
private long timeSinceStart 
 - 
 - 
Constructor Details
- 
GiveGiftToHero
public GiveGiftToHero(int p_22992_)  
 - 
 - 
Method Details
- 
checkExtraStartConditions
- Overrides:
 checkExtraStartConditionsin classBehavior<Villager>
 - 
start
 - 
canStillUse
- Overrides:
 canStillUsein classBehavior<Villager>
 - 
tick
 - 
stop
 - 
throwGift
 - 
getItemToThrow
 - 
isHeroVisible
 - 
getNearestTargetableHero
 - 
isHero
 - 
isWithinThrowingDistance
 - 
calculateTimeUntilNextGift
 
 - 
 
data mapinstead