Class CollectBerriesGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.MoveToBlockGoal
com.idark.valoria.registries.entity.ai.goals.CollectBerriesGoal
public class CollectBerriesGoal
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
ConstructorDescriptionCollectBerriesGoal
(net.minecraft.world.entity.PathfinderMob pMob, double pSpeedModifier, int pSearchRange, int pVerticalSearchRange) -
Method Summary
Modifier and TypeMethodDescriptiondouble
boolean
canUse()
protected boolean
isValidTarget
(net.minecraft.world.level.LevelReader pLevel, @NotNull net.minecraft.core.BlockPos pPos) protected void
boolean
void
start()
void
tick()
Methods inherited from class net.minecraft.world.entity.ai.goal.MoveToBlockGoal
canContinueToUse, findNearestBlock, getMoveToTarget, isReachedTarget, moveMobToBlock, nextStartTick, requiresUpdateEveryTick
Methods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, setFlags, stop, toString
-
Field Details
-
ticksWaited
protected int ticksWaited
-
-
Constructor Details
-
CollectBerriesGoal
public CollectBerriesGoal(net.minecraft.world.entity.PathfinderMob pMob, double pSpeedModifier, int pSearchRange, int pVerticalSearchRange)
-
-
Method Details
-
acceptedDistance
public double acceptedDistance()- Overrides:
acceptedDistance
in classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
shouldRecalculatePath
public boolean shouldRecalculatePath()- Overrides:
shouldRecalculatePath
in classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
isValidTarget
protected boolean isValidTarget(net.minecraft.world.level.LevelReader pLevel, @NotNull @NotNull net.minecraft.core.BlockPos pPos) - Specified by:
isValidTarget
in classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
tick
public void tick()- Overrides:
tick
in classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
onReachedTarget
protected void onReachedTarget() -
canUse
public boolean canUse()- Overrides:
canUse
in classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
start
public void start()- Overrides:
start
in classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-