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

use super::AbstractMinecart;

mod minecart_hopper;
pub use minecart_hopper::*;
mod minecart_chest;
pub use minecart_chest::*;

/// An interface to store container minecart data
#[derive(PartialEq, Default)]
pub struct AbstractMinecartContainer {
    abstract_minecart: AbstractMinecart,
}
impl Deref for AbstractMinecartContainer {
    type Target = AbstractMinecart;

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