Refactor block entity creator fn into separate typedef
@@ -6,9 +6,10 @@ use feather_server_types::{BlockEntity, BlockUpdateEvent, EntitySpawnEvent, Game
use fecs::{EntityBuilder, World};
use once_cell::sync::Lazy;
-/// Global mapping of blocks which require blcok entities.
-static BLOCK_ENTITY_MAP: Lazy<AHashMap<BlockKind, fn(BlockPosition) -> EntityBuilder>> =
- Lazy::new(|| {
+type BlockEntityCreator = fn(BlockPosition) -> EntityBuilder;
+
+/// Global mapping of blocks which require block entities.
+static BLOCK_ENTITY_MAP: Lazy<AHashMap<BlockKind, BlockEntityCreator>> = Lazy::new(|| {
let mut map: AHashMap<_, fn(BlockPosition) -> EntityBuilder> = AHashMap::new();
map.insert(BlockKind::Chest, chest::create);
