Package net.minecraft.entity.ai.goal
Class MoveToBlockGoal
- java.lang.Object
-
- net.minecraft.entity.ai.goal.Goal
-
- net.minecraft.entity.ai.goal.MoveToBlockGoal
-
- Direct Known Subclasses:
BreakBlockGoal
,CatLieOnBedGoal
,CatSitOnBlockGoal
,DrownedEntity.GoToBeachGoal
,FoxEntity.EatBerriesGoal
,RabbitEntity.RaidFarmGoal
,StriderEntity.MoveToLavaGoal
,TurtleEntity.GoToWaterGoal
,TurtleEntity.LayEggGoal
public abstract class MoveToBlockGoal extends Goal
-
-
Field Summary
Fields Modifier and Type Field Description protected BlockPos
blockPos
private int
maxStayTicks
protected CreatureEntity
mob
protected int
nextStartTick
private boolean
reachedTarget
private int
searchRange
double
speedModifier
protected int
tryTicks
private int
verticalSearchRange
protected int
verticalSearchStart
-
Constructor Summary
Constructors Constructor Description MoveToBlockGoal(CreatureEntity p_i45888_1_, double p_i45888_2_, int p_i45888_4_)
MoveToBlockGoal(CreatureEntity p_i48796_1_, double p_i48796_2_, int p_i48796_4_, int p_i48796_5_)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description double
acceptedDistance()
boolean
canContinueToUse()
boolean
canUse()
protected boolean
findNearestBlock()
protected BlockPos
getMoveToTarget()
protected boolean
isReachedTarget()
protected abstract boolean
isValidTarget(IWorldReader p_179488_1_, BlockPos p_179488_2_)
protected void
moveMobToBlock()
protected int
nextStartTick(CreatureEntity p_203109_1_)
boolean
shouldRecalculatePath()
void
start()
void
tick()
-
-
-
Field Detail
-
mob
protected final CreatureEntity mob
-
speedModifier
public final double speedModifier
-
nextStartTick
protected int nextStartTick
-
tryTicks
protected int tryTicks
-
maxStayTicks
private int maxStayTicks
-
blockPos
protected BlockPos blockPos
-
reachedTarget
private boolean reachedTarget
-
searchRange
private final int searchRange
-
verticalSearchRange
private final int verticalSearchRange
-
verticalSearchStart
protected int verticalSearchStart
-
-
Constructor Detail
-
MoveToBlockGoal
public MoveToBlockGoal(CreatureEntity p_i45888_1_, double p_i45888_2_, int p_i45888_4_)
-
MoveToBlockGoal
public MoveToBlockGoal(CreatureEntity p_i48796_1_, double p_i48796_2_, int p_i48796_4_, int p_i48796_5_)
-
-
Method Detail
-
nextStartTick
protected int nextStartTick(CreatureEntity p_203109_1_)
-
canContinueToUse
public boolean canContinueToUse()
- Overrides:
canContinueToUse
in classGoal
-
moveMobToBlock
protected void moveMobToBlock()
-
acceptedDistance
public double acceptedDistance()
-
getMoveToTarget
protected BlockPos getMoveToTarget()
-
shouldRecalculatePath
public boolean shouldRecalculatePath()
-
isReachedTarget
protected boolean isReachedTarget()
-
findNearestBlock
protected boolean findNearestBlock()
-
isValidTarget
protected abstract boolean isValidTarget(IWorldReader p_179488_1_, BlockPos p_179488_2_)
-
-