Loop all blocks not working

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

Shroomz

Supporter +
Jun 22, 2017
44
0
6
25
What I have tried to do is that when crafting any iron tool it would then loop all blocks around the crafting bench to check if there is anvil, furnace and fire. If all these are present then it would allow the crafting to happen. For some reason this is not working as expected but gives no error when reloading it:

Code:
on craft of any iron tool:
    loop all blocks in radius 5 around event-block:
        if loop-block is not anvil:
            message "&ctest"
            cancel event
            stop
        if loop-block is not furnace:
            message "&ctestt"
            cancel event
            stop
        if loop-block is not fire:
            message "&ctesttt"
            cancel event
            stop
 
I don't think there is an event-block in a craft event.
You will probably have to loop around the player or try the target block of the player
 
Status
Not open for further replies.