示例#1
0
    public static void Build(Chunk chunk, BlockPos pos, TerrainGen terrainGen)
    {
        int leaves = terrainGen.GetNoise(pos.x + chunk.pos.x, 0, pos.z + chunk.pos.z, 1f, 2, 1) +1;

        for (int x = -leaves; x <= leaves; x++)
        {
            for (int y = 3; y <= 6; y++)
            {
                for (int z = -leaves; z <= leaves; z++)
                {
                    TerrainGen.SetBlock(chunk, "leaves", pos.Add(x,y,z), true);
                }
            }
        }
        for (int y = 0; y <= 5; y++)
        {
            TerrainGen.SetBlock(chunk, "log", pos.Add(0, y, 0), true);
        }
    }
示例#2
0
    public static void Build(Chunk chunk, BlockPos pos, TerrainGen terrainGen)
    {
        int leaves = terrainGen.GetNoise(pos.x + chunk.pos.x, 0, pos.z + chunk.pos.z, 1f, 2, 1) + 1;

        for (int x = -leaves; x <= leaves; x++)
        {
            for (int y = 3; y <= 6; y++)
            {
                for (int z = -leaves; z <= leaves; z++)
                {
                    TerrainGen.SetBlock(chunk, "leaves", pos.Add(x, y, z), true);
                }
            }
        }
        for (int y = 0; y <= 5; y++)
        {
            TerrainGen.SetBlock(chunk, "log", pos.Add(0, y, 0), true);
        }
    }