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 pLevel, Villager pEntity, long pGameTime) protected booleancheckExtraStartConditions(ServerLevel pLevel, Villager pOwner) private BlockPosgetValidFarmland(ServerLevel pServerLevel) protected voidstart(ServerLevel pLevel, Villager pEntity, long pGameTime) protected voidstop(ServerLevel pLevel, Villager pEntity, long pGameTime) protected voidtick(ServerLevel pLevel, Villager pOwner, long pGameTime) private booleanvalidPos(BlockPos pPos, ServerLevel pServerLevel) 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>
-