yog_formats/material.rs
1//! `.ymaterial` — a material: how a surface is drawn — the textures its
2//! model's faces name (`#side`, `#top`, …) and its render layer. Its id is
3//! its path under `resources/` without the extension, named elsewhere as
4//! `@material:<mod id>:block/ruby`; blocks, items and entities take one
5//! instead of listing textures themselves.
6
7use yog_data::{Ordered, Schema};
8
9use crate::content::{RenderLayer, Texture};
10
11/// A `.ymaterial`.
12#[derive(Schema, Debug, Clone, PartialEq, Default)]
13pub struct MaterialFile {
14 /// The textures, by the slot a model's faces name (`all`, `side`, `top`, `particle`…).
15 pub textures: Ordered<Texture>,
16 /// How it's blended: `solid` (the default), `cutout`, `cutout_mipped`, `translucent`.
17 pub render_layer: Option<RenderLayer>,
18}