Package com.pixelmonmod.pixelmon.ai
Class HarvestFarmLandGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.MoveToBlockGoal
com.pixelmonmod.pixelmon.ai.HarvestFarmLandGoal
public class HarvestFarmLandGoal
extends net.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.Goal.Flag
-
Field Summary
Fields inherited from class net.minecraft.world.entity.ai.goal.MoveToBlockGoal
blockPos, mob, nextStartTick, speedModifier, tryTicks, verticalSearchStart
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether an in-progress EntityAIBase should continue executingboolean
canUse()
Returns whether the EntityAIBase should begin execution.protected boolean
isValidTarget
(net.minecraft.world.level.LevelReader worldIn, net.minecraft.core.BlockPos pos) Return true to set given position as destinationvoid
start()
Execute a one shot task or start executing a continuous taskvoid
stop()
Resets the taskvoid
tick()
Updates the taskMethods inherited from class net.minecraft.world.entity.ai.goal.MoveToBlockGoal
acceptedDistance, findNearestBlock, getMoveToTarget, isReachedTarget, moveMobToBlock, nextStartTick, requiresUpdateEveryTick, shouldRecalculatePath
Methods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, setFlags, toString
-
Constructor Details
-
HarvestFarmLandGoal
-
-
Method Details
-
canUse
public boolean canUse()Returns whether the EntityAIBase should begin execution.- Overrides:
canUse
in classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
canContinueToUse
public boolean canContinueToUse()Returns whether an in-progress EntityAIBase should continue executing- Overrides:
canContinueToUse
in classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
start
public void start()Execute a one shot task or start executing a continuous task- Overrides:
start
in classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
stop
public void stop()Resets the task- Overrides:
stop
in classnet.minecraft.world.entity.ai.goal.Goal
-
tick
public void tick()Updates the task- Overrides:
tick
in classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
isValidTarget
protected boolean isValidTarget(net.minecraft.world.level.LevelReader worldIn, net.minecraft.core.BlockPos pos) Return true to set given position as destination- Specified by:
isValidTarget
in classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-