Custom Random block generator

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

Rishaik

Member
Feb 9, 2021
3
0
1
23
( Sorry for bad eng )
I'm currently working on a custom block generator.
I want to code that generates a block when the block is broken.
However, there is no way to recreate the block because we does not use the cobblestone generator.
Instead of lava, I want to keep creating cobblestones at the point where water and fences meet.

And my code is

Code:
on break:
    event-block is fence
    loop blocks in radius 1 of event-block:
        y-coordinate of event-block is y-coordinate of loop-block
        loop-block is air:
            add location of loop-block to {_checks::*}
            wait 1 tick
            loop {_checks::*}:   
                block at loop-value-1 is cobblestone
                chance of 30.25%:
                    set block at loop-value-1 to coal ore
                    wait 1 tick
                    set loop-block to cobblestone
                chance of 30.0%:
                    set block at loop-value-1 to iron ore
                    wait 1 tick
                    set loop-block to cobblestone
                chance of 0.35%:
                    set block at loop-value-1 to emerald ore
                    wait 1 tick
                    set loop-block to cobblestone
                chance of 0.35%:
                    set block at loop-value-1 to gold ore
                    wait 1 tick
                    set loop-block to cobblestone
                chance of 0.2%:
                    set block at loop-value-1 to diamond ore
                    wait 1 tick
                    set loop-block to cobblestone
                chance of 0.4%:
                    set block at loop-value-1 to lapis ore
                    wait 1 tick
                    set loop-block to cobblestone
                chance of 0.3%:
                    set block at loop-value-1 to redstone ore
                    wait 1 tick
                    set loop-block to cobblestone
 
Last edited:
upload_2021-11-25_20-39-57.png

Clicking on the plus icon, will bring this dropdown where you can select code and paste your code in there, it makes it easier to read for others,
Due to this I cant rlly understand without the indentations, reply back to my message so I can further help you :emoji_slight_smile:
 
yeah i can't understand it as well, also if i really understood right then just use "set block" when the other block is broken.
 
Status
Not open for further replies.