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 Behavior
Behavior.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable BlockPosprivate static final intprivate longstatic final floatprivate intFields inherited from class Behavior
DEFAULT_DURATION, entryCondition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanStillUse(ServerLevel level, Villager body, long timestamp) protected booleancheckExtraStartConditions(ServerLevel level, Villager body) private @Nullable BlockPosgetValidFarmland(ServerLevel level) protected voidstart(ServerLevel level, Villager body, long timestamp) protected voidstop(ServerLevel level, Villager body, long timestamp) protected voidtick(ServerLevel level, Villager body, long timestamp) private booleanvalidPos(BlockPos blockPos, ServerLevel level) Methods inherited from class Behavior
debugString, doStop, getRequiredMemories, 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>
-