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,
MobEntityWithAi 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(IWorld world,
BlockPos pos) |
private BlockPos |
tweakToProperPos(BlockPos pos,
BlockView world) |
findTargetPos, getDesiredSquaredDistanceToTarget, getInterval, hasReached, shouldContinue, shouldResetPath, startMovingToTargetcanStop, getControls, setControls, toStringprivate final Block targetBlock
private final MobEntity stepAndDestroyMob
private int counter
public StepAndDestroyBlockGoal(Block targetBlock, MobEntityWithAi mob, double speed, int maxYDifference)
public boolean canStart()
canStart in class MoveToTargetPosGoalprivate boolean hasAvailableTarget()
public void start()
start in class MoveToTargetPosGoalpublic void tick()
tick in class MoveToTargetPosGoalprotected boolean isTargetPos(WorldView world, BlockPos pos)
isTargetPos in class MoveToTargetPosGoal