Underwater Block Breaking

Discussion in 'Plugin Development' started by xxMOxMOxx, Sep 13, 2013.

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

    xxMOxMOxx

    I'm trying to make it so players can break blocks at normal speed while they're underwater. Anyone have any ideas how to do this?
     
  2. Probably something with playerInteractEvent amd the Action.left_click_block
     
  3. Offline

    xxMOxMOxx

    Theres a BlockDamageEvent which is fired as soon as the player starts breaking a block
     
  4. well, do something with it then.....
     
  5. Offline

    xxMOxMOxx

    How do I speed up the block breaking?
     
  6. Offline

    Rockon999

    Hm... xxMOxMOxx
    Well to start off with I'd read up on digging speed: http://www.minecraftwiki.net/wiki/Digging#Digging_speed
    According to that article while walking underwater there is a 5x penalty; and if you're underwater and not walking on the sea floor then it is a 25x penalty. You would have to get their location, find out what they're walking in, and then using either schedulers (not sure about this one), or fast break potions make them dig faster to match normal speed. Then remove the potion effect if you added it :)
    * HINT * Dig speed is increased 20% each level for a fast break potion (a.k.a Haste Effect) (ID is 3)
    List of effects: http://www.minecraftwiki.net/wiki/Potion_effects#List_of_effects
     
Thread Status:
Not open for further replies.

Share This Page