Struct HandRender
pub struct HandRender<'a> {
pub player: u128,
pub player_entity_id: i32,
pub hand: Hand,
pub stack: Option<&'a ItemStack>,
pub partial: f32,
pub interpolated_pitch: f32,
pub swing: f32,
pub equip: f32,
pub packed_light: u32,
pub translation: [f32; 3],
pub rotation: [f32; 3],
pub scale: f32,
}Expand description
Context and adjustable pose for a first-person hand render.
Translation is in blocks and rotation is in degrees (pitch, yaw, roll). The renderer applies the transform before the ordinary hand and item poses.
Fields§
§player: u128The UUID of the player whose hand is drawn.
player_entity_id: i32The network id of that player.
hand: HandWhich hand is drawn.
stack: Option<&'a ItemStack>The stack shown in the hand; None for the empty main-hand arm.
partial: f32The fraction of the current tick elapsed, 0 to 1.
interpolated_pitch: f32The player pitch interpolated for this frame, in degrees.
swing: f32The swing progress, 0 to 1.
equip: f32The inverse equip height, including the swap animation scale.
packed_light: u32Vanilla packed light at the eyes (LightCoordsUtil.pack: block << 4 | sky << 20).
translation: [f32; 3]A mod-set offset in blocks; applied before the hand is drawn.
rotation: [f32; 3]A mod-set rotation as pitch, yaw and roll in degrees.
scale: f32A mod-set uniform scale; 1 leaves the size alone.