Class UseBonemeal
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<Villager>
net.minecraft.world.entity.ai.behavior.UseBonemeal
- 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 static final int
private long
private long
private int
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse
(ServerLevel level, Villager entity, long gameTime) protected boolean
checkExtraStartConditions
(ServerLevel level, Villager owner) pickNextTarget
(ServerLevel level, Villager villager) private void
setCurrentCropAsTarget
(Villager villager) protected void
start
(ServerLevel level, Villager entity, long gameTime) protected void
stop
(ServerLevel level, Villager entity, long gameTime) protected void
tick
(ServerLevel level, Villager owner, long gameTime) private boolean
validPos
(BlockPos pos, ServerLevel level) Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
debugString, doStop, getStatus, hasRequiredMemories, tickOrStop, timedOut, tryStart
-
Field Details
-
BONEMEALING_DURATION
private static final int BONEMEALING_DURATION- See Also:
-
nextWorkCycleTime
private long nextWorkCycleTime -
lastBonemealingSession
private long lastBonemealingSession -
timeWorkedSoFar
private int timeWorkedSoFar -
cropPos
-
-
Constructor Details
-
UseBonemeal
public UseBonemeal()
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classBehavior<Villager>
-
canStillUse
- Overrides:
canStillUse
in classBehavior<Villager>
-
pickNextTarget
-
validPos
-
start
-
setCurrentCropAsTarget
-
stop
-
tick
-