Solved Shaped recipe problem

Discussion in 'Plugin Development' started by Fiddy_percent, Jul 14, 2014.

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

    Fiddy_percent

    Code:java
    1. public void Recipes(){
    2.  
    3. ItemStack MushRoomSoup = new ItemStack(Material.MUSHROOM_SOUP);
    4. ShapedRecipe msoup = new ShapedRecipe(new ItemStack(MushRoomSoup)).shape("ABA","MWM","AKA").setIngredient('M', Material.BROWN_MUSHROOM).setIngredient('A', Material.AIR).setIngredient('B', Material.INK_SACK).setIngredient('W', Material.WATER_BUCKET).setIngredient('K', Material.BOWL);
    5. Bukkit.getServer().addRecipe(msoup);
    6. }
    7.  


    This is on my enabled and I have the empty spots covered but I cant figure out why It wont work

    [Air] [cocoBeans] [Air]
    [B mush] [Water] [B mush]
    [Air] [bowl] [Air]

    is how its put in the crafting table but nothing...
     
  2. Offline

    RebzO1

    This is how i did it, hope this helps you

    Code:java
    1. ItemStack fortune5 = new ItemStack(Material.DIAMOND_PICKAXE);
    2. ItemMeta metaf5 = fortune5.getItemMeta();
    3. metaf5.setDisplayName("CC Pickaxe II");
    4. fortune5.setItemMeta(metaf5);
    5. fortune5.addUnsafeEnchantment(Enchantment.LOOT_BONUS_BLOCKS, 5);
    6. fortune5.addEnchantment(Enchantment.DIG_SPEED, 5);
    7. fortune5.addEnchantment(Enchantment.DURABILITY, 3);
    8. ShapedRecipe recipef5 = new ShapedRecipe(new ItemStack(fortune5));
    9. recipef5.shape("ddd","dpd","ddd");
    10. recipef5.setIngredient('d', Material.DIAMOND_BLOCK);
    11. recipef5.setIngredient('p', Material.DIAMOND_PICKAXE);
    12. getServer().addRecipe(recipef5);
     
  3. Offline

    Fiddy_percent


    Still no dice

    Code:java
    1.  
    2. ItemStack MushRoomSoup = new ItemStack(Material.MUSHROOM_SOUP);
    3. ShapedRecipe msoup = new ShapedRecipe(new ItemStack(MushRoomSoup));
    4. msoup.shape("ABA","MWM","AKA");
    5. msoup.setIngredient('M', Material.BROWN_MUSHROOM);
    6. msoup.setIngredient('A', Material.AIR);
    7. msoup.setIngredient('B', Material.INK_SACK);
    8. msoup.setIngredient('W', Material.WATER_BUCKET);
    9. msoup.setIngredient('K', Material.BOWL);
    10. Bukkit.getServer().addRecipe(msoup);
     
  4. Offline

    RebzO1

    Fiddy_percent
    I am really new to all this myself, I really don't see why it's not working for you.
    It looks like it should work.

    I apologize for not being able to assist more.

    What i can do is add your code to my plugin to see if it works for me..
     
  5. Offline

    fireblast709

    Fiddy_percent try whitespace instead of A for AIR (so remove the AIR ingredient)
     
  6. Offline

    Fiddy_percent

    That worked :D thanks guys
     
  7. Offline

    RebzO1

    fireblast709
    i learned something there i wouldn't have guessed lol

    Fiddy_percent
    yw, i had loads of help from people on here its good to put something back :)
     
Thread Status:
Not open for further replies.

Share This Page