1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Set Mining Speed

Discussion in 'Skript' started by Brandawg, Jun 6, 2017.

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

    Brandawg Member

    Joined:
    May 8, 2017
    Messages:
    19
    Likes Received:
    0
    Sp I have been looking all over the web to do this and I have not really found a good way. I have tried setting Mining fatigue and haste but that does not work too well. Because haste 2 is a lot faster also you can either see your pickaxe mine really slow or really fast. I also need to say for example a wood pick can be mine coal in 10 seconds but mine coal in 5. Also I have tried modifying packets but have now figured out how to. All help is appreciated.
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,007
    Likes Received:
    138
    So many people contact me asking about adding something like this to my addon and it's been spammed all over the forums a couple of times. Block breaking is client side. The client sends a packet when it starts mining, changes tools/aborts during mining and when it finishes mining. Having a constant system spamming packets to the server saying that the player is mining a block is ridiculous, which is why Mojang doesn't have that as a feature.

    You can't change how fast a player mines a block. Also if you're giving this to donators, that is against Mojang's EULA which gives Mojang the rights to shut your server down if they want. If all players have the ability to access this feature, you won't have to worry. "Donators can not have gameplay-affecting features over other players" - Mojang

    Mojang's EULA if interested Here and Here
    (EULA has been around since 2014 and was put into action summer 2015)

    The only way to "Simulate" block breaking is constantly cancel the on block damage or on break event and for every X hits of the block. Add 1 to a variable of the block. Then if that variable goes over X break the block. You can add the block crack effect or the block break packet to the block per stage to add an effect of breaking to it aswell.
     
    #2 ShaneBee, Jun 7, 2017
    Last edited by a moderator: Jun 9, 2017
    • Like Like x 1
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,007
    Likes Received:
    138
    I have tried the on break event and it does not work. Do you think you can help me? Also this is not meant to go against the EULA
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,007
    Likes Received:
    138
    Code (Skript):
    1. on block damage:
    2.     apply haste to player for 1 second
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,007
    Likes Received:
    138
    Yes but potion effects don't seem to work well when you want to really effect pick axes and such. Also haste II is double as strong as haste I
     
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,007
    Likes Received:
    138
  7. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,007
    Likes Received:
    138
  8. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,007
    Likes Received:
    138
    Don't use this, use another...
     
  9. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,007
    Likes Received:
    138
    What is the other?
     
  10. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,007
    Likes Received:
    138
    Block break animation with randomzk
     
  11. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,007
    Likes Received:
    138
    it says this [​IMG]

    Code (Skript):
    1. on rightclick with diamond pickaxe:
    2.     set {_block} to targeted block
    3.     loop 10 times:
    4.         show block break stage loop-number at {_block}
    5.         wait 10 ticks
    6.     break {_block}
     
Thread Status:
Not open for further replies.
Loading...