diff options
| author | mat <github@matdoes.dev> | 2022-04-26 15:13:47 +0000 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-04-26 15:13:47 +0000 |
| commit | f9528a9f9a9e73b1d657af7c78d743067307d843 (patch) | |
| tree | d24e46982572d3b8607e130a5f24a7f7c198f484 /azalea-core/src | |
| parent | 15b4dd6bd1c50ee8a9ebadf781e3ecbfdf62e266 (diff) | |
| download | azalea-drasl-f9528a9f9a9e73b1d657af7c78d743067307d843.tar.xz | |
work on adding more stuff for recipes
Diffstat (limited to 'azalea-core/src')
| -rwxr-xr-x | azalea-core/src/lib.rs | 3 | ||||
| -rw-r--r-- | azalea-core/src/slot.rs | 16 |
2 files changed, 19 insertions, 0 deletions
diff --git a/azalea-core/src/lib.rs b/azalea-core/src/lib.rs index cdf07c43..6f52e7e9 100755 --- a/azalea-core/src/lib.rs +++ b/azalea-core/src/lib.rs @@ -4,3 +4,6 @@ pub mod difficulty; pub mod game_type; pub mod resource_location; pub mod serializable_uuid; + +mod slot; +pub use slot::{Slot, SlotData}; diff --git a/azalea-core/src/slot.rs b/azalea-core/src/slot.rs new file mode 100644 index 00000000..2e581586 --- /dev/null +++ b/azalea-core/src/slot.rs @@ -0,0 +1,16 @@ +// TODO: have an azalea-inventory crate and put this there + +#[derive(Debug, Clone)] +pub enum Slot { + Present(SlotData), + Empty, +} + +#[derive(Debug, Clone)] +pub struct SlotData { + pub id: i32, + // TODO: is this really a u8? is it a i8? is it a varint? + // wiki.vg says it's a "byte" + pub count: u8, + pub nbt: azalea_nbt::Tag, +} |
