mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-01 05:29:05 +02:00
resource: remove "minecraft:" prefix from hash keys
Shorter keys mean less data to hash.
This commit is contained in:
parent
483cdf48c8
commit
95e4e45974
3 changed files with 941 additions and 940 deletions
File diff suppressed because it is too large
Load diff
|
@ -58,7 +58,8 @@ pub struct BlockTypeMap(HashMap<String, BlockType>);
|
|||
impl BlockTypeMap {
|
||||
#[inline]
|
||||
pub fn get(&self, id: &str) -> Option<BlockType> {
|
||||
self.0.get(id).copied()
|
||||
let suffix = id.strip_prefix("minecraft:")?;
|
||||
self.0.get(suffix).copied()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue