#Set all blocks above block type

1 messages · Page 1 of 1 (latest)

rigid wyvern
#

I want to set it so when the skript loads it sets all blocks above farmland to fully grown wheat, heres what i have right now:

    if world = "newspawn":
        set block above all farmland to fully grown wheat```
The error given is  "Can't understand this condition/effect: set block above all farmland to fully grown wheat", and i cant seem to find anything online.
open sail
#

You would have to loop an area, check if the block is farmland, then set the block above it to wheat

#

Or you can load a save

#

Where all the wheat is there

rigid wyvern
#

follow up on this, i tried this and it shows no errors, looping whole world works but server freezes, for obvious reasons, and i tried this:

    permission: wheat.respawn
    trigger: 
        set {_loc1} to location -141.5, 120, -68.5 in world "newspawn"
        set {_loc2} to location -17.5, 103, -232.5 in world "newspawn"
        loop all blocks between {_loc1} and {_loc2}:
            if loop-value is farmland:
                set block above loop-value to fully grown wheat plant```
this doesnt work, shows no errors, any ideas why?
rigid wyvern
#

figured it out, had to use within, so it is

    permission: wheat.respawn
    trigger: 
        loop all blocks within location -141.5, 120, -68.5 in world "newspawn" and location -17.5, 103, -232.5 in world "newspawn":
            if loop-block is wet farmland:
                set block above loop-block to fully grown wheat plant```