Solved ItemStack CustomItems do not have textures?

Discussion in 'Spigot Plugin Development' started by daveyxbl, May 27, 2016.

  1. [​IMG]

    The purple untextured object is blazepowder

    My code:

    Code (Text):
    ItemStack golddust = new ItemStack(Material.getMaterial(377), amnt, (short)1);
                    ItemMeta im = golddust.getItemMeta();
                    im.setDisplayName(ChatColor.DARK_PURPLE + "" + ChatColor.BOLD + "Raw GoldDust");
  2. When you give the item a material, you have to do Material#DIRT, Material#DIAMOND_BLOCK, Material#GRASS, etc.
  3. They are purple and black like that if there is no resource specified for it in the clients resource pack. In this case the data value of 1 for blaze powder doesn't exist. You are more than welcome to create your own resource pack with a "raw gold dust" texture and send it to the client. Otherwise you are going to have to mark your special items differently such as writing in the lore or using nbt.
  4. Do you mean something like this?

    Code (Text):
    ItemStack golddust = new ItemStack(Material.BLAZE_POWDER, amnt, (short)1);
    It still gives me the untextured items.. :confused:
  5. You're setting the data value of the blaze powder to 1.

    Blaze powder's only data value is 0, so the client doesn't know what to do.
    • Agree Agree x 1
  6. btw, adding damage value to item that aren't supposed to have damage value is not likely going to work.
    • Agree Agree x 1
  7. Ahh.. I forgot to remove that XD... I used a custom texture pack before with the plugin, Didn't realize my mistake my bad..

    I wasn't trying to add that, anyways problem solved..

    Thanks for the replies fihgu, Xilixir, MrBlobman, and Hunky524.