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.

Crop Harvester

Discussion in 'Skript' started by SH4D03, Jan 13, 2020.

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

    SH4D03 Member

    Joined:
    Jan 13, 2020
    Messages:
    1
    Likes Received:
    0
    Skript Verson: skript 2.4
    Skript author: Bensku
    Minecraft Version; 1.14.4

    Hi. I hope its not too much to ask but I've been trying to create a crop harvestor skript. This is an item that when placed auto farms nearby crops and deposits the items in a chest. The code that I have created looks fine to me and when I run it it doesn't show any errors but for some reason it doesn't work. Here's the code:

    Code (Text):
    1. every 10 seconds in "world":
    2.    loop all blocks in {cropharvestor::*}:
    3.       if block at location of loop-block-1 is a dropper named "&2&lCrop Harvestor":
    4. #Wheat
    5.          loop all blocks in radius 5 around the loop-block-1:
    6.             loop-block-2 is fully grown wheat plant
    7.             set loop-block-2 to wheat plant
    8.             loop all blocks in radius 4 around the loop-block-1:
    9.                loop-block-3 is a chest
    10.                add 2 wheat to loop-block-3's inventory
    11.                exit loop
    12. #Carrots
    13.          loop all blocks in radius 5 around the loop-block-1:
    14.             loop-block-2 is fully grown carrot plant
    15.             set loop-block-2 to carrot plant
    16.             loop all blocks in radius 4 around the loop-block-1:
    17.                loop-block-3 is a chest
    18.                add 2 carrot to loop-block-3's inventory
    19.                exit loop
    20. #Potatoes
    21.          loop all blocks in radius 5 around the loop-block-1:
    22.             loop-block-2 is fully grown potato plant
    23.             set loop-block-2 to potato plant
    24.             loop all blocks in radius 4 around the loop-block-1:
    25.                loop-block-3 is a chest
    26.                add 2 potato  to loop-block-3's inventory
    27.                exit loop
    28. #Nether Wart
    29.          loop all blocks in radius 5 around the loop-block-1:
    30.             loop-block-2 is fully grown nether wart plant
    31.             set loop-block-2 to nether wart plant
    32.             loop all blocks in radius 4 around the loop-block-1:
    33.                loop-block-3 is a chest
    34.                add 2 nether wart to loop-block-3's inventory
    35.                exit loop
    36.  
    37.  
    38.  
    39. command /cropharvestor:
    40.    permission: op
    41.    permission message: You are unable to perform this action
    42.    trigger:
    43.       give dropper named "&2&lCrop Harvestor" to player
    44.  
    45. on place of dropper:
    46.    if player's tool is a dropper named "&2&lCrop Harvestor":
    47.       set block to dropper named "&2&lCrop Harvestor"
    48.       add location of block to {cropharvestor::*}
    If someone could help me with this I'd be really grateful.
     
Thread Status:
Not open for further replies.
Loading...