Drew Alden
Published © MIT

Alexa, Start DroneHelper!

DroneHelper teaches Alexa all about Drones and common terms used in the industry, including FPV racing. "Alexa, what's a VTX?"

BeginnerShowcase (no instructions)1 hour644
Alexa, Start DroneHelper!

Things used in this project

Story

Read more

Code

AlexaSkill.js

JavaScript
/**
    Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.

    Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at

        http://aws.amazon.com/apache2.0/

    or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

'use strict';

function AlexaSkill(appId) {
    this._appId = appId;
}

AlexaSkill.speechOutputType = {
    PLAIN_TEXT: 'PlainText',
    SSML: 'SSML'
}

AlexaSkill.prototype.requestHandlers = {
    LaunchRequest: function (event, context, response) {
        this.eventHandlers.onLaunch.call(this, event.request, event.session, response);
    },

    IntentRequest: function (event, context, response) {
        this.eventHandlers.onIntent.call(this, event.request, event.session, response);
    },

    SessionEndedRequest: function (event, context) {
        this.eventHandlers.onSessionEnded(event.request, event.session);
        context.succeed();
    }
};

/**
 * Override any of the eventHandlers as needed
 */
AlexaSkill.prototype.eventHandlers = {
    /**
     * Called when the session starts.
     * Subclasses could have overriden this function to open any necessary resources.
     */
    onSessionStarted: function (sessionStartedRequest, session) {
    },

    /**
     * Called when the user invokes the skill without specifying what they want.
     * The subclass must override this function and provide feedback to the user.
     */
    onLaunch: function (launchRequest, session, response) {
        throw "onLaunch should be overriden by subclass";
    },

    /**
     * Called when the user specifies an intent.
     */
    onIntent: function (intentRequest, session, response) {
        var intent = intentRequest.intent,
            intentName = intentRequest.intent.name,
            intentHandler = this.intentHandlers[intentName];
        if (intentHandler) {
            console.log('dispatch intent = ' + intentName);
            intentHandler.call(this, intent, session, response);
        } else {
            throw 'Unsupported intent = ' + intentName;
        }
    },

    /**
     * Called when the user ends the session.
     * Subclasses could have overriden this function to close any open resources.
     */
    onSessionEnded: function (sessionEndedRequest, session) {
    }
};

/**
 * Subclasses should override the intentHandlers with the functions to handle specific intents.
 */
AlexaSkill.prototype.intentHandlers = {};

AlexaSkill.prototype.execute = function (event, context) {
    try {
        console.log("session applicationId: " + event.session.application.applicationId);

        // Validate that this request originated from authorized source.
        if (this._appId && event.session.application.applicationId !== this._appId) {
            console.log("The applicationIds don't match : " + event.session.application.applicationId + " and "
                + this._appId);
            throw "Invalid applicationId";
        }

        if (!event.session.attributes) {
            event.session.attributes = {};
        }

        if (event.session.new) {
            this.eventHandlers.onSessionStarted(event.request, event.session);
        }

        // Route the request to the proper handler which may have been overriden.
        var requestHandler = this.requestHandlers[event.request.type];
        requestHandler.call(this, event, context, new Response(context, event.session));
    } catch (e) {
        console.log("Unexpected exception " + e);
        context.fail(e);
    }
};

var Response = function (context, session) {
    this._context = context;
    this._session = session;
};

function createSpeechObject(optionsParam) {
    if (optionsParam && optionsParam.type === 'SSML') {
        return {
            type: optionsParam.type,
            ssml: optionsParam.speech
        };
    } else {
        return {
            type: optionsParam.type || 'PlainText',
            text: optionsParam.speech || optionsParam
        }
    }
}

Response.prototype = (function () {
    var buildSpeechletResponse = function (options) {
        var alexaResponse = {
            outputSpeech: createSpeechObject(options.output),
            shouldEndSession: options.shouldEndSession
        };
        if (options.reprompt) {
            alexaResponse.reprompt = {
                outputSpeech: createSpeechObject(options.reprompt)
            };
        }
        if (options.cardTitle && options.cardContent) {
            alexaResponse.card = {
                type: "Simple",
                title: options.cardTitle,
                content: options.cardContent
            };
        }
        var returnResult = {
                version: '1.0',
                response: alexaResponse
        };
        if (options.session && options.session.attributes) {
            returnResult.sessionAttributes = options.session.attributes;
        }
        return returnResult;
    };

    return {
        tell: function (speechOutput) {
            this._context.succeed(buildSpeechletResponse({
                session: this._session,
                output: speechOutput,
                shouldEndSession: true
            }));
        },
        tellWithCard: function (speechOutput, cardTitle, cardContent) {
            this._context.succeed(buildSpeechletResponse({
                session: this._session,
                output: speechOutput,
                cardTitle: cardTitle,
                cardContent: cardContent,
                shouldEndSession: true
            }));
        },
        ask: function (speechOutput, repromptSpeech) {
            this._context.succeed(buildSpeechletResponse({
                session: this._session,
                output: speechOutput,
                reprompt: repromptSpeech,
                shouldEndSession: false
            }));
        },
        askWithCard: function (speechOutput, repromptSpeech, cardTitle, cardContent) {
            this._context.succeed(buildSpeechletResponse({
                session: this._session,
                output: speechOutput,
                reprompt: repromptSpeech,
                cardTitle: cardTitle,
                cardContent: cardContent,
                shouldEndSession: false
            }));
        }
    };
})();

module.exports = AlexaSkill;

definitions.js

