Struct ItemModelOwner
pub struct ItemModelOwner {Show 16 fields
pub position: [f64; 3],
pub visual_rotation_y_degrees: f32,
pub entity_type: Identifier,
pub main_arm_left: bool,
pub using_this_item: bool,
pub use_item_remaining_ticks: i32,
pub use_duration: i32,
pub crossbow_charge_duration: i32,
pub fishing_cast_with_this_item: bool,
pub is_selected: bool,
pub is_carried: bool,
pub is_view_entity: bool,
pub team_color: Option<i32>,
pub cooldown_percent: f32,
pub is_local_player: bool,
pub last_death_location: Option<GlobalPos>,
}Expand description
The living entity holding the item (ItemOwner), as the item model reads it.
Fields§
§position: [f64; 3]Its position.
visual_rotation_y_degrees: f32getVisualRotationYInDegrees.
entity_type: IdentifierIts entity type (minecraft:player).
main_arm_left: boolWhether its main arm is the left one.
using_this_item: boolWhether it is using this very stack (isUsingItem() && getUseItem() == stack).
use_item_remaining_ticks: i32getUseItemRemainingTicks.
use_duration: i32stack.getUseDuration(owner).
crossbow_charge_duration: i32CrossbowItem.getChargeDuration(stack, owner).
fishing_cast_with_this_item: boolWhether its fishing hook was cast with this item.
is_selected: boolWhether the stack is in its selected hotbar slot.
is_carried: boolWhether the stack is carried on the cursor.
is_view_entity: boolWhether it is the entity the camera views from.
team_color: Option<i32>Its team’s colour, 0xRRGGBB, when it has one.
cooldown_percent: f32ItemCooldowns.getCooldownPercent(stack, 0).
is_local_player: boolWhether it is this client’s player.
last_death_location: Option<GlobalPos>Where it last died, when known.
Trait Implementations§
§impl Clone for ItemModelOwner
impl Clone for ItemModelOwner
§fn clone(&self) -> ItemModelOwner
fn clone(&self) -> ItemModelOwner
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ItemModelOwner
impl Debug for ItemModelOwner
§impl PartialEq for ItemModelOwner
impl PartialEq for ItemModelOwner
impl StructuralPartialEq for ItemModelOwner
Auto Trait Implementations§
impl Freeze for ItemModelOwner
impl RefUnwindSafe for ItemModelOwner
impl Send for ItemModelOwner
impl Sync for ItemModelOwner
impl Unpin for ItemModelOwner
impl UnsafeUnpin for ItemModelOwner
impl UnwindSafe for ItemModelOwner
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