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

Chunk generator

Discussion in 'Development' started by dragonflex, Mar 25, 2017.

  1. dragonflex

    dragonflex Spider Jockey

    Messages:
    44
    Hi! Please make edit this code generator to magasine on screenshot

    PHP:
    public static function placeObject(ChunkManager $level$chunk$Xofchunk$Zofchunk){
            
    $vec = new Vector3($chunk->getX() * 16 $Xofchunk0$chunk->getZ() * 16 $Zofchunk);
            
    $vec $vec->subtract(707); // fix offset
            
    for($x 4$x 11$x++){
                for(
    $z 4$z 11$z++){
                    
    $level->setBlockIdAt($vec->$x68$vec->$zBlock::GRASS);
                }
            }
            for(
    $x 5$x 10$x++){
                for(
    $z 5$z 10$z++){
                    
    $level->setBlockIdAt($vec->$x67$vec->$zBlock::DIRT);
                    
    $level->setBlockIdAt($vec->$x72$vec->$zBlock::LEAVES); // 72
                
    }
            }
            for(
    $x 6$x 9$x++){
                for(
    $z 6$z 9$z++){
                    
    $level->setBlockIdAt($vec->$x73$vec->$zBlock::LEAVES); // 73
                    
    $level->setBlockIdAt($vec->$x66$vec->$zBlock::DIRT); // 66
                
    }
            }
            
    $level->setBlockIdAt($vec->764$vec->7Block::BEDROCK); // 0
            
    $level->setBlockIdAt($vec->765$vec->7Block::SAND); // 1
            
    $level->setBlockIdAt($vec->766$vec->7Block::SAND); // 2
            
    $level->setBlockIdAt($vec->767$vec->7Block::SAND); // 3
            
    $level->setBlockIdAt($vec->769$vec->7Block::LOG); // 5
            
    $level->setBlockIdAt($vec->770$vec->7Block::LOG); // 6
            
    $level->setBlockIdAt($vec->771$vec->7Block::LOG); // 7
            
    $level->setBlockIdAt($vec->772$vec->7Block::LOG); // 8
            
    $level->setBlockIdAt($vec->773$vec->7Block::LOG); // 9
            
    $level->setBlockIdAt($vec->468$vec->4Block::AIR); // 68
            
    $level->setBlockIdAt($vec->468$vec->10Block::AIR);
            
    $level->setBlockIdAt($vec->1068$vec->4Block::AIR);
            
    $level->setBlockIdAt($vec->1068$vec->10Block::AIR);
            
    $level->setBlockIdAt($vec->572$vec->5Block::AIR); // 72
            
    $level->setBlockIdAt($vec->572$vec->9Block::AIR);
            
    $level->setBlockIdAt($vec->972$vec->5Block::AIR);
            
    $level->setBlockIdAt($vec->972$vec->9Block::AIR);
            
    $level->setBlockIdAt($vec->573$vec->7Block::LEAVES); // 73
            
    $level->setBlockIdAt($vec->773$vec->5Block::LEAVES);
            
    $level->setBlockIdAt($vec->973$vec->7Block::LEAVES);
            
    $level->setBlockIdAt($vec->773$vec->9Block::LEAVES);
            
    $level->setBlockIdAt($vec->774$vec->6Block::LEAVES); // 74
            
    $level->setBlockIdAt($vec->674$vec->7Block::LEAVES);
            
    $level->setBlockIdAt($vec->874$vec->7Block::LEAVES);
            
    $level->setBlockIdAt($vec->774$vec->8Block::LEAVES);
            
    $level->setBlockIdAt($vec->775$vec->7Block::LEAVES); // 75
            
    $level->setBlockIdAt($vec->765$vec->8Block::DIRT); // 65
            
    $level->setBlockIdAt($vec->865$vec->7Block::DIRT);
            
    $level->setBlockIdAt($vec->765$vec->6Block::DIRT);
            
    $level->setBlockIdAt($vec->665$vec->7Block::DIRT);
            
    $level->setBlockIdAt($vec->566$vec->7Block::DIRT); // 66
            
    $level->setBlockIdAt($vec->766$vec->5Block::DIRT);
            
    $level->setBlockIdAt($vec->966$vec->7Block::DIRT);
            
    $level->setBlockIdAt($vec->766$vec->9Block::DIRT);
            
    $level->setBlockIdAt($vec->467$vec->7Block::DIRT); // 67
            
    $level->setBlockIdAt($vec->767$vec->4Block::DIRT);
            
    $level->setBlockIdAt($vec->767$vec->10Block::DIRT);
            
    $level->setBlockIdAt($vec->1067$vec->7Block::DIRT);
        }
     

    Attached Files:

  2. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    We don't do that in development section ;-;
     
    HimbeersaftLP and Sandertv like this.
  3. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    My eyyyeeeesssss :eek:
     
    HimbeersaftLP likes this.
  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.