Class MoveToBlockGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.MoveToBlockGoal
- Direct Known Subclasses:
- CatLieOnBedGoal,- CatSitOnBlockGoal,- Drowned.DrownedGoToBeachGoal,- Fox.FoxEatBerriesGoal,- Rabbit.RaidGardenGoal,- RemoveBlockGoal,- Strider.StriderGoToLavaGoal,- Turtle.TurtleGoToWaterGoal,- Turtle.TurtleLayEggGoal
- 
Nested Class Summary
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected BlockPosprivate static final intprivate static final intprivate intprotected final PathfinderMobprotected intprivate booleanprivate final intfinal doubleprivate static final intprotected intprivate final intprotected int
- 
Constructor SummaryConstructorsConstructorDescriptionMoveToBlockGoal(PathfinderMob p_25609_, double p_25610_, int p_25611_) MoveToBlockGoal(PathfinderMob p_25613_, double p_25614_, int p_25615_, int p_25616_) 
- 
Method SummaryModifier and TypeMethodDescriptiondoublebooleanbooleancanUse()protected booleanprotected BlockPosprotected booleanprotected abstract booleanisValidTarget(LevelReader p_25619_, BlockPos p_25620_) protected voidprotected intnextStartTick(PathfinderMob p_25618_) booleanbooleanvoidstart()voidtick()Methods inherited from class net.minecraft.world.entity.ai.goal.GoaladjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, setFlags, stop, toString
- 
Field Details- 
GIVE_UP_TICKSprivate static final int GIVE_UP_TICKS- See Also:
 
- 
STAY_TICKSprivate static final int STAY_TICKS- See Also:
 
- 
INTERVAL_TICKSprivate static final int INTERVAL_TICKS- See Also:
 
- 
mob
- 
speedModifierpublic final double speedModifier
- 
nextStartTickprotected int nextStartTick
- 
tryTicksprotected int tryTicks
- 
maxStayTicksprivate int maxStayTicks
- 
blockPos
- 
reachedTargetprivate boolean reachedTarget
- 
searchRangeprivate final int searchRange
- 
verticalSearchRangeprivate final int verticalSearchRange
- 
verticalSearchStartprotected int verticalSearchStart
 
- 
- 
Constructor Details- 
MoveToBlockGoal
- 
MoveToBlockGoal
 
- 
- 
Method Details- 
canUsepublic boolean canUse()
- 
nextStartTick
- 
canContinueToUsepublic boolean canContinueToUse()- Overrides:
- canContinueToUsein class- Goal
 
- 
startpublic void start()
- 
moveMobToBlockprotected void moveMobToBlock()
- 
acceptedDistancepublic double acceptedDistance()
- 
getMoveToTarget
- 
requiresUpdateEveryTickpublic boolean requiresUpdateEveryTick()- Overrides:
- requiresUpdateEveryTickin class- Goal
 
- 
tickpublic void tick()
- 
shouldRecalculatePathpublic boolean shouldRecalculatePath()
- 
isReachedTargetprotected boolean isReachedTarget()
- 
findNearestBlockprotected boolean findNearestBlock()
- 
isValidTarget
 
-