Struct HumanoidRenderState
pub struct HumanoidRenderState<'a> {
pub main_hand: Option<&'a ItemStack>,
pub off_hand: Option<&'a ItemStack>,
pub main_arm_left: bool,
pub use_hand: Option<Hand>,
pub ticks_using_item: i32,
pub use_animation: UseAnimation,
pub main_arm_pose: ArmPose,
pub off_arm_pose: ArmPose,
}Expand description
Borrowed humanoid inputs at arm-pose extraction, shared by players and mobs. Poses are in main/off-hand order, before listeners answer; item declarations are already included. Model-specific animation may subsequently adjust the arms.
Fields§
§main_hand: Option<&'a ItemStack>Stack held in the main hand; empty stacks are absent.
off_hand: Option<&'a ItemStack>Stack held in the off hand; empty stacks are absent.
main_arm_left: boolWhether the entity’s main arm is its left arm.
use_hand: Option<Hand>Hand currently using an item, absent when no item is in use.
ticks_using_item: i32Elapsed item-use ticks at extraction.
use_animation: UseAnimationAnimation of the item currently being used.
main_arm_pose: ArmPoseSelected main-hand pose before any hook answers.
off_arm_pose: ArmPoseSelected off-hand pose before any hook answers.
Auto Trait Implementations§
impl<'a> Freeze for HumanoidRenderState<'a>
impl<'a> RefUnwindSafe for HumanoidRenderState<'a>
impl<'a> Send for HumanoidRenderState<'a>
impl<'a> Sync for HumanoidRenderState<'a>
impl<'a> Unpin for HumanoidRenderState<'a>
impl<'a> UnsafeUnpin for HumanoidRenderState<'a>
impl<'a> UnwindSafe for HumanoidRenderState<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more