Change Material Data (From Ink Sacks to Cocoa Beans)

Discussion in 'Plugin Development' started by caHarkness, Apr 10, 2011.

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

    caHarkness

    How can this be done? I've tried changing coal to charcoal once before, but failed miserably. Let's say that S is an ItemStack of Material.INK_SACK, what method in S can be used to change it from the actual ink sack to cocoa beans?
     
  2. Offline

    Plague

    I set the damage value. For colors its 0..15
     
  3. Offline

    caHarkness

    Thanks.. but it appears as if I had to "reverse" the data values.
    http://www.minecraftwiki.net/wiki/Wool_Dyes#Primary_Colours says that zero is bonemeal and fifteen (15) is the ink sack. So basically, I just counted from zero, starting at the bottom.

    Again, thanks, this helped me. I never knew that the "damage" had anything to do with the item's data value. If I had read a little more, I would have caught that myself. Hope someone else finds this useful :)
     
Thread Status:
Not open for further replies.

Share This Page