Solved Potions' data value vs metadata ?

Discussion in 'Plugin Development' started by Digi, Feb 11, 2013.

Thread Status:
Not open for further replies.
  1. Hi, so I know that data value sets the potion's effect/duration/splash/etc as it gets out of a brewer... but what's with the PotionMeta and its ghostly effects ?

    I'm confused by these options, I want to use them to allow users to customize potion results from recipes but I don't really understand what's the metadata role and how it collides with data values :/...
     
  2. Offline

    chasechocolate

  3. I know how to use the API, that's easy, what I don't understand is what's PotionMeta's role... how do they affect any potion... someone who actually used PotionMeta and understands why its there next to potion data value should reply :}

    Also...
    That does nothing like that, the potion's name remains "water bottle", it does however change the effect displayed in inventory.

    EDIT:
    Oh nice, now to top it off there are 2 enums for potion types... PotionType and PotionEffectType :/ I know which one should be used on what by why 2 diferent systems ?!

    Apparently if you add PotionMeta it takes over the effects of data value if applied.

    If PotionMeta is present the data value affects:
    - if data value 0 potion will *look* like water bottle with no effects, but when used it will have all effects.
    - if data value is anything else it will have the first effect name and it will list the other effects too (even if you only set splash and no type)
    - data value controls if it's a splash and the color of the bottle's liquid by setting potion type.
    - data value's extend and level/tier doesn't seem to have any diference

    This is what I asked for :p so I think I've figured how they interact... unless there's something else I missed.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  4. Offline

    caseif

    Potion data values are reserved for predefined potions, whereas PotionMeta can be used to define new custom potions.
     
  5. Offline

    raGan.

    i.e. Try to add more effects to a single potion by using data values.
     
Thread Status:
Not open for further replies.

Share This Page