Item IDs

Discussion in 'Plugin Development' started by wklock, Aug 22, 2012.

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


    So I've started a new plugin and I want to be able to use an unlisted block with the id 44:6 but I'm not sure how to implement it with Materials because it requires and integer.
  2. Are you trying to generate 44:6 using Bukkit?
  3. Offline


    I'm trying to create a new recipe that gives the user 44:6
  4. Well, you can us getTypeId() == 44
  5. Offline


    But it's a specific data type of item 44
  6. Or == 44.6)

    What is the code you have so far?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 28, 2016
  7. Offline


            PluginDescriptionFile pdfFile = this.getDescription();
   + " version " + pdfFile.getVersion() + " is enabled.");
            ShapedRecipe recipe1 = new ShapedRecipe(new ItemStack(Material("This is where the 44:6 needs to be") , 1));
            recipe1.shape(new String[] { "AAA", "ABA", "AAA" });
            recipe1.setIngredient('A', Material.SMOOTH_BRICK);
            recipe1.setIngredient('B', Material.SMOOTH_BRICK);
    I haven't tested it yet.
  8. Here's the ItemStack you'll want to use for giving 44:6

    new ItemStack(Material.getMaterial(44), 1, (short) 0, (byte) 6)
    calebbfmv likes this.
  9. Grr I deleted my post because I had a typo, then you come in and say the same thing -____-
  10. Offline


    Can you explain how that works please?
  11. Lol anyway, basically it says: Use the type 44, then add the subtype of 6 Right? or f***ed up?
  12. In that example, you're using the ItemStack costructor: ItemStack(Material type, Int amount, short damage, byte data)

    • Type: 44
    • Amount: 1
    • Damage: 0 (null)
    • data: 6 (The type)
    Put it all together, and you have 44:6
  13. Offline


Thread Status:
Not open for further replies.

Share This Page