Class GiveGiftsToHeroTask
java.lang.Object
net.minecraft.entity.ai.brain.task.MultiTickTask<VillagerEntity>
net.minecraft.entity.ai.brain.task.GiveGiftsToHeroTask
- All Implemented Interfaces:
- Task<VillagerEntity>
- Mappings:
- Namespace - Name - named - net/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask- intermediary - net/minecraft/class_4243- official - bxq
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.MultiTickTaskMultiTickTask.Status
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final intprivate booleanprivate static final Map<VillagerProfession, RegistryKey<LootTable>> private static final intprivate static final intprivate static final intprivate longprivate intprivate static final floatFields inherited from class net.minecraft.entity.ai.brain.task.MultiTickTaskDEFAULT_RUN_TIME, requiredMemoryStates
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidfinishRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2) private static RegistryKey<LootTable> getGiftLootTable(VillagerEntity villager) private Optional<PlayerEntity> getNearestPlayerIfHero(VillagerEntity villager) private static intgetNextGiftDelay(ServerWorld world) private voidgiveGifts(ServerWorld world, VillagerEntity villager, LivingEntity recipient) private booleanisCloseEnough(VillagerEntity villager, PlayerEntity player) private booleanisHero(PlayerEntity player) private booleanisNearestPlayerHero(VillagerEntity villager) protected voidkeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2) protected voidrun(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2) protected booleanshouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2) protected booleanshouldRun(ServerWorld serverWorld, VillagerEntity villagerEntity) Methods inherited from class net.minecraft.entity.ai.brain.task.MultiTickTaskgetName, getStatus, hasRequiredMemoryState, isTimeLimitExceeded, stop, tick, tryStarting
- 
Field Details- 
MAX_DISTANCEprivate static final int MAX_DISTANCE- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - MAX_DISTANCE- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;MAX_DISTANCE:I- intermediary - field_30117- Lnet/minecraft/class_4243;field_30117:I- official - c- Lbxq;c:I
 
- 
DEFAULT_DURATIONprivate static final int DEFAULT_DURATION- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - DEFAULT_DURATION- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;DEFAULT_DURATION:I- intermediary - field_30118- Lnet/minecraft/class_4243;field_30118:I- official - d- Lbxq;d:I
 
- 
MAX_NEXT_GIFT_DELAYprivate static final int MAX_NEXT_GIFT_DELAY- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - MAX_NEXT_GIFT_DELAY- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;MAX_NEXT_GIFT_DELAY:I- intermediary - field_30119- Lnet/minecraft/class_4243;field_30119:I- official - e- Lbxq;e:I
 
- 
RUN_TIMEprivate static final int RUN_TIME- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - RUN_TIME- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;RUN_TIME:I- intermediary - field_30120- Lnet/minecraft/class_4243;field_30120:I- official - f- Lbxq;f:I
 
- 
GIFTS- Mappings:
- Namespace - Name - Mixin selector - named - GIFTS- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;GIFTS:Ljava/util/Map;- intermediary - field_18984- Lnet/minecraft/class_4243;field_18984:Ljava/util/Map;- official - g- Lbxq;g:Ljava/util/Map;
 
- 
WALK_SPEEDprivate static final float WALK_SPEED- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - WALK_SPEED- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;WALK_SPEED:F- intermediary - field_30121- Lnet/minecraft/class_4243;field_30121:F- official - h- Lbxq;h:F
 
- 
ticksLeftprivate int ticksLeft- Mappings:
- Namespace - Name - Mixin selector - named - ticksLeft- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;ticksLeft:I- intermediary - field_18985- Lnet/minecraft/class_4243;field_18985:I- official - i- Lbxq;i:I
 
- 
doneprivate boolean done- Mappings:
- Namespace - Name - Mixin selector - named - done- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;done:Z- intermediary - field_18986- Lnet/minecraft/class_4243;field_18986:Z- official - j- Lbxq;j:Z
 
- 
startTimeprivate long startTime- Mappings:
- Namespace - Name - Mixin selector - named - startTime- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;startTime:J- intermediary - field_18987- Lnet/minecraft/class_4243;field_18987:J- official - k- Lbxq;k:J
 
 
- 
- 
Constructor Details- 
GiveGiftsToHeroTaskpublic GiveGiftsToHeroTask(int delay) - Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;<init>(I)V- intermediary - <init>- Lnet/minecraft/class_4243;<init>(I)V- official - <init>- Lbxq;<init>(I)V
 
 
- 
- 
Method Details- 
shouldRun- Overrides:
- shouldRunin class- MultiTickTask<VillagerEntity>
- Mappings:
- Namespace - Name - Mixin selector - named - shouldRun- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;shouldRun(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;)Z- intermediary - method_19962- Lnet/minecraft/class_4243;method_19962(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;)Z- official - a- Lbxq;a(Lard;Lcoj;)Z
 
