Solved No more block IDs?

Discussion in 'Plugin Development' started by adam753, Sep 23, 2013.

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

    adam753

    I've noticed that all functions involving Block IDs (i.e. 1 for stone, 2 for cobblestone, etc.) have been deprecated in the latest CB release. Does this mean there's no way I can use 1 to represent stone anymore, I have to use the Material enum? That is very frustrating if so, it's going to make things like config and storing lists of blocks a lot less fun.
    Does anyone have a temporary or permanent solution to this? Is an alternative in the works?

    Edit: For anyone searching for the answer to this problem, I've made a little API that can convert between old IDs and the Material enum. You can get it here: http://pastebin.com/rscFbS1f

    Bump. A dev reply would be appreciated.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
    madmac likes this.
  2. Offline

    chasechocolate

    adam753 in the next update, Mojang is removing item ids, and changing them to: "material:sandstone", for example. My guess is that everything will be converted to use the Material enum instead of item ids.
     
  3. Offline

    The_Doctor_123

    adam753
    Exactly what chasechocolate said except I might have to add this: It would be unlikely and stupid if Bukkit removed IDs and broke tons of plugins. That being said, it's still a good idea to use Materials unless IDs are needed. I believe the idea of deprecating them was to divert people from using them.
     
  4. Offline

    tommycake50

    IDAPI anyone?
     
    adam753 likes this.
  5. Offline

    adam753

    chasechocolate
    Ah right, it's Mojang's doing. Very frustrating, but thanks for the info.
    tommycake50
    I think I'll quickly write a class for that, I prefer that idea to having to type out the material names in config files.
     
  6. Offline

    JellybeanPrince

    adam753 Hey, mind sending me the api when ya finish? I hate using enums :(
     
  7. Offline

    adam753

    Edgargaza likes this.
  8. Offline

    iiHeroo

Thread Status:
Not open for further replies.

Share This Page