1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

setBlockIdAt random blocks

Discussion in 'Facepalm' started by SergeyIvanov, Jun 28, 2017.

  1. SergeyIvanov

    SergeyIvanov Witch

    Messages:
    59
    GitHub:
    sergeyivanov14
    Hi, I want to make random blocks like in the first picture, but I put random blocks in the chunks, ie 1 chunk is equal to one ID.

    My code:
    PHP:
              $cover = array(113413);
            
    $this->setGroundCover([
                
    Block::get($cover[array_rand($cover)], 0),
                
    Block::get($cover[array_rand($cover)], 0),
                
    Block::get($cover[array_rand($cover)], 0),
                
    Block::get(10),
                
    Block::get(10),
                
    Block::get(10)
            ]);
     

    Attached Files:

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.