1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use std::ops::{Deref, DerefMut};

use minecraft_assets::color::Color;

use super::AbstractArrow;

/// An instance of a minecraft arrow or tipped arrow
#[derive(PartialEq, Default)]
pub struct Arrow {
    abstract_arrow: AbstractArrow,
    /// The color of the arrow
    ///
    /// # Note
    ///
    /// The color should be set to `None` if it is an arrow and the color should be set for a
    /// tipped arrow
    pub color: Option<Color>,
}
impl Deref for Arrow {
    type Target = AbstractArrow;

    fn deref(&self) -> &Self::Target {
        &self.abstract_arrow
    }
}
impl DerefMut for Arrow {
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.abstract_arrow
    }
}