Replacement for sendBlockChange?

Discussion in 'Plugin Development' started by Steffion, Sep 28, 2013.

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


    Hello Bukkit!

    While I was updating my plugin to the new 1.6.4 version I noticed the sendBlockChange method got deprecated, is there a replacement for it? Or won't there be?

    Thanks for explaining :)!
  2. Offline


    I am in the same way :'(
  3. If I get it right, the problem here is the second parameter of sendBlockChange, that represents the material id. As 1.7 will not have material ids like earlier version had (they get replaced by named ids like "material:someMaterial"), your code will not work with 1.7, but as there is actually no new method replacement (as there will be one in 1.7), I would stick with this method as long as 1.7 isn't published. But you should be aware of that your code needs an update when 1.7 is out.
  4. Offline


    hapm Ok, thanks for now, I did use Material.<name> though instead of the ID number. I will see what happens in the future..
  5. Offline


    Ah darn, I was hoping to get an answer for this. Anybody have more info yet?
  6. Offline


    ShadowSplicer still not... :(

    Only that youmight have to change it again in 1.7
  7. Offline


    Just use it for now, there is no replacement yet. It is because of the magic number used in the method. You won't know what to change it to until 1.7 comes out most likely :)
    Steffion likes this.
  8. Offline


    Thanks for helpful the replies, guys :D One question; what exactly is this "magic number" I keep hearing about?
  9. Offline


    It's the item ids. They are getting removed in 1.7 supposedly.
  10. Offline


    Not just the item ID's - there's already a sendBlockChange() method which takes a Material instead of an item ID.

    The other problem is the block data - e.g. to send a block change of "birch log facing up/down" you need to pass a data value of 2 - . There's no way yet to do this in Bukkit without using that magic number of 2.
Thread Status:
Not open for further replies.

Share This Page