mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-04 17:23:33 +01:00
resource: remove LEGACY_BLOCK_TYPES reexport
As the array is only used internally now, we can also remove the "minecraft:" prefix from the entries. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
parent
04bc3e5d53
commit
ed5fb9a6cf
2 changed files with 510 additions and 545 deletions
File diff suppressed because it is too large
Load diff
|
@ -5,7 +5,6 @@ use std::collections::HashMap;
|
|||
|
||||
use enumflags2::{bitflags, BitFlags};
|
||||
|
||||
pub use legacy_block_types::LEGACY_BLOCK_TYPES;
|
||||
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
|
||||
|
||||
#[bitflags]
|
||||
|
@ -65,12 +64,8 @@ impl Default for BlockTypes {
|
|||
.iter()
|
||||
.map(|(k, v)| (String::from(*k), *v))
|
||||
.collect();
|
||||
let legacy_block_types = Box::new(LEGACY_BLOCK_TYPES.map(|inner| {
|
||||
inner.map(|id| {
|
||||
*id.strip_prefix("minecraft:")
|
||||
.and_then(|suffix| block_type_map.get(suffix))
|
||||
.expect("Unknown legacy block type")
|
||||
})
|
||||
let legacy_block_types = Box::new(legacy_block_types::LEGACY_BLOCK_TYPES.map(|inner| {
|
||||
inner.map(|id| *block_type_map.get(id).expect("Unknown legacy block type"))
|
||||
}));
|
||||
|
||||
BlockTypes {
|
||||
|
|
Loading…
Add table
Reference in a new issue