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