I dont want to use net.minecraft.server classes

Discussion in 'Plugin Development' started by ferrybig, May 30, 2012.

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


    does an better solution exists for this:
    2. if ((changedId > 0) && (net.minecraft.server.Block.byId[changedId].isPowerSource()))
    3. {
    4. /* ... */
    5. }

    EDIT: chancedId is an 'int'
  2. Offline


  3. Offline


    Oh, sorry. I couldn't see any way in Bukkit for doing it so I went back to that.
  4. Offline


    its not returning false always for so far I notice, I am using it for an dispenser like block and thats working great, but I want an way to make the same funcinality posible whit just bukkit classes, or mayby an list (last option) of al blocks that are so called power sources
  5. Offline


    If this functionality is missing from the Bukkit API you could add it and submit a pull request.

    Many of these useful methods in net.minecraft.server's Block and Item are missing from Bukkit, I also often have to resort to using these methods (sometimes still obfuscated). There are very useful methods to not only check if a block is a power source, but also if an item is durable, getting an item's container, damaging a tool, checking if a block is transparent or should render in 3D, has subtypes, and many more. Anyone up for developing a nice API to access all this?
    Bone008 likes this.
  6. Offline


    mayby whit an new methode on the material class, Material.isPowerSource() or something
Thread Status:
Not open for further replies.

Share This Page