mirror of
https://github.com/italicsjenga/valence.git
synced 2025-01-29 06:46:33 +11:00
b83b9f76ed
* Expose extracted enchantments to Rust. * Give enchantments a `level: i16` field. * Update enchantment derive impls * Restructure how enchants are exposed to Rust through C-like enums * Update build/enchant.rs Co-authored-by: Ryan Johnson <ryanj00a@gmail.com> * Update build/enchant.rs Co-authored-by: Ryan Johnson <ryanj00a@gmail.com> * Move enchantment sources to their own struct. * make id() function return it's discriminant instead of matching Co-authored-by: Ryan Johnson <ryanj00a@gmail.com>
5 lines
330 B
Rust
5 lines
330 B
Rust
// enchant.rs exposes constant values provided by the build script.
|
|
// All enchantment variants are located in `EnchantmentKind`. You can use the
|
|
// associated const fn functions of `EnchantmentKind` to access details about an
|
|
// enchantment type. enchantment specific functions
|
|
include!(concat!(env!("OUT_DIR"), "/enchant.rs"));
|