Item id/data (colored wool, etc.)

Discussion in 'Plugin Development' started by Kepler_, Dec 21, 2013.

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

    Kepler_

    Bukkit updated the way item ids work and now I have no idea how to create items with data, like colored wool. How would I give a player red wool, for example? In the past I would have set the damage value of an itemstack of wool to 14, but now that method is deprecated.
     
  2. Offline

    xTrollxDudex

    Kepler_
    Here's how I did it in my plugin:
    PHP:
    ItemStack wool = new Wool(DyeColor.RED).toItemStack()
     
  3. Offline

    Kepler_

    Okay. Is there a way to add colored wool as an ingredient to a recipe? I'm only able to add a Material. I was able to add a material and an data value but that has now been deprecated.
     
  4. Offline

    xTrollxDudex

    Kepler_
    Well, you can grab the wool's data... Otherwise, just use the deprecated method
     
Thread Status:
Not open for further replies.

Share This Page