Explosion Farming Enchant - Fix?

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

Deegz

Member
May 14, 2023
3
1
3
Does anyone know how to replace the crops? I've tried so many things, like changing the breaking for the block, and have also tried several replacing techniques, nothing seems to work and i've also had issues where the crop breaks one by one, but still replaced.
If it wasn't obvious, this is for a farming skript, that by chance explodes a certain radius of crops.
loop blocks in radius 3.5 around event-block:
if block at loop-block is ripe wheat plant:
draw 1 explosion at loop-block with offset vector(0, 0, 0) with extra 0
break loop-block using player's tool
give 1 of {data::farming::wheat} to {_p}
(I haven't added on to actually replace the crop, as i've had issues with everything I have tried.)
 
I believe that ripe wheat plant isn't the correct syntax.
Code:
on right click:
    loop all blocks in radius 3.5 of player:
        if loop-block is fully grown wheat plant:
            set loop-block to air  
            draw 1 explosion at location of loop-block
            regrowwheat(location of loop-block)


function regrowwheat(loc: location):
    wait 3 seconds
    set block at {_loc} to fully grown wheat plant

The reason one wheat would break 1 at a time is because you had a delay in your skript.
 
I believe that ripe wheat plant isn't the correct syntax.
Code:
on right click:
    loop all blocks in radius 3.5 of player:
        if loop-block is fully grown wheat plant:
            set loop-block to air 
            draw 1 explosion at location of loop-block
            regrowwheat(location of loop-block)


function regrowwheat(loc: location):
    wait 3 seconds
    set block at {_loc} to fully grown wheat plant

The reason one wheat would break 1 at a time is because you had a delay in your skript.
Ripe wheat plant works fine.
Also I figured it out, so that's fine.
 
  • Like
Reactions: Merrical