Skip to content

Commit

Permalink
anvil saving foundation
Browse files Browse the repository at this point in the history
  • Loading branch information
Snowiiii committed Dec 18, 2024
1 parent 133ef45 commit 60c1c29
Show file tree
Hide file tree
Showing 7 changed files with 467 additions and 147 deletions.
8 changes: 8 additions & 0 deletions pumpkin-world/src/block/block_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ pub static BLOCK_ID_BY_REGISTRY_ID: LazyLock<HashMap<String, u16>> = LazyLock::n
map
});

pub static BLOCK_ID_TO_REGISTRY_ID: LazyLock<HashMap<u16, String>> = LazyLock::new(|| {
let mut map = HashMap::new();
for block in &*BLOCKS.blocks {
map.insert(block.default_state_id, block.name.clone());
}
map
});

pub static BLOCK_ID_BY_STATE_ID: LazyLock<HashMap<u16, u16>> = LazyLock::new(|| {
let mut map = HashMap::new();
for block in &BLOCKS.blocks {
Expand Down
Loading

0 comments on commit 60c1c29

Please sign in to comment.