Digspeed/Breakspeed

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

  • 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.

ButtersStotch

Member
Dec 18, 2017
18
1
0
27
Hey, wondering if there is a way is decreasing/increasing the gispeed of an item (expect spells like haste/mining fatigue) like a pickaxe. Does anyone have an idea how to change the speed?
 
You can't change the breaking speed, what you can do is accelerating the breaking stages by going to the next animation in the play_server_block_animation packet, but that's pretty hard to do actually. Your best bet is using an effect like you mentioned.
 
You can't change the breaking speed, what you can do is accelerating the breaking stages by going to the next animation in the play_server_block_animation packet, but that's pretty hard to do actually. Your best bet is using an effect like you mentioned.
I got several ideas like using the "on block damage" eventin combination with the break animation...is it even possible to get if a player is still damageing a block. I tried it with a message but I got only one at the beginning of the "breaking"
 
I got several ideas like using the "on block damage" eventin combination with the break animation...is it even possible to get if a player is still damageing a block. I tried it with a message but I got only one at the beginning of the "breaking"
With Spigot's block damage event? No. Since it was poorly implemented, you can do it with the packet though.

You can listen packets using MundoSK and ProtocolLib, in the following way:
code_language.skript:
packet info aliases: # this is just a helper

  (breaking|destroy) stage of %packet% = int pnum 1 of %packet%
  %packet%'[s] (entity|player) from %world% = %world% pentity 0 of %packet%


# Make sure to not do intensive stuff in this event, since it's called many times (depending on how many players you have)
# It's called for every single breaking stage, from the start animation to the final one (after that animation the block is broken).

on packet event play_server_block_break_animation:

  if destroy stage of event-packet is 9: # the stages are numbers from 0 to 9
 
With Spigot's block damage event? No. Since it was poorly implemented, you can do it with the packet though.

You can listen packets using MundoSK and ProtocolLib, in the following way:
code_language.skript:
packet info aliases: # this is just a helper

  (breaking|destroy) stage of %packet% = int pnum 1 of %packet%
  %packet%'[s] (entity|player) from %world% = %world% pentity 0 of %packet%


# Make sure to not do intensive stuff in this event, since it's called many times (depending on how many players you have)
# It's called for every single breaking stage, from the start animation to the final one (after that animation the block is broken).

on packet event play_server_block_break_animation:

  if destroy stage of event-packet is 9: # the stages are numbers from 0 to 9


Is it pssible to send a packet to the player and "say" no...you are not in stage 9 you are in stage 8...go back to stage 8 and try again.
 
Status
Not open for further replies.