예제 #1
0
        public override void PlantTree(IDefinitionManager definitionManager, IPlanet planet, Index3 index, LocalBuilder builder, int seed)
        {
            ushort ground = builder.GetBlock(0, 0, -1);
            if (ground == water) return;

            Random rand = new Random(seed);
            int height = rand.Next(2, 4);

            for (int i = 0; i < height; i++)
                builder.SetBlock(0, 0, i, cactus);
        }
예제 #2
0
        public override void PlantTree(IDefinitionManager definitionManager, IPlanet planet, Index3 index, LocalBuilder builder, int seed)
        {
            ushort ground = builder.GetBlock(0, 0, -1);
            if (ground == water) return;

            Random rand = new Random(seed);
            int height = rand.Next(3, 5);
            int radius = rand.Next(3, height);

            builder.FillSphere(0, 0, height, radius, leave);

            for (int i = 0; i < height + 2; i++)
            {
                builder.SetBlock(0, 0, 0 + i, wood);
            }
        }
예제 #3
0
        public override void PlantTree(IDefinitionManager definitionManager, IPlanet planet, Index3 index, LocalBuilder builder, int seed)
        {
            ushort ground = builder.GetBlock(0, 0, -1);

            if (ground == water)
            {
                return;
            }

            Random rand   = new Random(seed);
            int    height = rand.Next(2, 4);

            for (int i = 0; i < height; i++)
            {
                builder.SetBlock(0, 0, i, cactus);
            }
        }
예제 #4
0
        public override void PlantTree(IDefinitionManager definitionManager, IPlanet planet, Index3 index, LocalBuilder builder, int seed)
        {
            ushort ground = builder.GetBlock(0, 0, -1);

            if (ground == water)
            {
                return;
            }

            Random rand   = new Random(seed);
            int    height = rand.Next(3, 5);
            int    radius = rand.Next(3, height);

            builder.FillSphere(0, 0, height, radius, leave);

            for (int i = 0; i < height + 2; i++)
            {
                builder.SetBlock(0, 0, 0 + i, wood);
            }
        }
예제 #5
0
        public override void PlantTree(IPlanet planet, Index3 index, LocalBuilder builder, int seed)
        {
            ushort ground = builder.GetBlock(0, 0, -1);

            if (ground == water)
            {
                return;
            }

            Random rand   = new Random(seed);
            int    height = rand.Next(2, 4);

            var infos = new BlockInfo[height];

            for (int i = 0; i < height; i++)
            {
                infos[i] = (0, 0, i, cactus);
            }
            builder.SetBlocks(false, infos);
        }
예제 #6
0
        public override void PlantTree(IPlanet planet, Index3 index, LocalBuilder builder, int seed)
        {
            ushort ground = builder.GetBlock(0, 0, -1);

            if (ground == water)
            {
                return;
            }

            Random rand   = new Random(seed);
            int    height = rand.Next(6, 10);
            int    radius = rand.Next(3, height - 2);

            builder.FillSphere(0, 0, height, radius, leave);

            var infos = new BlockInfo[height + 2];

            for (int i = 0; i < height + 2; i++)
            {
                infos[i] = (0, 0, i, wood);
            }
            builder.SetBlocks(false, infos);
        }