Solved Specifying The Proper Golden Apple

Discussion in 'Plugin Development' started by TehKitti, Nov 29, 2013.

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

    TehKitti

    I'm trying to specify the material "item" to the enchanted golden apple but the only material available is Material.GOLDEN_APPLE and that counts for both the regular golden apple and enchanted one. I need to somehow specify only the enchanted golden apple and not both. If it helps the item ID is 322:1. My current code is below but it counts for both of the apples.

    Code:java
    1. Material item = Material.GOLDEN_APPLE;
     
  2. Offline

    FallenYouth

    It might be ENCHANTED_GOLDEN_APPLE
    But that might not work.
     
  3. Offline

    TehKitti

    It doesn't exist, the only material is Material.GOLDEN_APPLE
     
  4. Offline

    FallenYouth

    TehKitti Alright try this
    Code:
    Material.GOLDEN_APPLE, 1, (short)1;
    TehKitti If that doesn’t work you could always try this
    Code:
    GOLDEN_APPLE(322:1),
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  5. Offline

    TryB4

    TehKitti FallenYouth
    ItemStack item = new ItemStack(Material.GOLDEN_APPLE, amount, (short)1)
     
    TehKitti and FallenYouth like this.
  6. Offline

    hellboyPS

    FallenYouth you posted here 3 times; 3 times with little to no knowledge about the subject, only uninformed assumptions, and not even confining to correct java syntax. Everybody can make a mistake, but this is just helping nobody. I suggest you to answer only if you are at least on the same level of knowledge as the asker.
    I'm sorry if I'm being rude here, but it really struck me as exceptionally unhelpful in this discussion.

    TryB4's answer will work.
     
  7. Offline

    TehKitti

    Thank you! :D
     
  8. Offline

    Garris0n

    Use the edit button instead of double-posting.

    You should probably be on a higher level of knowledge, seeing as if you're on the same level you won't have any idea how to fix the issue either in most cases.
     
Thread Status:
Not open for further replies.

Share This Page