Breaking blocks

Discussion in 'Plugin Development' started by WarmakerT, Aug 14, 2012.

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

    WarmakerT

    How can I make it take longer to break a block? :)
     
  2. Offline

    Jnorr44

    you could use a delayed task... or theres a much more natural looking way, but it requires a lot more code... use worldObj.spawnParticle(String particleName, double posX, double posY, double posZ, double, double, double); which can make the breaking particle effect, then break the block...

    Not really sure how to do this though...
     
  3. Offline

    Malikk

    I know with Spout, you could change the base block to make it something harder, but afaik you can't do that in Bukkit.

    It wouldn't give the smooth animation like you want, but you could run a scheduler and cancel the event a certain number of times. Make them mine it multiple times for it to actually break. Not sure if that's an acceptable compromise.
     
  4. Offline

    Jnorr44

    you could mod NMS...
     
  5. Offline

    Malikk

    I would assume since he's posting on the Bukkit Plugin Development forum, he wants to make a bukkit plugin, lol
     
  6. Offline

    WarmakerT

    Maybe set the person to adventure mode, run a scheduler and spawn the particles?
     
  7. Offline

    Jnorr44

    That works for bukkit...
    One of my plugins edits the default NMS renderer, and the only referenced .jars are craftbukkit and bukkit.
     
  8. Offline

    Malikk

    Edits the renderer or uses the renderer in a different way? because that's totally different. I've used nms a handful of times, but editing it, would be a mod, not a plugin.
     
  9. Offline

    Jnorr44

    Uses the renderer in a different way, thats what I mean XD.
     
  10. Offline

    WarmakerT

    Would it be possible to change it for a specific block instead of block type?
     
  11. Offline

    Jnorr44

    I would think so. do something like
    Block b = world.getBlockAt(x,y,z);
    Then theres probably a way to set breaking time...
     
  12. Offline

    Malikk

    There's not.

    The adventure mode would work except it would be telling them that their switching modes, which is probably no good.

    I think cancelling the event is your best bet. Keep a counter until they've tried to break the same block twice in a row, then don't cancel.
     
    WarmakerT likes this.
Thread Status:
Not open for further replies.

Share This Page