Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mushroom generation

Comments in 'Plugin Development' started by Muqsit, Mar 14, 2016.

  1. Muqsit
    Offline

    Muqsit Active Member

    Joined:
    Sep 9, 2015
    Posts:
    175
    Minecraft User:
    Muqsit
    Can anyone here help me in mushroom generations? I'm trying to code mushroom biomes but I have no idea over Mushroom (object) generation. Here's my code. The problem is that the mushroom stem is made of quartz pillars. I would like it to be made out of 100:15. Help?

    PHP:
    namespace pocketmine\level\generator\object;

    use 
    pocketmine\block\Block;
    use 
    pocketmine\block\RedMushroomBlock;
    use 
    pocketmine\level\ChunkManager;
    use 
    pocketmine\utils\Random;

    class 
    MushroomTree extends Tree{

        public function 
    __construct(){
            
    $this->trunkBlock Block::QUARTZ_BLOCK;
            
    $this->leafBlock Block::RED_MUSHROOM_BLOCK;
            
    $this->type RedMushroomBlock::RED;
        }

        public function 
    placeObject(ChunkManager $level$x$y$zRandom $random){
            
    $this->treeHeight $random->nextBoundedInt(3) + 4;
            
    parent::placeObject($level$x$y$z$random);
        }
    }

    Attached Files:

Share This Page

Advertisement