Skip to content

Commit

Permalink
add language
Browse files Browse the repository at this point in the history
  • Loading branch information
theaddonn committed Jun 30, 2024
1 parent f249dc1 commit a39d6a6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packs/src/behavior/behavior_pack.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
use std::collections::HashMap;
use std::path::Path;

use uuid::{Uuid, Version};

use crate::error::PackError;
use crate::language::Language;
use crate::pack::Pack;

pub struct BehaviorPack {
Expand All @@ -11,6 +13,7 @@ pub struct BehaviorPack {
description: String,
uuid: Uuid,
min_engine_version: Version,
languages: HashMap<String, Language>,
}

impl Pack for BehaviorPack {
Expand Down
10 changes: 10 additions & 0 deletions packs/src/language.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use std::path::Path;
use crate::error::PackError;

pub struct Language(Vec<String>);

impl Language {
pub fn open(path: impl AsRef<Path>) -> Result<Self, PackError> {
todo!()
}
}
1 change: 1 addition & 0 deletions packs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ pub mod behavior;
pub mod error;
pub mod pack;
pub mod resource;
pub mod language;
3 changes: 3 additions & 0 deletions packs/src/resource/resource_pack.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
use std::collections::HashMap;
use std::path::Path;

use uuid::{Uuid, Version};

use crate::error::PackError;
use crate::language::Language;
use crate::pack::Pack;

pub struct ResourcePack {
Expand All @@ -11,6 +13,7 @@ pub struct ResourcePack {
description: String,
uuid: Uuid,
min_engine_version: Version,
languages: HashMap<String, Language>,
}

impl Pack for ResourcePack {
Expand Down

0 comments on commit a39d6a6

Please sign in to comment.