mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
Move assets folder outside of pumpkin-world
This commit is contained in:
@@ -5,7 +5,7 @@ use serde::Deserialize;
|
||||
use super::block_id::BlockId;
|
||||
|
||||
pub static BLOCKS: LazyLock<HashMap<String, RegistryBlockType>> = LazyLock::new(|| {
|
||||
serde_json::from_str(include_str!("../../assets/blocks.json"))
|
||||
serde_json::from_str(include_str!("../../../assets/blocks.json"))
|
||||
.expect("Could not parse block.json registry.")
|
||||
});
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::{collections::HashMap, sync::LazyLock};
|
||||
|
||||
pub const ITEM_REGISTRY: &str = "minecraft:item";
|
||||
|
||||
const REGISTRY_JSON: &str = include_str!("../assets/registries.json");
|
||||
const REGISTRY_JSON: &str = include_str!("../../assets/registries.json");
|
||||
|
||||
#[derive(serde::Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
pub struct RegistryElement {
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::{collections::HashMap, sync::LazyLock};
|
||||
use super::Rarity;
|
||||
use crate::global_registry::{self, ITEM_REGISTRY};
|
||||
|
||||
const ITEMS_JSON: &str = include_str!("../../assets/items.json");
|
||||
const ITEMS_JSON: &str = include_str!("../../../assets/items.json");
|
||||
|
||||
pub static ITEMS: LazyLock<HashMap<String, ItemElement>> = LazyLock::new(|| {
|
||||
serde_json::from_str(ITEMS_JSON).expect("Could not parse items.json registry.")
|
||||
|
||||
Reference in New Issue
Block a user