Class Rabbit.RaidGardenGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.MoveToBlockGoal
net.minecraft.world.entity.animal.Rabbit.RaidGardenGoal
- Enclosing class:
Rabbit
-
Nested Class Summary
-
Field Summary
FieldsFields inherited from class net.minecraft.world.entity.ai.goal.MoveToBlockGoal
blockPos, mob, nextStartTick, speedModifier, tryTicks, verticalSearchStart
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
canUse()
protected boolean
isValidTarget
(LevelReader pLevel, BlockPos pPos) Returntrue
to set given position as destinationvoid
tick()
Methods inherited from class net.minecraft.world.entity.ai.goal.MoveToBlockGoal
acceptedDistance, findNearestBlock, getMoveToTarget, isReachedTarget, moveMobToBlock, nextStartTick, requiresUpdateEveryTick, shouldRecalculatePath, start
Methods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, setFlags, stop, toString
-
Field Details
-
rabbit
-
wantsToRaid
private boolean wantsToRaid -
canRaid
private boolean canRaid
-
-
Constructor Details
-
RaidGardenGoal
-
-
Method Details
-
canUse
public boolean canUse()- Overrides:
canUse
in classMoveToBlockGoal
-
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUse
in classMoveToBlockGoal
-
tick
public void tick()- Overrides:
tick
in classMoveToBlockGoal
-
isValidTarget
Returntrue
to set given position as destination- Specified by:
isValidTarget
in classMoveToBlockGoal
-