Class SwitchVillagerJobTask
- java.lang.Object
-
- net.minecraft.entity.ai.brain.task.Task<VillagerEntity>
-
- net.minecraft.entity.ai.brain.task.SwitchVillagerJobTask
-
public class SwitchVillagerJobTask extends Task<VillagerEntity>
-
-
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 (package private) VillagerProfessionprofession-
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
entryCondition
-
-
Constructor Summary
Constructors Constructor Description SwitchVillagerJobTask(VillagerProfession p_i231525_1_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleancompetesForSameJobsite(GlobalPos p_233934_1_, PointOfInterestType p_233934_2_, VillagerEntity p_233934_3_)private booleanhasJobSite(VillagerEntity p_233931_1_)private booleanhasMatchingProfession(PointOfInterestType p_233930_1_, VillagerProfession p_233930_2_)private static VillagerEntityselectWinner(VillagerEntity p_233932_0_, VillagerEntity p_233932_1_)protected voidstart(ServerWorld p_212831_1_, VillagerEntity p_212831_2_, long p_212831_3_)-
Methods inherited from class net.minecraft.entity.ai.brain.task.Task
canStillUse, checkExtraStartConditions, doStop, getStatus, stop, tick, tickOrStop, timedOut, toString, tryStart
-
-
-
-
Field Detail
-
profession
final VillagerProfession profession
-
-
Constructor Detail
-
SwitchVillagerJobTask
public SwitchVillagerJobTask(VillagerProfession p_i231525_1_)
-
-
Method Detail
-
start
protected void start(ServerWorld p_212831_1_, VillagerEntity p_212831_2_, long p_212831_3_)
- Overrides:
startin classTask<VillagerEntity>
-
selectWinner
private static VillagerEntity selectWinner(VillagerEntity p_233932_0_, VillagerEntity p_233932_1_)
-
competesForSameJobsite
private boolean competesForSameJobsite(GlobalPos p_233934_1_, PointOfInterestType p_233934_2_, VillagerEntity p_233934_3_)
-
hasMatchingProfession
private boolean hasMatchingProfession(PointOfInterestType p_233930_1_, VillagerProfession p_233930_2_)
-
hasJobSite
private boolean hasJobSite(VillagerEntity p_233931_1_)
-
-