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
use std::ops::{Deref, DerefMut};

use super::PathfinderMob;
mod squid;
pub use squid::*;
mod dolphin;
pub use dolphin::*;
mod abstract_fish;
pub use abstract_fish::*;

/// An interface of a water animal
#[derive(PartialEq, Default)]
pub struct WaterAnimal {
    pathfinder_mob: PathfinderMob,
}
impl Deref for WaterAnimal {
    type Target = PathfinderMob;

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