JavaScript
/**
    Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.

    Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at

        http://aws.amazon.com/apache2.0/

    or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

module.exports = {
	"vtx": "A VTX is a video transmitter.",
	"vrx": "A VRX is a video receiver.",
	"esc": "An E.S.C. is an Electronic Speed Controller.",
	"escs": "An E.S.C. is an Electronic Speed Controller.",
	"esc's": "An E.S.C. is an Electronic Speed Controller."
	
	/*
    "snow golem": "A snow golem can be created by placing a pumpkin on top of  two snow blocks on the ground.",
    "pillar quartz block": "A pillar of quartz can be obtained by placing a block of quartz on top of a block of quartz in mine craft.",
    "firework rocket": "A firework rocket can be crafted by placing a firework star in the left middle square, a piece of paper in the center square, and gunpowder in the right middle square in a crafting table. Similar to a firework star, a firework rocket can have more gunpowder added in the bottom row to increase the duration of a rocket.",
    "rabbit stew": "Rabbit stew can be crafted by placing cooked rabbit in the top middle square, a carrot in the middle left square, a baked potato in the center square, any type of mushroom in the middle right square, and a bowl in the bottom middle square.",
    "cauldron": "A cauldron can be created by placing iron ingots in all squares but the top middle and very center squares in a crafting table.",
    "stone shovel": "All types of shovels can be crafted by placing the desired material in the top middle square, and then sticks in the two squares directly beneath that in a crafting table.",
    "red carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "book and quill": "A book and quill can be crafted by placing a book in the middle left square, an ink sac in the very center square, and a feather in the bottom middle square in a crafting table.",
    "item frame": "An item frame can be crafted by placing leather in the very center square, and eight sticks surrounding it.",
    "map": "A map can be crafted by placing a compass in the middle square and eight pieces of paper surrounding it.",
    "sticky piston": "A sticky piston can be crafted by placing a slime ball on top of a piston in a crafting window",
    "bread": "Bread can be crafted by placing three wheat across a row in a crafting table.",
    "wooden pick ax": "All types of pick axs can be crafted by placing three of the desired material across the top row, and then placing sticks in the center and bottom middle squares in a crafting table.",
    "shears": "Shears can be crafted by placing two Iron Ingots diagonal from each other.",
    "raw beef": "Raw Beef will drop from the death of a Cow or Moo shrooms.",
    "smooth red sandstone": "Smooth red sandstone can be crafted by placing four red sandstone in a two by two grid in a crafting window.",
    "prismarine crystals": "Prismarine Crystals can be obtained by defeating Guardians and Elder Guardians.",
    "oak wood slab": "All types of slabs can be crafted by placing three of the desired materials across a row in a crafting table.",
    "wooden sword": "All types of swords can be crafted by placing the desired material in the top middle and very center square, with a stick beneath them, in a crafting table",
    "stairs": "All types of stairs can be crafted by placing the desired material in all squares but the top middle, top right, and middle right squares in a crafting table.",
    "jungle fence": "Any type of fence can be crafted by putting a wooden plank, a stick, and then another wooden plank in the bottom two rows of a crafting table.",
    "activator rail": "An activator rail can be crafted by placing a red stone torch in the very center square, sticks above and beneath it, and then six iron ingots in the remaining squares in a crafting table.",
    "farmland": "Farmland can be created by plowing the land with a hoe.",
    "gold ore": "Gold ore can be obtained by breaking gold ore blocks with an iron pick ax or better",
    "andesite": "Andesite can be mined with a pick ax or crafted by placing diorite next to cobblestone in a crafting table.",
    "rose red": "Rose red can be crafted by placing a poppy into a crafting table.",
    "iron axe": "All types of axes can be crafted by placing three of the desired material in the top left, top middle, and middle left squares, with sticks in the center and bottom middle squares in a crafting table.",
    "light blue dye": "Light blue dye can be crafted by placing lapis lazuli next to bone meal in a crafting window.",
    "gray dye": "Gray dye can be crafted by placing bonemeal next to an ink sac in a crafting window",
    "blue stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "iron horse armor": "Horse Armor can be randomly found in Dungeons, Nether fortresses, Village blacksmiths, jungle temples, desert temples, and stronghold chests.",
    "red stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "brick stairs": "All types of stairs can be crafted by placing the desired material in all squares but the top middle, top right, and middle right squares in a crafting table.",
    "golden leggings": "All leggings are crafted by placing the desired material in all squares but the center square and bottom middle square in a crafting table.",
    "dark oak fence gate": "Any type of fence gate can be crafted by placing a stick, a wooden plank, and then another stick across the bottom two rows in a crafting table.",
    "wither mob head": "Mob heads can be obtained by having a charged creeper blow up the mob whose head you want to obtain.",
    "spider eye": "A spider eye is randomly dropped by killing spiders or witches.",
    "magenta stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "brown stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "pumpkin pie": "A pumpkin pie can be crafted by placing a pumpkin in the left middle square, sugar in the very center square, and an egg in the bottom middle square in a crafting table.",
    "snowball": "A snowball can be obtained by breaking snow with a shovel.",
    "juke box": "A juke box is crafted by placing a diamond in the very center square and wood planks all around that in a crafting table",
    "sand": "Sand can be obtained by breaking sand blocks.",
    "dead bush": "Dead bushes, also known as shrubs, can be obtained with shears.",
    "brick slab": "A brick slab can be crafted by placing three brick blocks in a row in a crafting table.",
    "lily pad": "Lily pads can be found naturally on water in swamplands or underground lakes.",
    "leather pants": "All leggings are crafted by placing the desired material in all squares but the center square and bottom middle square in a crafting table.",
    "mossy cobblestone wall": "A mossy cobblestone wall is crafted by placing six mossy cobblestone across the bottom two rows in a crafting table.",
    "eleven disc": "A random music disc has a possibility of dropping when a Skeleton's Arrow kills a Creeper. Alternately, music disc are found in eight percent of dungeon chests.",
    "purple stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "magenta stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "mall disc": "A random music disc has a possibility of dropping when a Skeleton's Arrow kills a Creeper. Alternately, music disc are found in eight percent of dungeon chests.",
    "jungle wood": "All types of wood can be obtained by breaking the tree they naturally grow into.",
    "diamond ax": "All types of axes can be crafted by placing three of the desired material in the top left, top middle, and middle left squares, with sticks in the center and bottom middle squares in a crafting table.",
    "empty map": "A map can be crafted by placing a compass in the middle square and eight pieces of paper surrounding it.",
    "stone pressure plate": "A stone pressure plate can be crafted by placing two smooth stone, next to each other, horizontally, in a crafting window.",
    "trapdoor": "Trapdoors can be crafted with either wooden planks or iron ingots. To craft a wooden trapdoor, place wooden planks in all spaces in the bottom two rows. To craft an iron trapdoor, place iron ingots in a two by two grid in a crafting table.",
    "gold boots": "All boots are crafted by placing the desired material in the middle left, bottom left, middle right, and bottom right squares of a crafting table.",
    "stall disc": "A random music disc has a possibility of dropping when a Skeleton's Arrow kills a Creeper. Alternately, music disc are found in eight percent of dungeon chest.",
    "red stone wire": "Redstone wire is simply red stone placed on the floor.",
    "piston": "A piston can be crafted by placing an iron ingot in the center square, red stone in the bottom middle square, wooden planks across the top row, and cobblestone in the remaining squares.",
    "white stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "mine cart with furnace": "A mine cart with a furnace is crafted by placing a furnace on top of a mine cart in a crafting window.",
    "sugar": "Sugar can be obtained by placing sugar cane in a crafting window.",
    "chain mail chest plate": "Chain mail armor can only be obtained by trading with a villager or getting a rare drop off of a mob.",
    "feather": "Feathers can be randomly obtained by killing chickens.",
    "light blue stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "oak fence": "Any type of fence can be crafted by putting a wooden plank, a stick, and then another wooden plank in the bottom two rows of a crafting table.",
    "stone pick ax": "All types of pick axes can be crafted by placing three of the desired material across the top row, and then placing sticks in the center and bottom middle squares in a crafting table.",
    "pink carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "monster spawner": "Monster spawners can not be obtained without cheats in mine craft.",
    "golden carrot": "A golden carrot can be crafted by placing a carrot in the very middle square and eight gold nuggets surrounding that.",
    "stick": "A stick can be crafted by placing a wooden plank on top of a wooden plank in a crafting window.",
    "diamond block": "A diamond block can be crafted by placing diamonds in every square in a crafting table.",
    "green stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "cooked chicken": "Raw Chicken can be cooked by smelting it in a furnace. Alternately, Cooked Chicken has a chance of dropping when a Chicken dies while on fire.",
    "thirteen disc": "A random music disc has a possibility of dropping when a Skeleton's Arrow kills a Creeper. Alternately, music disc are found in eight percent of dungeon chest.",
    "wooden trapdoor": "A wooden trapdoor can be crafted by placing wooden planks in all spaces in the bottom two rows in a crafting table.",
    "oak fence gate": "Any type of fence gate can be crafted by placing a stick, a wooden plank, and then another stick across the bottom two rows in a crafting table.",
    "crafting bench": "A crafting bench is crafted by placing wooden planks in a two by two grid in a crafting window.",
    "nether quartz ore": "Nether quartz ore can be randomly found in the nether. To obtain the ore instead of nether quartz, you will need to use a silk touch pick ax.",
    "golden sword": "All types of swords can be crafted by placing the desired material in the top middle and very center square, with a stick beneath them, in a crafting table",
    "gray stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "light blue stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "diamond boots": "All boots are crafted by placing the desired material in the middle left, bottom left, middle right, and bottom right squares of a crafting table.",
    "stone hoe": "All types of hoes can be crafted by placing two of the desired material in the top left, and top middle squares, with sticks in the center and bottom middle squares in a crafting table.",
    "coal ore": "Coal ore can be obtained by breaking a coal ore block with a pick ax that is enchanted with silk touch",
    "dark oak leaves": "All leaves can be obtained by using a shear on the desired leaf.",
    "t.n.t.": "T.N.T can be crafted by placing gunpowder in an x shape in a crafting grid and then placing sand in all remaining squares.",
    "brick": "A brick can be crafted by smelting clay in a furnace.",
    "potato": "Potatoes can be rarely obtained by killing zombies or, they can be found as crops in villages.",
    "orange carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "ink sack": "An ink sack can be obtained by killing a squid.",
    "red stone": "Redstone can be obtained by breaking red stone ore with an iron pick ax or better.",
    "dark oak wood": "All types of wood can be obtained by breaking the tree they naturally grow into.",
    "diorite": "Diorite can be mined with a pick ax or crafted by combining cobblestone and nether quartz in a two by two grid in a crafting table.",
    "workbench": "A workbench is crafted by placing wooden planks in a two by two grid in a crafting window.",
    "gray stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "jungle fence gate": "Any type of fence gate can be crafted by placing a stick, a wooden plank, and then another stick across the bottom two rows in a crafting table.",
    "magenta wool": "Magenta wool can be crafted by placing magenta dye next to any color wool in a crafting window.",
    "dirt": "Dirt can be obtained by breaking grass or dirt with a shovel.",
    "armor stand": "An Armor Stand can be crafted with six sticks and one stone slab. Take three sticks and place it across the first row. Take the remaining three sticks and place one each in the bottom left, bottom right, and center middle. Place the stone slab in the bottom middle.",
    "cooked fish": "Cooked fish is obtained by cooking fish in a furnace.",
    "lever": "A lever can be crafted by placing a stick on top of cobblestone in a crafting window.",
    "leash": "A leash can be crafted by placing a slime ball in the very center, and then placing string in the top left, top middle, left middle, and bottom right squares in a crafting table.",
    "cooked rabbit": "Cooked rabbit can be obtained by cooking raw rabbit in a furnace. Alternately, Cooked Rabbit has a chance of dropping when a Rabbit dies while on fire.",
    "jungle wood stairs": "All types of stairs can be crafted by placing the desired material in all squares but the top middle, top right, and middle right squares in a crafting table.",
    "mine cart with hopper": "A Mine cart With a Hopper can be crafted by placing a Hopper on top of a Mine cart in a crafting table.",
    "fermented spider eye": "Fermented spider eye can be obtained by placing a brown mushroom in the middle left square, sugar in the very center square, and a spider eye in the bottom middle square in a crafting table.",
    "raw fish": "Raw fish is randomly obtained by fishing.",
    "brown stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "sign": "A sign is crafted by placing wooden planks in the top two rows and a stick in the bottom middle square.",
    "t.n.t": "T.N.T can be crafted by placing gunpowder in an x shape in a crafting grid and then placing sand in all remaining squares.",
    "hopper": "A hopper can be crafted by placing a chest in the very center square, and then iron ingots in every square but the top middle, bottom left, and bottom right squares in a crafting grid.",
    "blaze rod": "Blaze rods can be randomly obtained by killing blazes.",
    "red stone comparator": "A red stone comparator can be crafted by placing three smooth stone across the bottom row, a nether quartz in the center square, and three red stone torches surrounding the nether quartz in a crafting table.",
    "bone": "Bones can be obtained by killing skeletons.",
    "golden horse armor": "Horse Armor can be randomly found in Dungeons, Nether fortresses, Village blacksmiths, jungle temples, desert temples, and stronghold chests.",
    "golden pants": "All leggings are crafted by placing the desired material in all squares but the center square and bottom middle square in a crafting table.",
    "rail": "A rail can be crafted by placing a stick in the very middle square and iron ingots vertically in both the first and last column in a crafting table.",
    "wheat seeds": "Wheat seeds are obtained by harvesting wheat.",
    "birch fence": "Any type of fence can be crafted by putting a wooden plank, a stick, and then another wooden plank in the bottom two rows of a crafting table.",
    "purple stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "golden chestplate": "All chestplates are crafted by placing the desired material in all squares but the top middle square in a crafting table.",
    "leather boots": "All boots are crafted by placing the desired material in the middle left, bottom left, middle right, and bottom right squares of a crafting table.",
    "diamond shovel": "All types of shovels can be crafted by placing the desired material in the top middle square, and then sticks in the two squares directly beneath that in a crafting table.",
    "leather leggings": "All leggings are crafted by placing the desired material in all squares but the center square and bottom middle square in a crafting table.",
    "red sand": "Red sand can be found in Mesa biomes.",
    "vines": "Vines can only be harvested with shears. Vines spawn naturally in jungle trees or in swamplands.",
    "glass bottle": "A glass bottle is crafted by creating a V shape with three glass blocks in a crafting table.",
    "red stone ore": "Redstone ore can be found in the bottom sixteen layers on the map. If broken with an iron pick ax or better, it will drop some amount of red stone. To obtain the ore itself, one would need to use a pick ax with a silk touch enchant.",
    "emerald block": "Emerald blocks can be crafted by placing nine emeralds in a three by three grid in a crafting table.",
    "granite": "Granite can be mined with a pick ax or crafted by placing Diorite and a nether quartz next to each other in a crafting table.",
    "brown wool": "Brown wool can be crafted by placing brown dye next to any color wool in a crafting window.",
    "golden apple": "A golden apple can be crafted by placing an apple in the very center square and eight gold ingots surrounding it.",
    "birch leaves": "All leaves can be obtained by using a shear on the desired leaf.",
    "white wool": "White wool can be crated by placing four string in a two by two grid in a crafting window. It can also be obtained by placing bone meal next to any color wool in a crafting window",
    "purple carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "hardened clay": "Hardened clay can be crafted by smelting a clay block in a furnace.",
    "zombie mob head": "Mob heads can be obtained by having a charged creeper blow up the mob whose head you want to obtain.",
    "iron trapdoor": "An iron trapdoor can be crafted by placing iron ingots in a two by two grid in a crafting window.",
    "flower pot": "A flower pot is crafted by placing three bricks in a V shape in a crafting table.",
    "iron ore": "Iron ore can be obtained by breaking iron ore blocks with a stone pick ax or better",
    "jungle wood slab": "All types of slabs can be crafted by placing three of the desired materials across a row in a crafting table.",
    "birch wood slab": "All types of slabs can be crafted by placing three of the desired materials across a row in a crafting table.",
    "jungle door": "A Jungle Door can be crafted by placing six Jungle Planks down the first two columns.",
    "golden ax": "All types of axes can be crafted by placing three of the desired materials in the top left, top middle, and middle left squares, with sticks in the center and bottom middle squares in a crafting table.",
    "packed ice": "Packed ice can be found in the rare ice plains spikes biome and can only be obtained with a silk touch tool.",
    "bricks": "Bricks can be crafted by smelting clay in a furnace.",
    "light blue carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "dead shrub": "Dead bushes, also known as shrubs, can be obtained with shears.",
    "dropper": "A dropper can be crafted by placing red stone in the middle bottom square, and cobblestone in every other square but the center one.",
    "chest": "A chest is crafted by placing wooden planks, in every square but the middle square, in a crafting table.",
    "raw chicken": "Raw Chicken will drop from the death of a Chicken.",
    "raw salmon": "Raw salmon is randomly obtained by fishing.",
    "tripwire hook": "A tripwire hook can be crafted by placing an iron ingot on top of a stick on top of a wood plank in a crafting table.",
    "oak wood stairs": "All types of stairs can be crafted by placing the desired material in all squares but the top middle, top right, and middle right squares in a crafting table.",
    "mine cart with command block": "A mine cart with a command block can not be obtained without cheats.",
    "eye of ender": "An eye of ender can be crafted by placing blaze power next to an ender pearl in a crafting window.",
    "block of coal": "A block of coal can be crafted by placing coal in a three by three grid in a crafting window.",
    "nether star": "A Nether Star can be obtained by defeating the Wither.",
    "gravel": "Gravel can be obtained by breaking gravel blocks",
    "blue wool": "Blue wool can be crafted by placing lapis lazuli next to any color wool in a crafting window.",
    "nether quartz": "Nether Quartz can be obtained by smelting Nether Quartz Ore in a furnace.",
    "rotten flesh": "Rotten flesh can be randomly obtained by killing zombies.",
    "magenta carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "white stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "birch fence gate": "Any type of fence gate can be crafted by placing a stick, a wooden plank, and then another stick across the bottom two rows in a crafting table.",
    "carrots": "Carrots can be rarely obtained by killing zombies or, they can be naturally found as crops in villages.",
    "purple dye": "Purple dye can be crafted by placing lapis lazuli next to rose red in a crafting window.",
    "lapis lazuli block": "A lapis lazuli block can be obtained by entirely filling a crafting table with lapis lazuli.",
    "obsidian": "Obsidian can be mined with a diamond pick or created by placing water on top of lava. ",
    "mellohi disc": "A random music disc has a possibility of dropping when a Skeleton's Arrow kills a Creeper. Alternately, music discs are found in eight percent of dungeon chests.",
    "gray wool": "Gray wool can be crafted by placing gray dye next to any color wool in a crafting window.",
    "trapped chest": "A trapped chest can be crafted by placing a tripwire hook next to a chest in a crafting window.",
    "light gray stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "iron pick ax": "All types of pick axes can be crafted by placing three of the desired material across the top row, and then placing sticks in the center and bottom middle squares in a crafting table.",
    "red mushroom": "Red mushrooms can be found naturally in darkly lit areas, mushroom biomes, or the nether.",
    "puffer fish": "A puffer fish can be randomly obtained by fishing.",
    "emerald": "Emeralds can be obtained by harvesting emerald ore.",
    "wooden shovel": "All types of shovels can be crafted by placing the desired material in the top middle square, and then sticks in the two squares directly beneath that in a crafting table.",
    "golden helmet": "All helmets are crafted by placing the desired material in all squares but the very center square and the bottom row in a crafting table/",
    "melon": "A melon can be found naturally in jungles or can be grown from melon seeds found in chest mine carts in abandoned mine shafts.",
    "clay block": "Clay is commonly found at the bottoms of rivers and lakes in shallow, circular patches. Clay blocks can also be found commonly in swamps.",
    "anvil": "An anvil can be crafted by placing three blocks of iron across the top row, an iron ingot in the very center square, and then three iron ingots across the bottom row in a crafting table.",
    "daylight sensor": "A daylight sensor can be crafted by placing three glass across the top row, three nether quartz across the middle grow, anad three wooden slabs across the bottom row in a crafting table.",
    "lead": "A lead can be crafted by placing a slime ball in the very center, and then placing string in the top left, top middle, left middle, and bottom right squares in a crafting table.",
    "sandstone": "Sandstone can be obtained in deserts or crafted by combining sand together in a two by two square.",
    "leather tunic": "All chest pieces are crafted by placing the desired material in all squares but the top middle square in a crafting table.",
    "black stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "lime stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "mine cart with t.n.t": "A Mine cart with T.N.T can be crafted by placing a T.N.T on top of a Mine cart in a crafting table.",
    "clock": "A clock is crafted by placing red stone in the very center square and surrounding it with four gold ingots in a crafting table.",
    "black carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "cocoa": "Cocoa beans come from cocoa pods, which are naturally found in jungle biomes. Cocoa beans are used as brown dye in minecraft.",
    "gold ingot": "Gold ingots can be obtained by smelting gold ore in a furnace.",
    "stone brick slab": "A stone brick slab can be crafted by placing three stone bricks in a row in a crafting table.",
    "clown fish": "A clown fish can be randomly obtained by fishing.",
    "pumpkin seeds": "Pumpkin seeds can be crafted by placing a pumpkin in a crafting window.",
    "mossy stone brick": "Mossy stone brick can be crafted by placing vines next to stone bricks in a crafting window. Mossy stone brick can also be found naturally in strongholds.",
    "cobweb": "Cobwebs can be obtained by using shears or a sword that is enchanted with silk touch",
    "milk bucket": "A milk bucket can be obtained by right clicking on a cow with an iron bucket.",
    "iron helmet": "All helmets are crafted by placing the desired material, in all squares but the very center square, and the bottom row, in a crafting table.",
    "yellow stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "light gray stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "diamond": "Diamond can be obtained by breaking diamond ore with an iron pick ax or better.",
    "stone sword": "All types of swords can be crafted by placing the desired material in the top middle and very center square, with a stick beneath them, in a crafting table",
    "cobblestone stairs": "All types of stairs can be crafted by placing the desired material in all squares but the top middle, top right, and middle right squares in a crafting table.",
    "bed": "A bed can be crafted by placing three wool across the top row and three wooden planks across the middle row in a crafting table.",
    "birch wood": "All types of wood can be obtained by breaking the tree they naturally grow into.",
    "quartz slab": "A quartz slab can be crafted by placing three quartz blocks in a row in a crafting table.",
    "sponge": "Sponges can be obtained by killing an elder guardian or randomly finding them in ocean monuments",
    "skeleton mob head": "Mob heads can be obtained by having a charged creeper blow up the mob whose head you want to obtain.",
    "bucket": "A bucket can be crafted by placing three iron ingots in a V shape in a crafting table.",
    "diamond sword": "All types of swords can be crafted by placing the desired material in the top middle and very center square, with a stick beneath them, in a crafting table",
    "golden shovel": "All types of shovels can be crafted by placing the desired material in the top middle square, and then sticks in the two squares directly beneath that in a crafting table.",
    "spruce wood stairs": "All types of stairs can be crafted by placing the desired material in all squares but the top middle, top right, and middle right squares in a crafting table.",
    "iron bars": "Iron bars can be crafted by placing six iron ingots across the bottom two rows in a crafting table. Iron bars can also be found naturally in strongholds.",
    "raw rabbit": "Raw rabbit can be randomly obtained by killing a rabbit.",
    "yellow carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "carrot on a stick": "A carrot on a stick can be crafted by placing a fishing pole in the middle left square and a carrot in the bottom middle square in a crafting window.",
    "raw pork chop": "A raw pork chop can be obtained by killing a pig.",
    "furnace": "A furnace can be crafted by placing cobblestone in every square but the middle square in a crafting table.",
    "nether brick fence": "A nether brick fence can be crafted by placing six nether brick across the bottom two rows in a crafting table.",
    "fence": "Any type of fence can be crafted by putting a wooden plank, a stick, and then another wooden plank in the bottom two rows of a crafting table.",
    "diamond horse armor": "Horse Armor can be randomly found in Dungeons, Nether fortresses, Village blacksmiths, jungle temples, desert temples, and stronghold chests.",
    "red sandstone slab": "All types of slabs can be crafted by placing three of the desired materials across a row in a crafting table.",
    "birch wood plank": "Birch wood planks can be obtained by placing birch wood in a crafting table.",
    "bedrock": "Bedrock can not be obtained by a player without cheats. It is the bottom most block in the game.",
    "saddle": "Saddles can not be crafted and can only be obtained by finding them in chests inside dungeons, abandoned mine shafts, nether fortresses, desert temples, or jungle temples.",
    "light gray dye": "Light gray dye can be crafted by placing two bone meal in a vertical row next to an ink sac in a crafting window.",
    "jungle leaves": "All leaves can be obtained by using a shear on the desired leaf.",
    "blocks disc": "A random music disc has a possibility of dropping when a Skeleton's Arrow kills a Creeper. Alternately, music disc are found in eight percent of dungeon chest.",
    "pumpkin": "Pumpkins can be rarely be found on grass in most biomes.",
    "baked potato": "A baked potato can be obtained by smelting a potato in a furnace.",
    "leather": "Leather can be randomly obtained by killing cows or horses.",
    "light gray carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "iron boots": "All boots are crafted by placing the desired material in the middle left, bottom left, middle right, and bottom right squares of a crafting table.",
    "end stone": "End stone can be found naturally in the end dimension.",
    "chainmail leggings": "Chainmail armor can only be obtained by trading with a villager or getting a rare drop off of a mob.",
    "rabbit's foot": "A rabbit's foot can be obtained rarely by killing a rabbit.",
    "glass": "Glass can be obtained by smelting sand in a furnace.",
    "stone": "Stone can be made by smelting cobblestone in a furnace.",
    "prismarine": "Prismarine can be crafted by placing prismarine shards in a two by two grid in a crafting window.",
    "compass": "A compass is crafted by placing red stone in the very center square, and surrounding it with four iron ingots, in a crafting table.",
    "green stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "gold leggings": "All leggings are crafted by placing the desired material in all squares but the center square and bottom middle square in a crafting table.",
    "command block": "Command blocks can not be obtained without cheats in minecraft.",
    "dispenser": "A dispenser can be created by placing a bow in the very center square, red stone right beneath that, and cobblestone in every other square.",
    "poisonous potato": "A poisonous potato will randomly be dropped when harvesting potatoes.",
    "apple": "Apples randomly drop from oak and dark oak leaves. They can also be randomly found in chests in strongholds or villages.",
    "red flower": "Poppies can be found naturally on grass or created randomly by using bone meal on grass.",
    "magenta dye": "Magenta dye can be crafted by placing purple dye next to pink dye in a crafting window.",
    "brown carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "prismarine shard": "Prismarine Shards can be obtained by defeating Guardians and Elder Guardians.",
    "red stone block": "A red stone block can be crafted by placing nine red stone in a three by three grid in a crafting table.",
    "yellow stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "dandelion yellow": "Dandelion yellow is the equivalent of yellow dye in minecraft. It can be crafted by placing a dandelion or a sunflower in a crafting window.",
    "acacia wood stairs": "All types of stairs can be crafted by placing the desired material in all squares but the top middle, top right, and middle right squares.",
    "sandstone slab": "A sandstone slab can be crated by placing three sandstone blocks in a row in a crafting table.",
    "gray carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "polished granite": "Polished Granite can be crafted by placing four granite in a two by two grid in a crafting table.",
    "mine cart": "A mine cart is crafted by placing five iron ingots in a U shape in a crafting table.",
    "brown stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "cyan stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "book": "A book is crafted by creating a two by two grid where the bottom right square is leather and all other squares are paper in a crafting window.",
    "mine cart with a chest": "A mine cart with a chest is crafted by placing a chest on top of a mine cart in a crafting window.",
    "acacia sapling": "Acacia saplings can be randomly obtained by breaking acacia leaves.",
    "paper": "Paper is crafted by placing three sugar cane, across a row, in a crafting table.",
    "gold chest plate": "All chest plates are crafted by placing the desired material in all squares but the top middle square in a crafting table.",
    "cyan stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "mushroom stew": "Mushroom stew is crafted by placing a red mushroom in the middle left square, a brown mushroom in the very center square, and a bowl in the bottom middle square in a crafting table.",
    "nether brick": "Nether Brick can be mined with a pick ax, or crafted by placing four Nether Bricks in a two by two square in a crafting table.",
    "magma cream": "Magma cream can be crafted by placing blaze powder next to a slime ball in a crafting window.",
    "snow": "Snow can be crafted by placing snowballs in a two by two grid in a crafting window.",
    "orange dye": "Orange dye can be crafted by placing rose red next to dandelion yellow in a crafting window.",
    "potion": "A potion is created by utilizing a brewing stand, cauldron, and water bottles.",
    "lime stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "white stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "boat": "A boat can be obtained by making a U shape with five wooden planks.",
    "dark prismarine": "Dark prismarine can be crafted by placing an ink sac in the very center square, and then eight placing prismarine shards around it.",
    "oak door": "A Oak Door can be crafted by placing six Oak Planks down the first two columns.",
    "cocoa beans": "Cocoa beans come from cocoa pods, which are naturally found in jungle biomes. Cocoa beans are used as brown dye in minecraft.",
    "oak wood": "All types of wood can be obtained by breaking the tree they naturally grow into.",
    "red wool": "Red wool can be crafted by placing rose red next to any color wool in a crafting window.",
    "cooked mutton": "Cooked mutton can be obtained by cooking raw mutton in a furnace. Alternately, one to two pieces of Cooked Mutton are dropped when a sheep dies while on fire.",
    "dark oak fence": "Any type of fence can be crafted by putting a wooden plank, a stick, and then another wooden plank in the bottom two rows of a crafting table.",
    "iron door": "An Iron Door can be crafted by placing six Iron Ingots down the first two columns.",
    "painting": "A painting is crafted by placing wool in the very center square and surrounding it with eight sticks.",
    "spruce leaves": "All leaves can be obtained by using a shear on the desired leaf.",
    "pink stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "acacia wood slab": "All types of slabs can be crafted by placing three of the desired materials across a row in a crafting table.",
    "dark oak wood slab": "All types of slabs can be crafted by placing three of the desired materials across a row in a crafting table.",
    "chiseled sandstone": "Chiseled sandstone can be created by placing a sandstone slab on top of a sandstone slab, in a crafting window.",
    "oak wood plank": "Oak wood planks can be obtained by placing oak wood in a crafting table.",
    "cooked salmon": "Cooked salmon is obtained by cooking salmon in a furnace.",
    "iron shovel": "All types of shovels can be crafted by placing the desired material in the top middle square, and then sticks in the two squares directly beneath that in a crafting table.",
    "enchanting table": "An enchanting table can be crafted by placing a book in the top middle square, diamonds in the middle left and middle right squares, and obsidian in the very center and across the bottom row, in a crafting table.",
    "red stone repeater": "A red stone repeater can be crafted by placing smooth stone in all three squares across the bottom row, red stone in the very middle square, and red stone torches on both sides of the red stone.",
    "far disc": "A random music disc has a possibility of dropping when a Skeleton's Arrow kills a Creeper. Alternately, music disc are found in eight percent of dungeon chest.",
    "green carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "iron ingot": "Iron ingots can be obtained by smelting iron ore in a furnace.",
    "orange wool": "Orange wool can be crafted by placing orange dye next to any color wool in a crafting window.",
    "jungle sapling": "Jungle saplings can be randomly obtained by breaking jungle leaves.",
    "stone slab": "A stone slab can be crafted by placing three stone blocks in a row in a crafting table.",
    "light blue stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "cyan dye": "Cyan dye can be crafted by placing lapis lazuli next to cactus green in a crafting window.",
    "steak": "Raw Beef can be cooked into Steak by smelting it in a furnace. Alternately, Steak has a chance of dropping when a Cow or Moo shroom dies while on fire.",
    "orange stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "blue stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "spruce fence": "Any type of fence can be crafted by putting a wooden plank, a stick, and then another wooden plank in the bottom two rows of a crafting table.",
    "coal": "Coal can be obtained by breaking a coal ore block with a wooden pick ax or better.",
    "potatoes": "Potatoes can be rarely obtained by killing zombies or, they can be found as crops in villages.",
    "light gray stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "fence gate": "Any type of fence gate can be crafted by placing a stick, a wooden plank, and then another stick across the bottom two rows in a crafting table.",
    "egg": "Eggs are randomly produced by chickens. Throwing an egg has a chance to create a new chicken.",
    "spruce wood plank": "Spruce wood planks can be obtained by placing spruce wood in a crafting table.",
    "orange stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "acacia wood": "All types of wood can be obtained by breaking the tree they naturally grow into.",
    "light gray wool": "Light gray wool can be crafted by placing light gray dye next to any color wool in a crafting window.",
    "hay bale": "A hay bale can be crafted by placing wheat in a three by three grid in a crafting table.",
    "clay": "Clay is obtained by breaking clay blocks with a non silk touch tool.",
    "bowl": "A bowl can be crafted by placing three wooden planks in a v shape in a crafting table.",
    "leather helmet": "All helmets are crafted by placing the desired material in all squares but the very center square and the bottom row in a crafting table/",
    "pink stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "diamond chest plate": "All chest plates are crafted by placing the desired material in all squares but the top middle square in a crafting table.",
    "gray stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "yellow stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "snowman": "A snow golem can be created by placing a pumpkin on top of  two snow blocks on the ground.",
    "diamond ore": "Diamond ore can be found in the bottom sixteen layers on the map. One can break diamond ore with an iron pick ax or better. This will cause the diamond ore to break into a diamond. To obtain the ore, you will need to use a pick ax with the silk touch enchant.",
    "banner": "A Banner can be crafted by placing six wool across the top two rows, then placing a stick on the bottom middle. The banner will take on the color of the wool you choose.",
    "stone ax": "All types of axes can be crafted by placing three of the desired material in the top left, top middle, and middle left squares, with sticks in the center and bottom middle squares in a crafting table.",
    "firework star": "A firework star can be crafted by placing gunpower in the middle left square and any color dye in the center square in a crafting table. A firework star can also be crafted with optional ingredients such as diamonds, glow stone dust, or feathers, that are placed directly beneath the dye in a crafting table.",
    "nether wart": "Nether warts can be naturally found in nether fortresses as a plant.",
    "red stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "quartz block": "A quartz block can be crafted by placing four nether quartz in a two by two grid in a crafting table.",
    "poppy": "Poppies can be found naturally on grass or created randomly by using bone meal on grass.",
    "acacia fence": "Any type of fence can be crafted by putting a wooden plank, a stick, and then another wooden plank in the bottom two rows of a crafting table.",
    "cactus": "Cactus can be found naturally in desert biomes. ",
    "spruce door": "A Spruce Door can be crafted by placing six Spruce Planks down the first two columns.",
    "cat disc": "A random music disc has a possibility of dropping when a Skeleton's Arrow kills a Creeper. Alternately, music disc are found in eight percent of dungeon chest.",
    "flint and steel": "Flint and steel can be crafted by placing an iron ingot to the left of flint in a crafting window.",
    "gold pants": "All leggings are crafted by placing the desired material in all squares but the center square and bottom middle square in a crafting table.",
    "slime ball": "Slime balls are randomly dropped by killing slimes.",
    "cooked porkchop": "A cooked porkchop can be obtained by cooking a raw porkchop in a furnace or by lighting a pig on fire.",
    "polished andesite": "Polished Andesite can be crafted by placing four andesite in a two by two grid in a crafting table.",
    "prismarine bricks": "Prismarine bricks can be crafted by placing prismarine shards in a three by three grid in a crafting table.",
    "wither": "A wither can be created by placing three wither skulls on top of soul sand that is placed on the ground in a T shape.",
    "lime dye": "Lime dye can be crafted by placing cactus green next to bone meal in a crafting window.",
    "blue carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "door": "A door can be crafted by placing six Planks, down the first two columns, in a crafting table.",
    "tripwire": "Tripwire is simply string next to a tripwire hook.",
    "enchantment table": "An enchantment table can be crafted by placing a book in the top middle square, diamonds in the middle left and middle right squares, and obsidian in the very center and across the bottom row, in a crafting table.",
    "cyan carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "polished diorite": "Polished Diorite can be crafted by placing four diorite in a two by two grid in a crafting table.",
    "golden boots": "All boots are crafted by placing the desired material in the middle left, bottom left, middle right, and bottom right squares of a crafting table.",
    "iron block": "An iron block can be crafted by placing iron ingots in a three by three grid in a crafting table.",
    "acacia leaves": "All leaves can be obtained by using a shear on the desired leaf.",
    "dark oak sapling": "Dark oak saplings can be randomly obtained by breaking dark oak leaves",
    "diamond hoe": "All types of hoes can be crafted by placing two of the desired material in the top left, and top middle squares, with sticks in the center and bottom middle squares in a crafting table.",
    "dandelion": "Dandelions can be found naturally on grass or created randomly by using bone meal on grass.",
    "lapis lazuli": "Can be obtained by breaking lapis lazuli ore with a stone pick ax or better",
    "sugar cane": "Sugar cane can be found naturally near water,",
    "birch door": "A Birch Door can be crafted by placing six Birch Planks down the first two columns.",
    "cactus green": "Cactus green can be crafted by smelting a cactus in a furnace.",
    "gold block": "A gold block can be crafted by placing gold ingots in a three by three grid in a crafting table.",
    "smooth sandstone": "Smooth sandstone can be created by placing sandstone in a two by two grid in a crafting window",
    "magenta stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "note block": "A note block is crafted by placing red stone in the very center square and wooden planks all around that in a crafting table",
    "snow block": "Snow can be crafted by placing snowballs in a two by two grid in a crafting window.",
    "mob head": "Mob heads can be obtained by having a charged creeper blow up the mob whose head you want to obtain.",
    "diamond leggings": "All leggings are crafted by placing the desired material in all squares but the center square and bottom middle square in a crafting table.",
    "red sandstone": "Red sandstone can be crafted by placing four red sand in a two by two grid in a crafting window.",
    "orange stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "slime block": "A slime block can be crafted by placing slime balls in a three by three grid in a crafting window.",
    "bookshelf": "A bookshelf is crafted by placing books across the middle row and wooden planks across the top and bottom rows",
    "cake": "Cake can be crafted by placing three buckets of milk across the top row, sugar in the left middle, and right middle squares, an egg in the very center square, and three wheat across the bottom squares in a crafting table.",
    "wooden button": "A wooden button can be crafted by placing a single wooden plank in a crafting window.",
    "chiseled quartz block": "A chiseled quartz block can be obtained by placing a quartz slab on top of a quartz slab in a crafting table.",
    "stone button": "A stone button can be crafted by placing a single piece of smooth stone in a crafting window.",
    "glow stone dust": "Glow stone dust is obtained by breaking glow stone blocks.",
    "lime stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "cobblestone wall": "A cobblestone wall is crafted by placing six cobblestone across the bottom two rows in a crafting table.",
    "name tag": "Name Tags can only be obtained in three ways. The first way is by finding it in a Dungeon chest. The second way is by fishing. The last way Name Tags can be obtained is by trading with the Librarian Villagers for twenty to twenty two Emeralds.",
    "gunpowder": "Gunpowder can be randomly obtained by killing creepers.",
    "blaze powder": "Blaze powder can be obtained by placing a blaze row in a crafting window.",
    "brewing stand": "A brewing stand can be crafted by placing a blaze rod in the center square, and three cobblestone across the bottom row in a crafting table.",
    "torch": "A torch can be crafted by placing a piece of coal on top of a stick.",
    "yellow wool": "Yellow wool can be crafted by placing dandelion yellow next to any color wool in a crafting window.",
    "watermelon": "A melon can be found naturally in jungles or can be grown from melon seeds found in chest minecarts in abandoned mine shafts.",
    "wait disc": "A random music disc has a possibility of dropping when a Skeleton's Arrow kills a Creeper. Alternately, music disc are found in eight percent of dungeon chest.",
    "glistering melon": "A glistering melon can be crafted by placing a melon in the very center square and surrounding it with eight gold nuggets in a crafting table.",
    "netherrack": "Netherrack can be found commonly throughout the Nether dimension.",
    "leather chest plate": "All chest places are crafted by placing the desired material in all squares but the top middle square in a crafting table.",
    "wooden slab": "A wooden slab can be crafted by placing three wooden planks in a row in a crafting table.",
    "nether brick stairs": "All types of stairs can be crafted by placing the desired material in all squares but the top middle, top right, and middle right squares in a crafting table.",
    "ice": "Ice can be found naturally in snow biomes. If broken, or placed near a heat source, ice will turn into water. To obtain an ice block, one would need to mine it with a silk touch pick ax.",
    "large fern": "Large ferns are naturally found in jungle, taiga, and mega taiga biomes.",
    "nether brick slab": "A nether brick slab can be crafted by placing three nether brick in a row in a crafting table.",
    "spruce wood slab": "All types of slabs can be crafted by placing three of the desired materials across a row in a crafting table.",
    "iron hoe": "All types of hoes can be crafted by placing two of the desired material in the top left, and top middle squares, with sticks in the center and bottom middle squares in a crafting table.",
    "fern": "Ferns are naturally found in jungle, taiga, and mega taiga biomes.",
    "sea lantern": "A sea lantern can be crafted by placing prismarine shards in the four corners of a crafting table, and then placing prismarine crystals in every other square.",
    "cookie": "A cookie can be crafted by placing wheat, horizontally, on both sides of cocoa beans in a crafting table.",
    "melon seeds": "Melon seeds can be crafted by placing a slice of melon in a crafting window.",
    "gold nugget": "A gold nugget can be crafted by placing a single gold ingot into a crafting window. They can also be randomly obtained by killing a zombie pig men.",
    "red stone ore block": "Redstone ore can be found in the bottom sixteen layers on the map. If broken with an iron pick ax or better, it will drop some amount of red stone. To obtain the ore itself, one would need to use a pick ax with a silk touch enchant.",
    "diamond helmet": "All helmets are crafted by placing the desired material in all squares but the very center square and the bottom row in a crafting table.",
    "spruce fence gate": "Any type of fence gate can be crafted by placing a stick, a wooden plank, and then another stick across the bottom two rows in a crafting table.",
    "golden hoe": "All types of hoes can be crafted by placing two of the desired material in the top left, and top middle squares, with sticks in the center and bottom middle squares in a crafting table.",
    "acacia wood plank": "Acacia wood planks can be obtained by placing acacia wood in a crafting table",
    "diamond pick ax": "All types of pick axes can be crafted by placing three of the desired material across the top row, and then placing sticks in the center and bottom middle squares in a crafting table.",
    "lapis lazuli ore": "Lapis Lazuli Ore can be only be obtained by using a pick ax with the silk touch enchant.",
    "raw mutton": "Raw mutton can be obtained by killing a sheep.",
    "quartz stairs": "All types of stairs can be crafted by placing the desired material in all squares but the top middle, top right, and middle right squares in a crafting table.",
    "brick block": "A brick block can be crafted by placing clay bricks in a two by two grid in a crafting window.",
    "cobblestone slab": "A cobblestone slab can be crafted by placing three cobblestone blocks in a row in a crafting table.",
    "emerald ore": "Emerald ore can only be found in extreme hills biomes between layers four and thirty-two. It can be mined with an iron pick ax or better to obtain an emerald. To obtain the ore itself, you will need a silk touch pick ax.",
    "yellow flower": "Dandelions can be found naturally on grass or created randomly by using bone meal on grass.",
    "jack o'lantern": "A jack o'lantern can be crafted by placing a pumpkin on top of a torch in a crafting table.",
    "red stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "iron leggings": "All leggings are crafted by placing the desired material in all squares but the center square and bottom middle square in a crafting table.",
    "pink stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "black dye": "An ink sack is used as black dye in mine craft.",
    "wooden hoe": "All types of hoes can be crafted by placing two of the desired material in the top left, and top middle squares, with sticks in the center and bottom middle squares in a crafting table.",
    "purple stained glass": "Any type of stained glass can be crafted by placing the desired color dye in the center square, and glass surrounding that.",
    "mine cart with chest": "A mine cart with a chest is crafted by placing a chest on top of a mine cart in a crafting window.",
    "detector rail": "A detector rail can be crafted by placing a stone pressure plate in the very center square, red stone in the bottom middle square, and iron ingots in the far left and far right columns",
    "cyan wool": "Cyan wool can be crafted by placing cyan dye next to any color wool in a crafting window.",
    "iron chestplate": "All chestplates are crafted by placing the desired material in all squares but the top middle square in a crafting table.",
    "cobblestone": "Cobblestone can be obtained by breaking stone with a pick ax.",
    "dark oak wood stairs": "All types of stairs can be crafted by placing the desired material in all squares but the top middle, top right, and middle right squares.",
    "creeper mob head": "Mob heads can be obtained by having a charged creeper blow up the mob whose head you want to obtain.",
    "carrot": "Carrots can be rarely obtained by killing zombies or, they can be naturally found as crops in villages.",
    "rabbit hide": "Rabbit hide can be randomly obtained by killing a rabbit.",
    "grass": "When harvested with a regular shovel, grass turns into dirt. In order to obtain a grass block you will need to have a shovel with the silk touch enchant.",
    "strad disc": "A random music disc has a possibility of dropping when a Skeleton's Arrow kills a Creeper. Alternately, music disc are found in eight percent of dungeon chest.",
    "birch sapling": "Birch saplings can be randomly obtained by breaking birch leaves.",
    "mossy stone": "Mossy stone can be crafted by placing vines next to cobblestone in a crafting table. It can also be found naturally in various dungeons.",
    "pink dye": "Pink dye can be crafted by placing bone meal next to rose red in a crafting window.",
    "red stone torch": "A red stone torch is crafted by placing red stone on top of a torch in a crafting window.",
    "green stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "tall grass": "Tall grass, which is called grass in a players inventory, spawns on grass blacks in certain biomes. Bonemeal can be used on a grass block to grow tall grass and occasionally flowers.",
    "black wool": "Black wool can be crafted by placing an ink sac next to any color wool in a crafting window.",
    "wheat crops": "Wheat can be found naturally in villages or can be grown from seeds that one can obtain by breaking tall grass.",
    "ender pearl": "Ender pearls can be randomly obtained by killing ender men.",
    "moss stone": "Moss stone can be crafted by placing vines next to cobblestone in a crafting table. It can also be found naturally in various dungeons.",
    "fishing rod": "A fishing rod is crafted by placing three sticks in a diagonal line, and then two string beneath the top right stick in a crafting window.",
    "bone meal": "Bone meal can be crafted by placing a bone into a crafting window.",
    "quartz": "Nether Quartz can be obtained by smelting Nether Quartz Ore in a furnace.",
    "dark oak wood plank": "Dark oak wood planks can be obtained by placing dark oak wood in a crafting table.",
    "powered rail": "A powered rail can be crafted by placing a stick in the very center square, red stone in the bottom middle square, and gold ingots in the far left and far right columns",
    "beacon": "A beacon can be obtained by placing a nether star in the very center square, three obsidian across the bottom row, and five glass in the remaining squares in a crafting table.",
    "blue stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "dark oak door": "A Dark Oak Door can be crafted by placing six Dark Oak Planks down the first two columns.",
    "iron golem": "An iron golem can be created by similarly to a snow golem. Place a pumpkin head on top of two iron blocks. Then place two more iron blocks on either side of the very center iron block.",
    "spruce wood": "All types of wood can be obtained by breaking the tree they naturally grow into.",
    "pink wool": "Pink wool can be crafted by placing pink dye next to any color wool in a crafting window.",
    "fire charge": "A fire charge can be crafted by placing blaze powder in the middle left square, coal in the very center square, and gunpowder in the bottom middle square in a crafting table.",
    "acacia door": "An Acacia Door can be crafted by placing six Acacia Planks down the first two columns.",
    "iron pants": "All leggings are crafted by placing the desired material in all squares but the center square and bottom middle square in a crafting table.",
    "chirp disc": "A random music disc has a possibility of dropping when a Skeleton's Arrow kills a Creeper. Alternately, music disc are found in eight percent of dungeon chest.",
    "oak leaves": "All leaves can be obtained by using a shear on the desired leaf.",
    "arrow": "An arrow can be crafted by placing flint in the top middle square, a stick in the very center square, and a feather in the bottom middle square in a crafting table.",
    "wooden ax": "All types of axes can be crafted by placing three of the desired material in the top left, top middle, and middle left squares, with sticks in the center and bottom middle squares in a crafting table.",
    "glass pane": "A glass pane can be crafted by placing six glass blocks across the bottom two rows in a crafting table.",
    "gold helmet": "All helmets are crafted by placing the desired material in all squares but the very center square and the bottom row in a crafting table.",
    "ender chest": "An ender chest can be crafted by placing an eye of ender in the center square, and then surrounding that with eight obsidian blocks in a crafting table.",
    "light blue wool": "Light blue wool can be crafted by placing light blue dye next to any color wool in a crafting window.",
    "string": "String can be randomly obtained by killing spiders or by breaking cobwebs.",
    "red sandstone stairs": "All types of stairs can be crafted by placing the desired material in all squares but the top middle, top right, and middle right squares in a crafting table.",
    "purple wool": "Purple wool can be crafted by placing purple dye next to any color wool in a crafting window.",
    "cyan stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows.",
    "black stained clay": "Any type of stained clay can be crafted by placing the appropriate dye in the center square and hardened clay surrounding it.",
    "enchanted book": "Enchanted books can be found in chests located in dungeons, strongholds, desert temples, jungle temples, and mine shafts.",
    "button": "A button can be crafted by placing either a single piece of smooth stone or a single wooden plank in a crafting window.",
    "lime wool": "Lime wool can be crafted by placing lime dye next to any color wool in a crafting window.",
    "coarse dirt": "Coarse dirt can be obtained by breaking dirt in the Mega Taiga, Mesa, or Savanna biomes.",
    "ghast tear": "Ghast tears can be rarely obtained by killing ghasts.",
    "mine cart with a furnace": "A mine cart with a furnace is crafted by placing a furnace on top of a mine cart in a crafting window.",
    "wheat": "Wheat can be found naturally in villages or can be grown from seeds that one can obtain by breaking tall grass.",
    "soul sand": "Soul sand can be found commonly throughout the Nether dimension.",
    "brown mushroom": "Brown mushrooms can be found naturally in darkly lit areas, mushroom biomes, or the nether.",
    "chainmail helmet": "Chainmail armor can only be obtained by trading with a villager or getting a rare drop off of a mob.",
    "written book": "A written book is created after a book and quill is signed.",
    "spruce sapling": "Spruce saplings can be randomly obtained by breaking spruce leaves.",
    "oak sapling": "Oak saplings can be randomly obtained by breaking oak leaves.",
    "inverted daylight sensor": "An inverted daylight sensor can be created by right clicking on a daylight sensor.",
    "sandstone stairs": "All types of stairs can be crafted by placing the desired material in all squares but the top middle, top right, and middle right squares in a crafting table.",
    "red stone lamp": "A red stone lamp can be crafted by placing glow stone in the very center square, and surrounding it with four red stone in a crafting table.",
    "crafting table": "A crafting table is crafted by placing wooden planks in a two by two grid in a crafting window.",
    "glow stone": "Glow stone can be found on the ceiling in the Nether dimension.",
    "wooden pressure plate": "A wooden pressure plate can be created by placing two wooden planks, horizontally, next to each other in a crafting window.",
    "charcoal": "Charcoal can be obtained by burning wood blocks in a furnace.",
    "chainmail boots": "Chainmail armor can only be obtained by trading with a villager or getting a rare drop off of a mob.",
    "ladder": "A ladder is crafted by placing sticks in every square but the top middle and bottom middle square.",
    "mossy cobblestone": "Mossy cobblestone can be crafted by placing vines next to cobblestone in a crafting table. It can also be found naturally in various dungeons.",
    "golden pick ax": "All types of pick axes can be crafted by placing three of the desired material across the top row, and then placing sticks in the center and bottom middle squares in a crafting table.",
    "seeds": "Wheat seeds can be randomly found by breaking tall grass.",
    "acacia fence gate": "Any type of fence gate can be crafted by placing a stick, a wooden plank, and then another stick across the bottom two rows in a crafting table.",
    "birch wood stairs": "All types of stairs can be crafted by placing the desired material in all squares but the top middle, top right, and middle right squares in a crafting table.",
    "ward disc": "A random music disc has a possibility of dropping when a Skeleton's Arrow kills a Creeper. Alternately, music disc are found in eight percent of dungeon chest.",
    "music disc": "A random music disc has a possibility of dropping when a Skeleton's Arrow kills a Creeper. Alternately, music disc are found in eight percent of dungeon chest.",
    "enchanted golden apple": "An enchanted golden apple is crafted by placing an apple in the very center square and surrounding it with eight gold blocks.",
    "white carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "iron sword": "All types of swords can be crafted by placing the desired material in the top middle and very center square, with a stick beneath them, in a crafting table",
    "diamonds pants": "All leggings are crafted by placing the desired material in all squares but the center square and bottom middle square in a crafting table.",
    "chiseled red sandstone": "Chiseled red sandstone can be crafted by placing a red sandstone slab on top of a red sandstone slab in a crafting window.",
    "stone brick stairs": "All types of stairs can be crafted by placing the desired material in all squares but the top middle, top right, and middle right squares in a crafting table.",
    "pressure plate": "A pressure plate can be created by placing either two smooth stone or two wooden planks next to each other, horizontally, in a crafting window.",
    "jungle wood plank": "Jungle wood planks can be obtained by placing jungle wood in a crafting table",
    "green wool": "Green wool can be crafted by placing cactus green next to any color wool in a crafting window.",
    "sugar canes": "Sugar canes occur naturally near water.",
    "bow": "A bow can be crafted by placing three string in the rightmost column and then placing tree sticks in a less than sign pattern next to the string in a crafting table.",
    "lime carpet": "Any type of carpet can be crafted by placing two wool, of the same color, next to each other in a crafting window.",
    "flint": "Flint is randomly dropped while breaking gravel.",
    "black stained glass pane": "Any type of stained glass pane can be crafted by placing the same color stained glass, horizontally, in the bottom two rows."
	*/
};

