protected PathFinder getPathFinder() { this.nodeProcessor = new WalkNodeProcessor(); this.nodeProcessor.setCanEnterDoors(true); this.nodeProcessor.setCanSwim(true); return new PathFinder(this.nodeProcessor); }
@Override public void setCanSwim(boolean value) { super.setCanSwim(value); nodeProcessor.setCanSwim(value); }
@Override public void setEnterDoors(boolean value) { super.setEnterDoors(value); nodeProcessor.setCanEnterDoors(value); }
private boolean isRunningAway() { if (runningAwayTo == null) { return false; } if (getNavigator().noPath()) { runningAwayTo = null; return false; } final Path path = getNavigator().getPath(); PathPoint dest = path != null ? path.getFinalPathPoint() : null; return dest != null && dest.equals(runningAwayTo); }
@Override public void updateTask() { Path currentPath = this.entity.getNavigator().getPath(); if (this.shore != null && !this.path.isSamePath(currentPath)) { Path path = this.entity.getNavigator().getPathToPos(this.shore); if (path != null && !path.isSamePath(currentPath)) { this.path = path; this.entity.getNavigator().setPath(path, 1.5); } } } }
@Override public boolean shouldContinueExecuting() { if (this.entityPathNavigate.noPath()) { this.entity.attackStateMachine = 0; return false; } return this.entity.attackStateMachine == 2; }
/** * Execute a one shot task or start executing a continuous task */ @Override public void startExecuting() { if (this.entityPathEntity != null) { this.entityPathNavigate.setPath(this.entityPathEntity, this.farSpeed); } }
/** * Resets the task */ public void resetTask() { this.theOwner = null; this.petPathfinder.clearPath(); }
@Override public boolean shouldContinueExecuting() { Path currentPath = this.entity.getNavigator().getPath(); return this.shore != null && this.path != null && (currentPath == null || !currentPath.isFinished()); }
protected PathFinder getPathFinder(){ this.nodeProcessor = new ExperimentalWalkNodeProcessor(); this.nodeProcessor.setCanEnterDoors(true); return new PathFinder(this.nodeProcessor); } }
/** * Returns new PathNavigateGround instance */ @Override protected PathNavigate createNavigator(World worldIn) { return new PathNavigateClimber(this, worldIn); }
/** * Trims path data from the end to the first sun covered block */ @Override protected void removeSunnyPath() { super.removeSunnyPath(); }
/** * If null path or reached the end. */ @Override public boolean noPath() { return future == null && super.noPath(); }
@Override public NodeProcessor getNodeProcessor() { return super.getNodeProcessor(); } }
public PathNavigateDeathWormLand(EntityDeathWorm worm, World worldIn) { super(worm, worldIn); this.nodeProcessor.setCanSwim(true); this.worm = worm; }
@Override protected void debugPathFinding() { super.debugPathFinding(); }
@Override public boolean shouldContinueExecuting() { return !this.pathNavigator.noPath(); }
protected PathFinder getPathFinder() { this.nodeProcessor = new WalkNodeProcessor(); this.nodeProcessor.setCanEnterDoors(true); this.nodeProcessor.setCanSwim(true); return new PathFinder(this.nodeProcessor); }
@Override public void startExecuting() { this.pathNavigator.setPath(path, farSpeed); }
@Override protected PathNavigate createNavigator(World worldIn) { return new PathNavigateClimber(this, worldIn); }