Solved [EASY] Creating Custom Recipes with Item Meta

Discussion in 'Plugin Help/Development/Requests' started by RBHB16, Oct 26, 2015.

Thread Status:
Not open for further replies.
  1. Offline


    So I'm trying to make an unrolled blunt craft-able by making a row of paper across the middle row in a work bench. Problem is when I go to test it in game, nothing happens. I am not sure if I did something incorrect with my item meta or with the shaped recipe... Also this code takes place in my main class with the onEnable.. so I didn't use a method or anything. Help is appreciated

    This whole code means that the unrolledblunt = cocoa beans and its crafted by papers..
    I realize a possible problem that material.cocoa means the plant I'm trying to figure out how to add in the coco beans because it has a damage value.

    So in the code I changed it to material.INK_SACK, 3 and I tried it in the server but still nothing

        public void onEnable() {
            PluginDescriptionFile pdfFile = getDescription();
            Logger logger = Logger.getLogger("Minecraft");
            ItemStack unRolledblunt = new ItemStack(Material.INK_SACK, 3);
            ItemMeta unRolledMeta = unRolledblunt.getItemMeta();
            unRolledMeta.setDisplayName(ChatColor.BLUE + "Unrolled Blunt");
            ShapedRecipe unRolledBlunt = new ShapedRecipe(new ItemStack(unRolledblunt));
            unRolledBlunt.shape("", "P P P", "");
            unRolledBlunt.setIngredient('P', Material.PAPER);
            unRolledBlunt.shape(new String[] {"", "P P P", ""});
    Last edited: Oct 26, 2015
Thread Status:
Not open for further replies.

Share This Page