ExampleUtterances.txt

snippets
DefineIntent what is a {Term}
DefineIntent what is an {Term}
DefineIntent what is {Term}
DefineIntent what is the definition for a {Term}
DefineIntent what is the definition for an {Term}
DefineIntent what is the definition for {Term}
DefineIntent what's a {Term}
DefineIntent what's an {Term}
DefineIntent what's {Term}
DefineIntent what's the definition for a {Term}
DefineIntent what's the definition for an {Term}
DefineIntent what's the definition for {Term}
DefineIntent define {Term}
DefineIntent define a {Term}
DefineIntent {Term}

index.js

JavaScript
/**
    Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.

    Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at

        http://aws.amazon.com/apache2.0/

    or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/**
 * This sample shows how to create a Lambda function for handling Alexa Skill requests that:
 *
 * - Custom slot type: demonstrates using custom slot types to handle a finite set of known values
 *
 * Examples:
 * One-shot model:
 *  User: "Alexa, ask Minecraft Helper how to make paper."
 *  Alexa: "(reads back recipe for paper)"
 */

'use strict';

var AlexaSkill = require('./AlexaSkill'),
    definitions = require('./definitions');

var APP_ID = undefined;//'amzn1.echo-sdk-ams.app.04cb6707-4d3e-44a0-a3fa-d6f432712a20'; // HEY DUMMY - replace with 'amzn1.echo-sdk-ams.app.[your-unique-value-here]'; '

