diff --git a/crates/core/src/interaction.rs b/crates/core/src/interaction.rs index a829fe8..24d020a 100644 --- a/crates/core/src/interaction.rs +++ b/crates/core/src/interaction.rs @@ -6,19 +6,3 @@ pub enum InteractionType { Attack, InteractAt, } - -#[derive(Debug, Serialize, Deserialize)] -pub enum InteractHand { - Main, - Offhand, -} - -#[derive(Debug, Serialize, Deserialize)] -pub enum InteractBlockFace { - Bottom, - Top, - North, - South, - West, - East, -} diff --git a/crates/core/src/lib.rs b/crates/core/src/lib.rs index 4145d96..03df157 100644 --- a/crates/core/src/lib.rs +++ b/crates/core/src/lib.rs @@ -8,6 +8,7 @@ mod entity; mod gamemode; mod gamerules; mod interaction; +mod player; mod positions; pub use biome::Biome; @@ -16,8 +17,9 @@ pub use enchantment::{Enchantment, EnchantmentKind}; pub use entity::EntityKind; pub use gamemode::Gamemode; pub use gamerules::GameRules; -pub use interaction::{InteractBlockFace, InteractHand, InteractionType}; +pub use interaction::InteractionType; +pub use player::Hand; pub use positions::{ - vec3, Aabb, BlockPosition, ChunkPosition, Mat4f, Position, Vec2d, Vec2f, Vec2i, Vec3d, Vec3f, - Vec3i, Vec4d, Vec4f, Vec4i, + vec3, Aabb, BlockFace, BlockPosition, ChunkPosition, Mat4f, Position, Vec2d, Vec2f, Vec2i, + Vec3d, Vec3f, Vec3i, Vec4d, Vec4f, Vec4i, }; diff --git a/crates/core/src/player.rs b/crates/core/src/player.rs new file mode 100644 index 0000000..3d1c75f --- /dev/null +++ b/crates/core/src/player.rs @@ -0,0 +1,7 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Serialize, Deserialize)] +pub enum Hand { + Main, + Offhand, +} diff --git a/crates/core/src/positions.rs b/crates/core/src/positions.rs index cb37bc9..e1f3691 100644 --- a/crates/core/src/positions.rs +++ b/crates/core/src/positions.rs @@ -420,3 +420,13 @@ impl From for ChunkPosition { } } } + +#[derive(Debug, Serialize, Deserialize)] +pub enum BlockFace { + Bottom, + Top, + North, + South, + West, + East, +}