Solved Faster Crops Problem

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

Mattllama987

Active Member
Aug 5, 2018
225
7
18
24
Hello, im working on making crops grow faster on my server, and im having a small problem. When i mine my crops while they are growing, they will vanish and then grow back after a few seconds. How can i prevent them from growing back after i mine the wheat? This is what i have at the moment.

Thanks!
~Matt

CODE:

Code:
options:
    wheat: 20
on right click on farmland:
    if player's held item is wheat seeds:
        wait "%random number between 1 and {@wheat}% seconds" parsed as timespan
        set block above event-block to stage 4 wheat plant
        wait "%random number between 1 and {@wheat}% seconds" parsed as timespan
        set block above event-block to stage 5 wheat plant
        wait "%random number between 1 and {@wheat}% seconds" parsed as timespan
        set block above event-block to stage 6 wheat plant
        wait "%random number between 1 and {@wheat}% seconds" parsed as timespan
        set block above event-block to stage 7 wheat plant
        wait "%random number between 1 and {@wheat}% seconds" parsed as timespan
        set block above event-block to stage 8 wheat plant
        wait "%random number between 1 and {@wheat}% seconds" parsed as timespan
        set block above event-block to fully grown wheat plant
 
You would need to add a check after each wait to make sure it's still wheat. Skript will pause for each wait then continue. It doesn't know it's been broken. I have reworked the code to use a repeating function until it gets to stage 8.

Take a look on the skUnity Parser: https://parser.skunity.com/d8227593
 
Status
Not open for further replies.