Skip to main content

yog_data/content/
mod.rs

1//! The kinds of content every Yog format knows, named in `yog-ids`, and
2//! the ids of the common ones.
3
4use substrate_data::Id;
5
6/// The kinds every Yog format knows.
7pub mod kinds {
8    use yog_ids::{kind, typed};
9
10    substrate_data::kind! {
11        Item = kind::ITEM,
12        Block = kind::BLOCK,
13        Entity = kind::ENTITY,
14        Recipe = kind::RECIPE,
15        Entry = kind::ENTRY,
16        Category = kind::CATEGORY,
17        Fluid = kind::FLUID,
18        Biome = kind::BIOME,
19        Dimension = kind::DIMENSION,
20        Texture = kind::TEXTURE,
21        Video = kind::VIDEO,
22        Material = kind::MATERIAL,
23        Advancement = kind::ADVANCEMENT,
24        Tag = typed::TAG,
25        Res = typed::RES,
26        Lang = typed::LANG,
27        Image = typed::IMAGE,
28    }
29}
30
31/// An item: `@item:minecraft:stick`.
32pub type ItemId = Id<kinds::Item>;
33/// A block: `@block:minecraft:furnace[facing=north]`.
34pub type BlockId = Id<kinds::Block>;
35/// An entity: `@entity:minecraft:pig`.
36pub type EntityId = Id<kinds::Entity>;
37/// A recipe: `@recipe:minecraft:furnace`.
38pub type RecipeId = Id<kinds::Recipe>;