- 
run- Overrides:
- runin class- MultiTickTask<VillagerEntity>
- Mappings:
- Namespace - Name - Mixin selector - named - run- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;run(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)V- intermediary - method_19963- Lnet/minecraft/class_4243;method_19963(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)V- official - a- Lbxq;a(Lard;Lcoj;J)V
 
- 
shouldKeepRunningprotected boolean shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2) - Overrides:
- shouldKeepRunningin class- MultiTickTask<VillagerEntity>
- Mappings:
- Namespace - Name - Mixin selector - named - shouldKeepRunning- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;shouldKeepRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)Z- intermediary - method_19965- Lnet/minecraft/class_4243;method_19965(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)Z- official - b- Lbxq;b(Lard;Lcoj;J)Z
 
- 
keepRunning- Overrides:
- keepRunningin class- MultiTickTask<VillagerEntity>
- Mappings:
- Namespace - Name - Mixin selector - named - keepRunning- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;keepRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)V- intermediary - method_19967- Lnet/minecraft/class_4243;method_19967(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)V- official - c- Lbxq;c(Lard;Lcoj;J)V
 
- 
finishRunning- Overrides:
- finishRunningin class- MultiTickTask<VillagerEntity>
- Mappings:
- Namespace - Name - Mixin selector - named - finishRunning- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;finishRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)V- intermediary - method_19968- Lnet/minecraft/class_4243;method_19968(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)V- official - d- Lbxq;d(Lard;Lcoj;J)V
 
- 
giveGifts- Mappings:
- Namespace - Name - Mixin selector - named - giveGifts- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;giveGifts(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;Lnet/minecraft/entity/LivingEntity;)V- intermediary - method_19957- Lnet/minecraft/class_4243;method_19957(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;Lnet/minecraft/class_1309;)V- official - a- Lbxq;a(Lard;Lcoj;Lbvi;)V
 
- 
getGiftLootTable- Mappings:
- Namespace - Name - Mixin selector - named - getGiftLootTable- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;getGiftLootTable(Lnet/minecraft/entity/passive/VillagerEntity;)Lnet/minecraft/registry/RegistryKey;- intermediary - method_64173- Lnet/minecraft/class_4243;method_64173(Lnet/minecraft/class_1646;)Lnet/minecraft/class_5321;- official - a- Lbxq;a(Lcoj;)Laku;
 
- 
isNearestPlayerHero- Mappings:
- Namespace - Name - Mixin selector - named - isNearestPlayerHero- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;isNearestPlayerHero(Lnet/minecraft/entity/passive/VillagerEntity;)Z- intermediary - method_19964- Lnet/minecraft/class_4243;method_19964(Lnet/minecraft/class_1646;)Z- official - b- Lbxq;b(Lcoj;)Z
 
- 
getNearestPlayerIfHero- Mappings:
- Namespace - Name - Mixin selector - named - getNearestPlayerIfHero- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;getNearestPlayerIfHero(Lnet/minecraft/entity/passive/VillagerEntity;)Ljava/util/Optional;- intermediary - method_19966- Lnet/minecraft/class_4243;method_19966(Lnet/minecraft/class_1646;)Ljava/util/Optional;- official - c- Lbxq;c(Lcoj;)Ljava/util/Optional;
 
- 
isHero- Mappings:
- Namespace - Name - Mixin selector - named - isHero- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;isHero(Lnet/minecraft/entity/player/PlayerEntity;)Z- intermediary - method_19959- Lnet/minecraft/class_4243;method_19959(Lnet/minecraft/class_1657;)Z- official - a- Lbxq;a(Lcoy;)Z
 
- 
isCloseEnough- Mappings:
- Namespace - Name - Mixin selector - named - isCloseEnough- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;isCloseEnough(Lnet/minecraft/entity/passive/VillagerEntity;Lnet/minecraft/entity/player/PlayerEntity;)Z- intermediary - method_19958- Lnet/minecraft/class_4243;method_19958(Lnet/minecraft/class_1646;Lnet/minecraft/class_1657;)Z- official - a- Lbxq;a(Lcoj;Lcoy;)Z
 
- 
getNextGiftDelay- Mappings:
- Namespace - Name - Mixin selector - named - getNextGiftDelay- Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;getNextGiftDelay(Lnet/minecraft/server/world/ServerWorld;)I- intermediary - method_19961- Lnet/minecraft/class_4243;method_19961(Lnet/minecraft/class_3218;)I- official - a- Lbxq;a(Lard;)I
 
 
-