Class HarvestFarmland
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<Villager>
net.minecraft.world.entity.ai.behavior.HarvestFarmland
- All Implemented Interfaces:
BehaviorControl<Villager>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BlockPosprivate static final intprivate longstatic final floatprivate intFields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanStillUse(ServerLevel level, Villager entity, long gameTime) protected booleancheckExtraStartConditions(ServerLevel level, Villager owner) private BlockPosgetValidFarmland(ServerLevel serverLevel) protected voidstart(ServerLevel level, Villager entity, long gameTime) protected voidstop(ServerLevel level, Villager entity, long gameTime) protected voidtick(ServerLevel level, Villager owner, long gameTime) private booleanvalidPos(BlockPos pos, ServerLevel serverLevel) Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
debugString, doStop, getStatus, hasRequiredMemories, tickOrStop, timedOut, tryStart
-
Field Details
-
HARVEST_DURATION
private static final int HARVEST_DURATION- See Also:
-
SPEED_MODIFIER
public static final float SPEED_MODIFIER- See Also:
-
aboveFarmlandPos
-
nextOkStartTime
private long nextOkStartTime -
timeWorkedSoFar
private int timeWorkedSoFar -
validFarmlandAroundVillager
-
-
Constructor Details
-
HarvestFarmland
public HarvestFarmland()
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditionsin classBehavior<Villager>
-
getValidFarmland
-
validPos
-
start
-
stop
-
tick
-
canStillUse
- Overrides:
canStillUsein classBehavior<Villager>
-