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

The light in the new world is like hell

Discussion in 'Help' started by MrForter, Sep 11, 2022.

  1. MrForter

    MrForter Creeper

    Messages:
    2
    GitHub:
    Forter6
    how to make the lighting in my created world be like hell? MCPE 1.1.x
    PHP:
    <?php

    namespace Forter\oneblock\island\generator;

    use 
    pocketmine\block\Block;
    use 
    pocketmine\level\ChunkManager;
    use 
    pocketmine\level\generator\biome\{ BiomeBiomeSelector };
    use 
    pocketmine\level\generator\Generator;
    use 
    pocketmine\level\generator\object\OreType;
    use 
    pocketmine\level\generator\populator\{ GroundCoverOrePopulator };
    use 
    pocketmine\level\Level;
    use 
    pocketmine\math\Vector3;
    use 
    pocketmine\utils\Random;

    class 
    NetherGenerator extends Generator{

        protected 
    $level;
        protected 
    $random;


        public function 
    __construct(array $options = []){}

        public function 
    init(ChunkManager $levelRandom $random){
            
    $this->level $level;
            
    $this->random $random;
        }

        public function 
    getSettings(){
            return [];
        }
        
        public function 
    getName(){
            return 
    "ad";
        }

        public function 
    generateChunk($chunkX$chunkZ){
            
    $chunk $this->level->getChunk($chunkX$chunkZ);
            if (
    $chunkX == && $chunkZ == 0$chunk->setBlockId(8127887);
            for(
    $x 0$x 16; ++$x){
                for(
    $z 0$z 16; ++$z){
                    for(
    $y 0$y 128; ++$y){
                        
    $biome Biome::getBiome(Biome::HELL);
                        
    $chunk->setBiomeId($x$z$biome->getId());
                        
    $chunk->setBlockLight($x$y 1$z15);//does not work
                    
    }
                }
            }
            
    $chunk->setGenerated();
        }

        public function 
    populateChunk($chunkX$chunkZ){
            
    $this->random->setSeed(0xdeadbeef ^ ($chunkX << 8) ^ $chunkZ $this->level->getSeed());
            
    //$centerOfChunk = new Vector3($chunkX * 16 - 8, 128, $chunkZ * 16 - 8);     
        
    }
        
        public function 
    getSpawn(): Vector3{
            return new 
    Vector3(264255264);
        }
    }
     
  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.