diff --git a/crates/resource/src/block_types.rs b/crates/resource/src/block_types.rs index 4cdc55c..53abd54 100644 --- a/crates/resource/src/block_types.rs +++ b/crates/resource/src/block_types.rs @@ -1,7 +1,12 @@ +//! Block type information +//! +//! This file is generated using resource/generate.py, do not edit + use enumflags2::make_bitflags; use super::*; +/// List if known block types and their properties pub const BLOCK_TYPES: &[(&str, ConstBlockType)] = &[ ( "acacia_button", diff --git a/crates/resource/src/lib.rs b/crates/resource/src/lib.rs index b499fbf..1afcc62 100644 --- a/crates/resource/src/lib.rs +++ b/crates/resource/src/lib.rs @@ -4,12 +4,10 @@ mod biomes; mod block_color; +mod block_types; mod legacy_biomes; mod legacy_block_types; -#[allow(clippy::missing_docs_in_private_items)] // Generated module -mod block_types; - use std::collections::HashMap; use enumflags2::{bitflags, BitFlags}; diff --git a/resource/generate.py b/resource/generate.py index 8064482..ab91324 100755 --- a/resource/generate.py +++ b/resource/generate.py @@ -14,10 +14,15 @@ with open(sys.argv[1]) as f: output = {} with open(sys.argv[2], 'w') as f: + print('//! Block type information', file=f); + print('//!', file=f); + print('//! This file is generated using resource/generate.py, do not edit', file=f); + print('', file=f) print('use enumflags2::make_bitflags;', file=f); print('', file=f) print('use super::*;', file=f) print('', file=f) + print('/// List if known block types and their properties', file=f); print('pub const BLOCK_TYPES: &[(&str, ConstBlockType)] = &[', file=f) for name, info in colors.items():