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
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected BlockPos
private int
protected final CreatureEntity
protected int
private boolean
private final int
final double
protected int
private final int
protected int
-
Constructor Summary
ConstructorDescriptionMoveToBlockGoal
(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
Modifier and TypeMethodDescriptiondouble
boolean
boolean
canUse()
protected boolean
protected BlockPos
protected boolean
protected abstract boolean
isValidTarget
(IWorldReader p_179488_1_, BlockPos p_179488_2_) protected void
protected int
nextStartTick
(CreatureEntity p_203109_1_) boolean
void
start()
void
tick()
-
Field Details
-
mob
-
speedModifier
public final double speedModifier -
nextStartTick
protected int nextStartTick -
tryTicks
protected int tryTicks -
maxStayTicks
private int maxStayTicks -
blockPos
-
reachedTarget
private boolean reachedTarget -
searchRange
private final int searchRange -
verticalSearchRange
private final int verticalSearchRange -
verticalSearchStart
protected int verticalSearchStart
-
-
Constructor Details
-
MoveToBlockGoal
-
MoveToBlockGoal
public MoveToBlockGoal(CreatureEntity p_i48796_1_, double p_i48796_2_, int p_i48796_4_, int p_i48796_5_)
-
-
Method Details
-
canUse
public boolean canUse() -
nextStartTick
-
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUse
in classGoal
-
start
public void start() -
moveMobToBlock
protected void moveMobToBlock() -
acceptedDistance
public double acceptedDistance() -
getMoveToTarget
-
tick
public void tick() -
shouldRecalculatePath
public boolean shouldRecalculatePath() -
isReachedTarget
protected boolean isReachedTarget() -
findNearestBlock
protected boolean findNearestBlock() -
isValidTarget
-