public class StepAndDestroyBlockGoal extends MoveToTargetPosGoal
Goal.Control
Modifier and Type | Field and Description |
---|---|
private int |
counter |
private MobEntity |
stepAndDestroyMob |
private Block |
targetBlock |
cooldown, lowestY, mob, speed, targetPos, tryingTime
Constructor and Description |
---|
StepAndDestroyBlockGoal(Block targetBlock,
PathAwareEntity mob,
double speed,
int maxYDifference) |
Modifier and Type | Method and Description |
---|---|
boolean |
canStart() |
private boolean |
hasAvailableTarget() |
protected boolean |
isTargetPos(WorldView world,
BlockPos pos) |
void |
onDestroyBlock(World world,
BlockPos pos) |
void |
start() |
void |
stop() |
void |
tick() |
void |
tickStepping(WorldAccess world,
BlockPos pos) |
private BlockPos |
tweakToProperPos(BlockPos pos,
BlockView world) |
findTargetPos, getDesiredSquaredDistanceToTarget, getInterval, getTargetPos, hasReached, shouldContinue, shouldResetPath, startMovingToTarget
canStop, getControls, setControls, toString
private final Block targetBlock
private final MobEntity stepAndDestroyMob
private int counter
public StepAndDestroyBlockGoal(Block targetBlock, PathAwareEntity mob, double speed, int maxYDifference)
public boolean canStart()
canStart
in class MoveToTargetPosGoal
private boolean hasAvailableTarget()
public void start()
start
in class MoveToTargetPosGoal
public void tickStepping(WorldAccess world, BlockPos pos)
public void tick()
tick
in class MoveToTargetPosGoal
protected boolean isTargetPos(WorldView world, BlockPos pos)
isTargetPos
in class MoveToTargetPosGoal