Class GiveGiftsToHeroTask
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<VillagerEntity>
net.minecraft.entity.ai.brain.task.GiveGiftsToHeroTask
public class GiveGiftsToHeroTask extends Task<VillagerEntity>
- Mappings:
Namespace Name official atf
intermediary net/minecraft/class_4243
named net/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status
-
Field Summary
Fields Modifier and Type Field Description private boolean
done
private static Map<VillagerProfession,Identifier>
GIFTS
private long
startTime
private int
ticksLeft
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
requiredMemoryStates
-
Constructor Summary
Constructors Constructor Description GiveGiftsToHeroTask(int delay)
-
Method Summary
Modifier and Type Method Description protected void
finishRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
private List<ItemStack>
getGifts(VillagerEntity villager)
private Optional<PlayerEntity>
getNearestPlayerIfHero(VillagerEntity villager)
private static int
getNextGiftDelay(ServerWorld world)
private void
giveGifts(VillagerEntity villager, LivingEntity recipient)
private boolean
isCloseEnough(VillagerEntity villager, PlayerEntity player)
private boolean
isHero(PlayerEntity player)
private boolean
isNearestPlayerHero(VillagerEntity villager)
protected void
keepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
protected void
run(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
protected boolean
shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
protected boolean
shouldRun(ServerWorld serverWorld, VillagerEntity villagerEntity)
Methods inherited from class net.minecraft.entity.ai.brain.task.Task
getStatus, isTimeLimitExceeded, stop, tick, toString, tryStarting
-
Field Details
-
GIFTS
- Mappings:
Namespace Name Mixin selector official b
Latf;b:Ljava/util/Map;
intermediary field_18984
Lnet/minecraft/class_4243;field_18984:Ljava/util/Map;
named GIFTS
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;GIFTS:Ljava/util/Map;
-
ticksLeft
private int ticksLeft- Mappings:
Namespace Name Mixin selector official c
Latf;c:I
intermediary field_18985
Lnet/minecraft/class_4243;field_18985:I
named ticksLeft
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;ticksLeft:I
-
done
private boolean done- Mappings:
Namespace Name Mixin selector official d
Latf;d:Z
intermediary field_18986
Lnet/minecraft/class_4243;field_18986:Z
named done
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;done:Z
-
startTime
private long startTime- Mappings:
Namespace Name Mixin selector official e
Latf;e:J
intermediary field_18987
Lnet/minecraft/class_4243;field_18987:J
named startTime
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;startTime:J
-
-
Constructor Details
-
GiveGiftsToHeroTask
public GiveGiftsToHeroTask(int delay)- Mappings:
Namespace Name Mixin selector official <init>
Latf;<init>(I)V
intermediary <init>
Lnet/minecraft/class_4243;<init>(I)V
named <init>
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;<init>(I)V
-
-
Method Details
-
shouldRun
- Overrides:
shouldRun
in classTask<VillagerEntity>
- Mappings:
Namespace Name Mixin selector official a
Latf;a(Laav;Lbgy;)Z
intermediary method_19962
Lnet/minecraft/class_4243;method_19962(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;)Z
named shouldRun
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;shouldRun(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;)Z
-
run
- Overrides:
run
in classTask<VillagerEntity>
- Mappings:
Namespace Name Mixin selector official a
Latf;a(Laav;Lbgy;J)V
intermediary method_19963
Lnet/minecraft/class_4243;method_19963(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)V
named run
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;run(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)V
-
shouldKeepRunning
protected boolean shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)- Overrides:
shouldKeepRunning
in classTask<VillagerEntity>
- Mappings:
Namespace Name Mixin selector official b
Latf;b(Laav;Lbgy;J)Z
intermediary method_19965
Lnet/minecraft/class_4243;method_19965(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)Z
named shouldKeepRunning
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;shouldKeepRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)Z
-
keepRunning
- Overrides:
keepRunning
in classTask<VillagerEntity>
- Mappings:
Namespace Name Mixin selector official c
Latf;c(Laav;Lbgy;J)V
intermediary method_19967
Lnet/minecraft/class_4243;method_19967(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)V
named keepRunning
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;keepRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)V
-
finishRunning
- Overrides:
finishRunning
in classTask<VillagerEntity>
- Mappings:
Namespace Name Mixin selector official d
Latf;d(Laav;Lbgy;J)V
intermediary method_19968
Lnet/minecraft/class_4243;method_19968(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)V
named finishRunning
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;finishRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)V
-
giveGifts
- Mappings:
Namespace Name Mixin selector official a
Latf;a(Lbgy;Lari;)V
intermediary method_19957
Lnet/minecraft/class_4243;method_19957(Lnet/minecraft/class_1646;Lnet/minecraft/class_1309;)V
named giveGifts
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;giveGifts(Lnet/minecraft/entity/passive/VillagerEntity;Lnet/minecraft/entity/LivingEntity;)V
-
getGifts
- Mappings:
Namespace Name Mixin selector official a
Latf;a(Lbgy;)Ljava/util/List;
intermediary method_19956
Lnet/minecraft/class_4243;method_19956(Lnet/minecraft/class_1646;)Ljava/util/List;
named getGifts
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;getGifts(Lnet/minecraft/entity/passive/VillagerEntity;)Ljava/util/List;
-
isNearestPlayerHero
- Mappings:
Namespace Name Mixin selector official b
Latf;b(Lbgy;)Z
intermediary method_19964
Lnet/minecraft/class_4243;method_19964(Lnet/minecraft/class_1646;)Z
named isNearestPlayerHero
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;isNearestPlayerHero(Lnet/minecraft/entity/passive/VillagerEntity;)Z
-
getNearestPlayerIfHero
- Mappings:
Namespace Name Mixin selector official c
Latf;c(Lbgy;)Ljava/util/Optional;
intermediary method_19966
Lnet/minecraft/class_4243;method_19966(Lnet/minecraft/class_1646;)Ljava/util/Optional;
named getNearestPlayerIfHero
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;getNearestPlayerIfHero(Lnet/minecraft/entity/passive/VillagerEntity;)Ljava/util/Optional;
-
isHero
- Mappings:
Namespace Name Mixin selector official a
Latf;a(Lbhl;)Z
intermediary method_19959
Lnet/minecraft/class_4243;method_19959(Lnet/minecraft/class_1657;)Z
named isHero
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;isHero(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
isCloseEnough
- Mappings:
Namespace Name Mixin selector official a
Latf;a(Lbgy;Lbhl;)Z
intermediary method_19958
Lnet/minecraft/class_4243;method_19958(Lnet/minecraft/class_1646;Lnet/minecraft/class_1657;)Z
named isCloseEnough
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;isCloseEnough(Lnet/minecraft/entity/passive/VillagerEntity;Lnet/minecraft/entity/player/PlayerEntity;)Z
-
getNextGiftDelay
- Mappings:
Namespace Name Mixin selector official a
Latf;a(Laav;)I
intermediary method_19961
Lnet/minecraft/class_4243;method_19961(Lnet/minecraft/class_3218;)I
named getNextGiftDelay
Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;getNextGiftDelay(Lnet/minecraft/server/world/ServerWorld;)I
-