/**
 * DroneFacts is a child of AlexaSkill.
 * To read more about inheritance in JavaScript, see the link below.
 *
 * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript#Inheritance
 */
var DroneFacts = function () {
    AlexaSkill.call(this, APP_ID);
};

// Extend AlexaSkill
DroneFacts.prototype = Object.create(AlexaSkill.prototype);
DroneFacts.prototype.constructor = DroneFacts;

//welcome message
DroneFacts.prototype.eventHandlers.onLaunch = function (launchRequest, session, response) {
    var speechText = "DroneFacts has been activated. I can define terms for you, for example... What is a VTX?";
    // If the user either does not reply to the welcome message or says something that is not
    // understood, they will be prompted again with this text.
    var repromptText = "For help with what you can say, say help me.";
    response.ask(speechText, repromptText);
};

/*
tell: function (speechOutput)
tellWithCard: function (speechOutput, cardTitle, cardContent)
ask: function (speechOutput, repromptSpeech) {
askWithCard: function (speechOutput, repromptSpeech, cardTitle, cardContent)
*/

DroneFacts.prototype.intentHandlers = {
	//attempt to find the definition
    "DefineIntent": function (intent, session, response) {
	
        var itemSlot = intent.slots.Term;
		var itemName;
		
        if (itemSlot && itemSlot.value){ //if both were found, 
            itemName = itemSlot.value.toLowerCase(); //populate itemName with the value provided by the Term slot (itemSlot)
        }

        var cardTitle = "Definition for " + itemName;
		var definition = definitions[itemName];
		var speechOutput;
		var repromptOutput;
			
        if (definition) {	//if an index in definitions[] for itemName was found, it was placed in definition
            speechOutput = {
                speech: "You asked about " + itemName + ". " + definition,
                type: AlexaSkill.speechOutputType.PLAIN_TEXT
            };
            repromptOutput = {
                speech: "To define another term, say it. Otherwise, say cancel.",
                type: AlexaSkill.speechOutputType.PLAIN_TEXT
            };
            //response.tellWithCard(speechOutput, cardTitle, definition);
			response.askWithCard(speechOutput, repromptOutput, cardTitle, definition); //we're going to ask to allow for multiple definitions
        } else {
            var speech;
            if (itemName) {
                speech = "I'm sorry, I currently do not know the definition for [" + itemName + "]. What else can I help with?";
				console.log(speech);
            } else {
                speech = "I'm sorry, I currently do not know that definition. What else can I help with?";
            }
            speechOutput = {
                speech: speech,
                type: AlexaSkill.speechOutputType.PLAIN_TEXT
            };
            repromptOutput = {
                speech: "What else can I help with?",
                type: AlexaSkill.speechOutputType.PLAIN_TEXT
            };
            response.ask(speechOutput, repromptOutput);
        }
    },

    "AMAZON.StopIntent": function (intent, session, response) {
        var speechOutput = "Exiting DroneHelper.";
        response.tell(speechOutput);
    },

    "AMAZON.CancelIntent": function (intent, session, response) {
        var speechOutput = "Exiting DroneHelper.";
        response.tell(speechOutput);
    },

    "AMAZON.HelpIntent": function (intent, session, response) {
        var speechText = "You can ask questions about common FPV Drone equipment such as, What's a VTX, or, What's a VRX. To exit, say exit.";
        var repromptText = "You can ask questions about common FPV Drone equipment such as, What's a VTX, or, What's a VRX. To exit, say exit.";
        var speechOutput = {
            speech: speechText,
            type: AlexaSkill.speechOutputType.PLAIN_TEXT
        };
        var repromptOutput = {
            speech: repromptText,
            type: AlexaSkill.speechOutputType.PLAIN_TEXT
        };
        response.ask(speechOutput, repromptOutput);
    }
};

exports.handler = function (event, context) {
    var droneFacts2 = new DroneFacts(); 
    droneFacts2.execute(event, context);
};

Credits

Drew Alden

Drew Alden

14 projects • 101 followers
Hackster Live Community Lead & 1st Ambassador (PHX), php, infosec, hardware hacking, iPhone jailbreaking, game/graphics/display tech.

Comments