Autofarmer

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

Mattllama987

Supporter
Aug 5, 2018
225
7
18
Hello, im working on a Autofarmer, and im running into a small issue. When i place the hopper, it should set the blocks in a 5x5 area to farmland. It will set the blocks to farmland just fine. But i want to set the blocks above the farm land to wheat. When i place the hopper, it will replace the blocks under them also. Its hard to explain what i m talking about, so ill post a pic. I dont want it to break the blocks on the outside like its doing in the video. If someone knows whats wrong, please let me know ASAP. :emoji_slight_smile:

Thanks!
~Matt

Vid of whats happening:
https://gyazo.com/b41acb6197f524cef41cfd09b90e260d


Code:

Code:
on place:
    if line 1 of lore of player's held item contains "Basic":
        set {autoplanter::%player%} to location at event-block
        loop blocks in radius 5 around {autoplanter::%player%}:
            if loop-block is a hopper:
                if loop-block.getState().getCustomName() is "&aAutoplanter Basic":
                    loop blocks in radius 5 around {autoplanter::%player%}:
                        if loop-block-2 is grass block or dirt:
                            set loop-block-2 to farmland
                            set block below {autoplanter::%player%} to water
                            set block above loop-block-2 to wheat
 
Status
Not open for further replies.