Mining speed of a block

  • 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 community!

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Krazy

Member
Jan 26, 2017
68
4
8
I couldn't find anything on the docs or forums about this, how would I go about making it so a block takes X amount of time less/more to mine not using fatigue or haste? Thanks! Also is there a condition to check if a player is mining a block or something? Not like an on block damage but to see if they constantly are?
 
I'm pretty sure this is client side and can't be modified by the server, correct me if I am wrong.
 
The easier way is a apply the fast digging potion effect and the harder way is change the current state of the break animation packet to the next state (so it seems faster, can be done with MundoSK) and break the block (setting it to air and dropping the block or using the SkQuery break block effect) and also if you want, add 1 to the broken blocks statistic. But there is no way to literally modify the block breaking speed.
 
The easier way is a apply the fast digging potion effect and the harder way is change the current state of the break animation packet to the next state (so it seems faster, can be done with MundoSK) and break the block (setting it to air and dropping the block or using the SkQuery break block effect) and also if you want, add 1 to the broken blocks statistic. But there is no way to literally modify the block breaking speed.
Would you happen to know how to use this packet? As in packet name and stuff, I don't use packets a lot :/

EDIT: have found this packet to play when you start to mine, and play one more when you mine it.

on packet event play_client_block_dig:

But playing the actual animation and making sure it would do it correctly is confusing me..
 
Last edited by a moderator:
It's just listen to the play_server_block_break_animation with the packet event of MundoSK and set the int pnum 1 of the event-packet to the int pnum 1 of the event-packet + 1.
I'm so incredibly stuck, I have this
code_language.skript:
on packet event play_client_block_dig:
    set {_packet} to new play_server_block_break_animation packet
    send player packet {_packet}
on packet event play_server_block_break_animation:
    set {_packet} to event-packettype
    set {_t} to int pnum 1 of event-packet
    broadcast "%{_t}%"
    set {_t} to {_t} + 1
    broadcast "%{_t}%"
    set int pnum 1 of {_packet} to {_t}
This triggers, but then the animation doesn't show, and I still don't get how I make the block mine faster/slower, because the dig packet only triggers twice, when I hit them block and stop hitting it. I'm really stuck :emoji_frowning: if anyone can help please do
[doublepost=1488312823,1488219056][/doublepost]bump
 
Status
Not open for further replies.