Solved Don't know how to put oak wood planks in a crafting recipe

Discussion in 'Plugin Development' started by 17nhammond, Jul 23, 2013.

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

    17nhammond

    I can't figure out why this won't let me craft with wood oak planks.
    nametag.setIngredient('W', Material.WOOD, (byte)5);
    The identity for oak wood plank is 5 and i don't know why It won't work....
     
  2. Offline

    inventorman101

    I believe it is just Material.WOOD
     
    17nhammond likes this.
  3. Offline

    17nhammond

    I have already tried that....
     
  4. Offline

    inventorman101

  5. Offline

    17nhammond

    Actually i tried it again and it worked....

    //NameTag Recipe
    ShapedRecipe nametag = new ShapedRecipe(new ItemStack(Material.NAME_TAG));
    nametag.shape("I","WWW","WSW");
    nametag.setIngredient('W', Material.WOOD);
    nametag.setIngredient('I', Material.IRON_INGOT);
    nametag.setIngredient('S', Material.SIGN);

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
    inventorman101 likes this.
  6. Offline

    inventorman101

    17nhammond

    Code:java
    1.  
    2. [INDENT=1][SIZE=13px][FONT=Trebuchet MS][FONT=Georgia]//NameTag Recipe[/FONT][/FONT][/SIZE][/INDENT]
    3. [INDENT=1][SIZE=13px][FONT=Georgia]ShapedRecipe nametag = new ShapedRecipe(new ItemStack(Material.NAME_TAG));[/FONT][/SIZE][/INDENT]
    4. [INDENT=1][SIZE=13px][FONT=Georgia]nametag.shape(" I ","WWW","WSW"); // Add a space before and after the I[/FONT][/SIZE][/INDENT]
    5. [INDENT=1][SIZE=13px][FONT=Georgia]nametag.setIngredient('W', Material.WOOD);[/FONT][/SIZE][/INDENT]
    6. [INDENT=1][SIZE=13px][FONT=Georgia]nametag.setIngredient('I', Material.IRON_INGOT);[/FONT][/SIZE][/INDENT]
    7. [INDENT=1][SIZE=13px][FONT=Georgia]nametag.setIngredient('S', Material.SIGN);[/FONT][/SIZE][/INDENT]
    8.  
    9.  
    10.  
     
    17nhammond likes this.
  7. Offline

    17nhammond

    //Horse Spawner
    ShapedRecipe horse = new ShapedRecipe(new ItemStack(Material.DIAMOND_BARDING));
    horse.shape(" D ","HSH","DDD");
    horse.setIngredient('H', Material.HAY_BLOCK);
    horse.setIngredient('D', Material.DIRT);
    horse.setIngredient('S', Material.SADDLE);
     
  8. Offline

    microgeek

    Why are you posting random code?
     
  9. Offline

    17nhammond

    //Horse Spawner
    ShapedRecipe horse = new ShapedRecipe(new ItemStack(Material.MONSTER_EGGS, (byte)100));
    horse.shape(" D ","WSW","DDD");
    horse.setIngredient('W', Material.WHEAT);
    horse.setIngredient('D', Material.DIRT);
    horse.setIngredient('S', Material.SADDLE);

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
Thread Status:
Not open for further replies.

Share This Page