Class GiveHeroGiftsTask
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<VillagerEntity>
net.minecraft.entity.ai.brain.task.GiveHeroGiftsTask
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate static final Map<VillagerProfession,ResourceLocation> private longprivate intFields inherited from class net.minecraft.entity.ai.brain.task.Task
entryCondition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcalculateTimeUntilNextGift(ServerWorld p_220397_0_) protected booleancanStillUse(ServerWorld p_212834_1_, VillagerEntity p_212834_2_, long p_212834_3_) protected booleancheckExtraStartConditions(ServerWorld p_212832_1_, VillagerEntity p_212832_2_) getItemToThrow(VillagerEntity p_220399_1_) private Optional<PlayerEntity>getNearestTargetableHero(VillagerEntity p_220400_1_) private booleanisHero(PlayerEntity p_220402_1_) private booleanisHeroVisible(VillagerEntity p_220396_1_) private booleanisWithinThrowingDistance(VillagerEntity p_220401_1_, PlayerEntity p_220401_2_) protected voidstart(ServerWorld p_212831_1_, VillagerEntity p_212831_2_, long p_212831_3_) protected voidstop(ServerWorld p_212835_1_, VillagerEntity p_212835_2_, long p_212835_3_) private voidthrowGift(VillagerEntity p_220398_1_, LivingEntity p_220398_2_) protected voidtick(ServerWorld p_212833_1_, VillagerEntity p_212833_2_, long p_212833_3_)
-
Field Details
-
gifts
-
timeUntilNextGift
private int timeUntilNextGift -
giftGivenDuringThisRun
private boolean giftGivenDuringThisRun -
timeSinceStart
private long timeSinceStart
-
-
Constructor Details
-
GiveHeroGiftsTask
public GiveHeroGiftsTask(int p_i50366_1_)
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditionsin classTask<VillagerEntity>
-
start
- Overrides:
startin classTask<VillagerEntity>
-
canStillUse
protected boolean canStillUse(ServerWorld p_212834_1_, VillagerEntity p_212834_2_, long p_212834_3_) - Overrides:
canStillUsein classTask<VillagerEntity>
-
tick
- Overrides:
tickin classTask<VillagerEntity>
-
stop
- Overrides:
stopin classTask<VillagerEntity>
-
throwGift
-
getItemToThrow
-
isHeroVisible
-
getNearestTargetableHero
-
isHero
-
isWithinThrowingDistance
-
calculateTimeUntilNextGift
-