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/GiveGiftsToHeroTaskintermediary net/minecraft/class_4243official cal
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.MultiTickTask
MultiTickTask.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate booleanprivate static final Map<RegistryKey<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.MultiTickTask
DEFAULT_RUN_TIME, requiredMemoryStates -
Constructor Summary
Constructors -
Method Summary
Modifier 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.MultiTickTask
getName, getStatus, hasRequiredMemoryState, isTimeLimitExceeded, stop, tick, tryStarting
-
Field Details
-
MAX_DISTANCE
private static final int MAX_DISTANCE- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_DISTANCELnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;MAX_DISTANCE:Iintermediary field_30117Lnet/minecraft/class_4243;field_30117:Iofficial cLcal;c:I
-
DEFAULT_DURATION
private static final int DEFAULT_DURATION- See Also:
- Mappings:
Namespace Name Mixin selector named DEFAULT_DURATIONLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;DEFAULT_DURATION:Iintermediary field_30118Lnet/minecraft/class_4243;field_30118:Iofficial dLcal;d:I
-
MAX_NEXT_GIFT_DELAY
private static final int MAX_NEXT_GIFT_DELAY- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_NEXT_GIFT_DELAYLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;MAX_NEXT_GIFT_DELAY:Iintermediary field_30119Lnet/minecraft/class_4243;field_30119:Iofficial eLcal;e:I
-
RUN_TIME
private static final int RUN_TIME- See Also:
- Mappings:
Namespace Name Mixin selector named RUN_TIMELnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;RUN_TIME:Iintermediary field_30120Lnet/minecraft/class_4243;field_30120:Iofficial fLcal;f:I
-
GIFTS
- Mappings:
Namespace Name Mixin selector named GIFTSLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;GIFTS:Ljava/util/Map;intermediary field_18984Lnet/minecraft/class_4243;field_18984:Ljava/util/Map;official gLcal;g:Ljava/util/Map;
-
WALK_SPEED
private static final float WALK_SPEED- See Also:
- Mappings:
Namespace Name Mixin selector named WALK_SPEEDLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;WALK_SPEED:Fintermediary field_30121Lnet/minecraft/class_4243;field_30121:Fofficial hLcal;h:F
-
ticksLeft
private int ticksLeft- Mappings:
Namespace Name Mixin selector named ticksLeftLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;ticksLeft:Iintermediary field_18985Lnet/minecraft/class_4243;field_18985:Iofficial iLcal;i:I
-
done
private boolean done- Mappings:
Namespace Name Mixin selector named doneLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;done:Zintermediary field_18986Lnet/minecraft/class_4243;field_18986:Zofficial jLcal;j:Z
-
startTime
private long startTime- Mappings:
Namespace Name Mixin selector named startTimeLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;startTime:Jintermediary field_18987Lnet/minecraft/class_4243;field_18987:Jofficial kLcal;k:J
-
-
Constructor Details
-
GiveGiftsToHeroTask
public GiveGiftsToHeroTask(int delay) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;<init>(I)Vintermediary <init>Lnet/minecraft/class_4243;<init>(I)Vofficial <init>Lcal;<init>(I)V
-
-
Method Details
-
shouldRun
- Overrides:
shouldRunin classMultiTickTask<VillagerEntity>- Mappings:
Namespace Name Mixin selector named shouldRunLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;shouldRun(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;)Zintermediary method_19962Lnet/minecraft/class_4243;method_19962(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;)Zofficial aLcal;a(Lasb;Lcru;)Z
-
run
- Overrides:
runin classMultiTickTask<VillagerEntity>- Mappings:
Namespace Name Mixin selector named runLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;run(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)Vintermediary method_19963Lnet/minecraft/class_4243;method_19963(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)Vofficial aLcal;a(Lasb;Lcru;J)V
-
shouldKeepRunning
protected boolean shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2) - Overrides:
shouldKeepRunningin classMultiTickTask<VillagerEntity>- Mappings:
Namespace Name Mixin selector named shouldKeepRunningLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;shouldKeepRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)Zintermediary method_19965Lnet/minecraft/class_4243;method_19965(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)Zofficial bLcal;b(Lasb;Lcru;J)Z
-
keepRunning
- Overrides:
keepRunningin classMultiTickTask<VillagerEntity>- Mappings:
Namespace Name Mixin selector named keepRunningLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;keepRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)Vintermediary method_19967Lnet/minecraft/class_4243;method_19967(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)Vofficial cLcal;c(Lasb;Lcru;J)V
-
finishRunning
- Overrides:
finishRunningin classMultiTickTask<VillagerEntity>- Mappings:
Namespace Name Mixin selector named finishRunningLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;finishRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)Vintermediary method_19968Lnet/minecraft/class_4243;method_19968(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)Vofficial dLcal;d(Lasb;Lcru;J)V
-
giveGifts
- Mappings:
Namespace Name Mixin selector named giveGiftsLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;giveGifts(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;Lnet/minecraft/entity/LivingEntity;)Vintermediary method_19957Lnet/minecraft/class_4243;method_19957(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;Lnet/minecraft/class_1309;)Vofficial aLcal;a(Lasb;Lcru;Lbyf;)V
-
getGiftLootTable
- Mappings:
Namespace Name Mixin selector named getGiftLootTableLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;getGiftLootTable(Lnet/minecraft/entity/passive/VillagerEntity;)Lnet/minecraft/registry/RegistryKey;intermediary method_64173Lnet/minecraft/class_4243;method_64173(Lnet/minecraft/class_1646;)Lnet/minecraft/class_5321;official aLcal;a(Lcru;)Lalq;
-
isNearestPlayerHero
- Mappings:
Namespace Name Mixin selector named isNearestPlayerHeroLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;isNearestPlayerHero(Lnet/minecraft/entity/passive/VillagerEntity;)Zintermediary method_19964Lnet/minecraft/class_4243;method_19964(Lnet/minecraft/class_1646;)Zofficial bLcal;b(Lcru;)Z
-
getNearestPlayerIfHero
- Mappings:
Namespace Name Mixin selector named getNearestPlayerIfHeroLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;getNearestPlayerIfHero(Lnet/minecraft/entity/passive/VillagerEntity;)Ljava/util/Optional;intermediary method_19966Lnet/minecraft/class_4243;method_19966(Lnet/minecraft/class_1646;)Ljava/util/Optional;official cLcal;c(Lcru;)Ljava/util/Optional;
-
isHero
- Mappings:
Namespace Name Mixin selector named isHeroLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;isHero(Lnet/minecraft/entity/player/PlayerEntity;)Zintermediary method_19959Lnet/minecraft/class_4243;method_19959(Lnet/minecraft/class_1657;)Zofficial aLcal;a(Lcsi;)Z
-
isCloseEnough
- Mappings:
Namespace Name Mixin selector named isCloseEnoughLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;isCloseEnough(Lnet/minecraft/entity/passive/VillagerEntity;Lnet/minecraft/entity/player/PlayerEntity;)Zintermediary method_19958Lnet/minecraft/class_4243;method_19958(Lnet/minecraft/class_1646;Lnet/minecraft/class_1657;)Zofficial aLcal;a(Lcru;Lcsi;)Z
-
getNextGiftDelay
- Mappings:
Namespace Name Mixin selector named getNextGiftDelayLnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;getNextGiftDelay(Lnet/minecraft/server/world/ServerWorld;)Iintermediary method_19961Lnet/minecraft/class_4243;method_19961(Lnet/minecraft/class_3218;)Iofficial aLcal;a(Lasb;)I
-