Add EntityPose

This commit is contained in:
Snowiiii committed 2024-08-29 17:35:49 +02:00
1 parent 443febefdb
commit 7ed46e25a0
7 files changed
+61 -25

No files matched your search

+4
View File
@@ -1,6 +1,8 @@
use entity_type::EntityType;
use pose::EntityPose;
pub mod entity_type;
pub mod pose;
pub type EntityId = i32;
@@ -18,6 +20,7 @@ pub struct Entity {
pub pitch: f32,
// TODO: Change this in diffrent poses
pub standing_eye_height: f32,
pub pose: EntityPose,
}
impl Entity {
@@ -35,6 +38,7 @@ impl Entity {
head_yaw: 0.0,
pitch: 0.0,
standing_eye_height,
pose: EntityPose::Standing,
}
}
}
+22
View File
@@ -0,0 +1,22 @@
#[derive(Clone, Copy)]
#[repr(i32)]
pub enum EntityPose {
Standing = 0,
FallFlying,
Sleeping,
Swimming,
SpinAttack,
Crouching,
LongJumping,
Dying,
Croaking,
UsingTongue,
Sitting,
Roaring,
Sniffing,
Emerging,
Digging,
Sliding,
Shooting,
Inhaling,
}