Auto-Mining - Item Drops

Discussion in 'Plugin Development' started by Eeketh, Jan 28, 2011.

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

    Eeketh

    As far as I can see, the only way to automate mining is by setting the type f a block to air, then using world.dropItemNaturally() to drop the material at the location.

    But this means that if you try and mine grass for example, it gives you grass blocks rather than dirt. Is there any way to set damage to broken, or to drop the correct material?

    I could do it manually, but it'll take a while to include things like redstone/lapis random quantities and prevent glass being dropped, and seems a bit like re-inventing the wheel...
     
  2. Offline

    Snowl

    You do have to set the block to air, then check what block was destroyed and if its grass for example, drop dirt. It's annoying :(
     
  3. Offline

    mjmr89

    Try setting the damage of the item to 0? Sounds like it could work, but I haven't tested it.
     
  4. Offline

    Snowl

    You can't set the damage of blocks in bukkit :(
     
Thread Status:
Not open for further replies.

Share This Page