What to replace the newly deprecated methods with?

Discussion in 'Plugin Development' started by Shzylo, Sep 20, 2013.

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

    Shzylo

    There is a whole new amount of items that have been deprecated, and the most I am worried about are:

    • getTypeId()
    • getTargetBlock(arg0, arg1)
    • new ItemStack(arg0, arg1)
    What is the point of the deprecation, I know it is a "Magic Value" but why? Also, what would you replace these with?
     
  2. Hey, I asked this question too, I think your meant to use materials now so, getType()
     
  3. Offline

    The_Doctor_123

    Bukkit, apparently, is trying to get rid of block IDs and use Materials instead. I think they're doing this for better readability of code. Anyway, it doesn't really matter. It would be stupid for Bukkit to break a million plugins if they got rid of those methods. Just suppress warnings.
     
    justcool393 likes this.
  4. Offline

    Shzylo

    The_Doctor_123
    I was going to stick to these methods anyways if no one supplied me with better ways, but thanks for letting me know what they are leading to!
     
  5. what about the getTargetBlock() ?
    deprecation usually means something else should be used instead so I'm going to assume there is an alternative.
     
  6. Offline

    Janmm14

    xorinzor Shzylo The_Doctor_123 jonneystechcheck
    They set these methods as deprecated, because mojang won't allow ids in its commands too later on, in the current snapshots both is allowed blockname and id, but that should change because of the api they want to create.

    Some methods will hopefully get a similar one who accepts materials.
     
  7. Offline

    Shzylo

    Are they still legitimately working on it? I ask this since viewing their github project of it (this link), it has not been messed with in over a year.
     
  8. Offline

    Janmm14

    Shzylo likes this.
Thread Status:
Not open for further replies.

Share This Page