ItemStack.setData() is not working?

XMLWordPrintable

    • Type: Bug
    • Resolution: Invalid
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Environment:

      because the DyeColor enum's getData() method is separated into two getWoolData() and getDyeData() (they are deprecated anyway), I recently changed my code like below:

      new ItemStack(Material.WOOL, 1, DyeColor.GREEN.getData());

      to

      new ItemStack(Material.WOOL, 1){{
      setData(new Wool(DyeColor.GREEN));
      }};

      and the actual item I see is just a white wool instead of green wool

      did I do something wrong? or is it a bug in 1.11?

            Assignee:
            Unassigned
            Reporter:
            wysohn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: