Package net.minecraft.world.gen.feature

Examples of net.minecraft.world.gen.feature.WorldGenerator.generate()


        else if (this.blockID == Block.mushroomRed.blockID)
        {
            worldgenbigmushroom = new WorldGenBigMushroom(1);
        }*/

        if (obj != null && obj.generate(world, random, x, y, z))
        {
            return true;
        }
        else
        {
View Full Code Here


                    xSpawn = xPos + random.nextInt(24) - 4;
                    zSpawn = zPos + random.nextInt(24) - 4;
                    ySpawn = findGround(world, xSpawn, random.nextInt(64) + 32, zSpawn);
                    if (ySpawn != -1)
                    {
                        obj.generate(world, random, xSpawn, ySpawn, zSpawn);
                    }
                }
            }
        }
    }
View Full Code Here

            obj = new WillowGen(true);

        else
            obj = new RareTreeGen(true, 4, 2, 0, 0);

        if (!(obj.generate(world, random, x, y, z)))
            world.setBlock(x, y, z, this, md + 8, 3);
    }

    @Override
    public int damageDropped (int i)
View Full Code Here

            obj = new FusewoodGen(true, 3, 1);

        else
            obj = new RedwoodTreeGen(true, NContent.redwood);

        if (!(obj.generate(world, random, x, y, z)))
            world.setBlock(x, y, z, this, md + 8, 3);
    }

    @Override
    public int damageDropped (int i)
View Full Code Here

                world.setBlock(x + x1 + 1, y, z + z1 + 1, Blocks.air);
            }
            else
                world.setBlock(x, y, z, Blocks.air);
           
            if (!tree.generate(world, rand, x + x1 + offset, y, z + z1 + offset))
            {
                if (isHuge)
                {
                    world.setBlock(x + x1, y, z + z1, this, metadata, 3);
                    world.setBlock(x + x1 + 1, y, z + z1, this, metadata, 3);
View Full Code Here

            else
            {
                world.setBlock(x, y, z, Blocks.air);
            }
           
            if (!tree.generate(world, rand, x + x1, y, z + z1))
            {
                if (isHuge)
                {
                    world.setBlock(x + x1, y, z + z1, this, metadata, 3);
                    world.setBlock(x + x1 + 1, y, z + z1, this, metadata, 3);
View Full Code Here

    if (gen != null) {
      for (int i = 0; i < times; ++i) {
        final int x = chunkX + rand.nextInt(16) + 8;
        final int y = rand.nextInt(128);
        final int z = chunkZ + rand.nextInt(16) + 8;
        if (gen.generate(world, rand, x, y, z)) ++count;
      }
    }
    return count;
  }
View Full Code Here

            @Override
            public boolean generate(World world, Random rand, int x, int y, int z)
            {
              // TODO: Check correct generation
                final WorldGenerator worldGen = new WorldGenMegaJungle(false, 10 + rand.nextInt(20), 0, 3, 3);
                return worldGen.generate(world, rand, x, y, z);
            }
           
        }, 6);
        addWeightedTreeGenForBiome(biome.get(), new WorldGenAbstractTree(false)
        {
View Full Code Here

        {
            @Override
            public boolean generate(World world, Random rand, int x, int y, int z)
            {
                final WorldGenerator worldGen = new WorldGenTrees(false, 4 + rand.nextInt(7), 3, 3, true);
                return worldGen.generate(world, rand, x, y, z);
            }
        }, 12);
    }
   
    private static void addGrass(Optional<? extends BiomeGenBase> biome)
View Full Code Here

        {
            @Override
            public boolean generate(World world, Random rand, int x, int y, int z)
            {
                final WorldGenerator worldGen = new WorldGenShrub(3, rand.nextInt(3));
                return worldGen.generate(world, rand, x, y, z);
            }
        }, 50);
        addWeightedTreeGenForBiome(biome.get(), JAPANESE_MAPLE_SHRUB_GEN, 50);
    }
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.