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

Solved Block Breaking

Discussion in 'Skript' started by MusicManSK, Jun 14, 2018.

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

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    Hello!
    Can anyone help me?
    Probably not because 1. I have questions with impossible answers or 2. As ususal, unluck...
    But Im trying luck...
    So..
    How to break block without dropping any items?
    • I dont want to loop nearby entities, because i can see that dropped item before it will get killed..
    • I dont want to cancel event and set event-block to air, because I can see that block getting back and i cant mine fo fast and smoothly..
    • I dont want to setup gamerules, because in other world I want blocks drops items.. only if it would be for one certain world, not for the entire server..
    Is it possible?
     
  2. Policiu

    Policiu Member

    Joined:
    Jan 28, 2017
    Messages:
    15
    Likes Received:
    0
    The closest I could find is "On item spawn." It is called when ANY item is dropped. So you could just cancel all items.

    I couldn't find an actual way of obtaining the reason for spawn.... I was trying to look through the docs to find a way to check the reason.
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,178
    Likes Received:
    218
    i know this is not exactly what you want, but i feel like you are running low on options.
    Anyways, i gave myself a diamond shovel with efficiency 5, ran this code, and the grass still breaks super duper fast, and no drops

    Code (Skript):
    1. on block break:
    2.     if event-block is grass:
    3.         cancel event
    4.         set event-block to air
    im not really sure why you said:

    "I dont want to cancel event and set event-block to air, because I can see that block getting back and i cant mine fo fast and smoothly.."

    because when i try it, the blocks still break fast, and they are breaking fast enough i do not really notice the "cancel event"
     
  4. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    Its OK.. I already made it..
    Because Im working on prison.. and i have shovel with efficiency 40 and there is visible difference between canceling event and not canceling.. also its visible because You break block > Skript will cancel event and set it back into broken block > You set that block to air.. and there is visible that getting this block back.. and thats reason why its slower.. but i already done it so it ok.. thanks for replyng
     
    • Like Like x 1
  5. PuchiGFX

    PuchiGFX Member

    Joined:
    Jan 26, 2017
    Messages:
    246
    Likes Received:
    5
    Mmm, i'm using an autoinv feature in my prison server (made it with skript and set event-block to air) and everything works perfect, no lag and no "cooldown" when a player breaks a Block
     
  6. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    I dont know then.. its not working properly for me.. but I already found working way..
     
  7. PuchiGFX

    PuchiGFX Member

    Joined:
    Jan 26, 2017
    Messages:
    246
    Likes Received:
    5
    Can u tell me, just out of curiosity
     
  8. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    what should I tell you?
     
Thread Status:
Not open for further replies.

Share This Page

Loading...