@Override public int findPathOptions(@Nonnull PathPoint[] pathOptions, @Nonnull PathPoint currentPoint, @Nonnull PathPoint targetPoint, float maxDistance) { EntityLiving entityIn = entity; int i = 0; for (EnumFacing enumfacing : EnumFacing.values()) { PathPoint pathpoint = getSafePoint(entityIn, currentPoint.x + enumfacing.getFrontOffsetX(), currentPoint.y + enumfacing.getFrontOffsetY(), currentPoint.z + enumfacing.getFrontOffsetZ()); if (pathpoint != null && !pathpoint.visited && (pathpoint.distanceTo(targetPoint) < maxDistance)) { pathOptions[i++] = pathpoint; } } return i; }
PathPoint northPoint = this.getSafePoint(currentPoint.x, currentPoint.y, currentPoint.z - 1, j, d0, EnumFacing.NORTH); if (southPoint != null && southPoint.nodeType != PathNodeType.BLOCKED && !southPoint.visited && southPoint.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = southPoint; if (westPoint != null && westPoint.nodeType != PathNodeType.BLOCKED && !westPoint.visited && westPoint.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = westPoint; if (eastPoint != null && eastPoint.nodeType != PathNodeType.BLOCKED && !eastPoint.visited && eastPoint.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = eastPoint; if (northPoint != null && northPoint.nodeType != PathNodeType.BLOCKED && !northPoint.visited && northPoint.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = northPoint; PathPoint pathpoint4 = this.getSafePoint(currentPoint.x - 1, currentPoint.y, currentPoint.z - 1, j, d0, EnumFacing.NORTH); if (pathpoint4 != null && !pathpoint4.visited && pathpoint4.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = pathpoint4; if (pathpoint5 != null && !pathpoint5.visited && pathpoint5.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = pathpoint5; if (pathpoint6 != null && !pathpoint6.visited && pathpoint6.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = pathpoint6; if (pathpoint7 != null && !pathpoint7.visited && pathpoint7.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = pathpoint7;
PathPoint pathpoint3 = this.getSafePoint(currentPoint.x, currentPoint.y, currentPoint.z - 1, j, d0, EnumFacing.NORTH); if (pathpoint != null && !pathpoint.visited && pathpoint.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = pathpoint; if (pathpoint1 != null && !pathpoint1.visited && pathpoint1.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = pathpoint1; if (pathpoint2 != null && !pathpoint2.visited && pathpoint2.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = pathpoint2; if (pathpoint3 != null && !pathpoint3.visited && pathpoint3.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = pathpoint3; PathPoint pathpoint4 = this.getSafePoint(currentPoint.x - 1, currentPoint.y, currentPoint.z - 1, j, d0, EnumFacing.NORTH); if (pathpoint4 != null && !pathpoint4.visited && pathpoint4.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = pathpoint4; if (pathpoint5 != null && !pathpoint5.visited && pathpoint5.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = pathpoint5; if (pathpoint6 != null && !pathpoint6.visited && pathpoint6.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = pathpoint6; if (pathpoint7 != null && !pathpoint7.visited && pathpoint7.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = pathpoint7;
public int findPathOptions(PathPoint[] pathOptions, Entity entity, PathPoint currentPoint, PathPoint targetPoint, float maxDistance) { int i = 0; for (EnumFacing enumfacing : EnumFacing.values()) { PathPoint pathpoint = this.func_186328_b(currentPoint.x + enumfacing.getFrontOffsetX(), currentPoint.y + enumfacing.getFrontOffsetY(), currentPoint.z + enumfacing.getFrontOffsetZ()); if (pathpoint != null && !pathpoint.visited && pathpoint.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = pathpoint; } } return i; }
PathPoint north = this.getSafePoint(currentPoint.x, currentPoint.y, currentPoint.z - 1, stepHeight, groundY, EnumFacing.NORTH); if (south != null && !south.visited && south.distanceTo(targetPoint) < maxDistance) { pathOptions[optionIndex++] = south; if (west != null && !west.visited && west.distanceTo(targetPoint) < maxDistance) { pathOptions[optionIndex++] = west; if (east != null && !east.visited && east.distanceTo(targetPoint) < maxDistance) { pathOptions[optionIndex++] = east; if (north != null && !north.visited && north.distanceTo(targetPoint) < maxDistance) { pathOptions[optionIndex++] = north; PathPoint northWest = this.getSafePoint(currentPoint.x - 1, currentPoint.y, currentPoint.z - 1, stepHeight, groundY, EnumFacing.NORTH); if (northWest != null && !northWest.visited && northWest.distanceTo(targetPoint) < maxDistance) { pathOptions[optionIndex++] = northWest; if (northEast != null && !northEast.visited && northEast.distanceTo(targetPoint) < maxDistance) { pathOptions[optionIndex++] = northEast; if (southWest != null && !southWest.visited && southWest.distanceTo(targetPoint) < maxDistance) { pathOptions[optionIndex++] = southWest; if (southEast != null && !southEast.visited && southEast.distanceTo(targetPoint) < maxDistance) { pathOptions[optionIndex++] = southEast;
public int findPathOptions(PathPoint[] pathOptions, PathPoint currentPoint, PathPoint targetPoint, float maxDistance) { int i = 0; for (EnumFacing enumfacing : EnumFacing.values()) { PathPoint pathpoint = this.getWaterNode(currentPoint.x + enumfacing.getXOffset(), currentPoint.y + enumfacing.getYOffset(), currentPoint.z + enumfacing.getZOffset()); if (pathpoint != null && !pathpoint.visited && pathpoint.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = pathpoint; } } return i; }
@Override public int findPathOptions(PathPoint[] options, PathPoint currentPoint, PathPoint nextPoint, float maxDistance) { int i = 0; for (EnumFacing enumfacing : EnumFacing.values()) { PathPoint pathpoint = this.func_186328_b(currentPoint.x + enumfacing.getFrontOffsetX(), currentPoint.y + enumfacing.getFrontOffsetY(), currentPoint.z + enumfacing.getFrontOffsetZ()); if (pathpoint != null && !pathpoint.visited && pathpoint.distanceTo(nextPoint) < maxDistance) { options[i++] = pathpoint; } } return i; }
@Override public int findPathOptions(PathPoint[] pathOptions, PathPoint currentPoint, PathPoint targetPoint, float maxDistance) { int i = 0; for (EnumFacing enumfacing : EnumFacing.values()) { PathPoint pathpoint = this.getAirNode(currentPoint.x + enumfacing.getFrontOffsetX(), currentPoint.y + enumfacing.getFrontOffsetY(), currentPoint.z + enumfacing.getFrontOffsetZ()); if (pathpoint != null && !pathpoint.visited && pathpoint.distanceTo(targetPoint) < maxDistance) pathOptions[i++] = pathpoint; } return i; }
@Override public int findPathOptions(PathPoint[] pathOptions, PathPoint currentPoint, PathPoint targetPoint, float maxDistance) { int i = 0; for (EnumFacing facing : EnumFacing.values()) { PathPoint point = getSafePoint(entity, currentPoint.xCoord + facing.getFrontOffsetX(), currentPoint.yCoord + facing.getFrontOffsetY(), currentPoint.zCoord + facing.getFrontOffsetZ() ); if (point != null && !point.visited && point.distanceTo(targetPoint) < maxDistance) { pathOptions[i++] = point; } } return i; }