diff options
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, +} |
