libcraft: Add entity interaction types (#21) · feather-rs/feather@bc0f103 · GitHub
Skip to content

Commit bc0f103

Browse files
libcraft: Add entity interaction types (#21)
* Add entity interaction types * Derive `Serialize` and `Deserialize` on the interaction types. Co-authored-by: Caelum van Ispelen <caelunshun@gmail.com>
1 parent 325221d commit bc0f103

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

libcraft/crates/core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
use serde::{Deserialize, Serialize};
2+
3+
#[derive(Debug, Serialize, Deserialize)]
4+
pub enum InteractionType {
5+
Interact,
6+
Attack,
7+
InteractAt,
8+
}
9+
10+
#[derive(Debug, Serialize, Deserialize)]
11+
pub enum InteractHand {
12+
Main,
13+
Offhand,
14+
}

libcraft/crates/core/src/lib.rs

Lines changed: 2 additions & 0 deletions

0 commit comments

Comments
 (0)