datapack 2.0.1

An easy way to create Minecraft datapacks in rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::component::Component;

#[derive(Clone)]
pub struct Namespace {
    pub name: String,
    pub components: Vec<Component>
}

impl Namespace {
    pub fn new(name: &str) -> Self {
        Self { name: String::from(name), components: Vec::new() }
    }

    pub fn add_component(&mut self, component: Component) -> &mut Self {
        self.components.push(component);
        self
    }
}