diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2025-12-12 00:56:02 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-12 00:56:02 -0600 |
| commit | f9c25665c203d6377ace62f1e95381d037d8fd9e (patch) | |
| tree | 8b4131d20fe661d3cc1175ec27f801fe61df41ea /azalea/src/pathfinder/tests.rs | |
| parent | 82ad975242292d5875780b4398b62637674bf50a (diff) | |
| download | azalea-drasl-f9c25665c203d6377ace62f1e95381d037d8fd9e.tar.xz | |
Refactor azalea-registry (#294)
* move registries in azalea-registry into separate modules
* rename Item and Block to ItemKind and BlockKind
* remove 'extra' registries from azalea-registry
* hide deprecated items from docs
* use DamageKindKey instead of Identifier when parsing registries
* store tag entries as a Vec instead of a HashSet
* sort tag values by protocol id
* update changelog
Diffstat (limited to 'azalea/src/pathfinder/tests.rs')
| -rw-r--r-- | azalea/src/pathfinder/tests.rs | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/azalea/src/pathfinder/tests.rs b/azalea/src/pathfinder/tests.rs index 7b33ca18..8c573405 100644 --- a/azalea/src/pathfinder/tests.rs +++ b/azalea/src/pathfinder/tests.rs @@ -7,6 +7,7 @@ use std::{ use azalea_block::BlockState; use azalea_core::position::{BlockPos, ChunkPos, Vec3}; +use azalea_registry::builtin::BlockKind; use azalea_world::{Chunk, ChunkStorage, PartialChunkStorage}; use super::{ @@ -66,7 +67,7 @@ fn setup_simulation_world( partial_chunks.set(&chunk_pos, Some(Chunk::default()), &mut chunks); } for block_pos in solid_blocks { - chunks.set_block_state(*block_pos, azalea_registry::Block::Stone.into()); + chunks.set_block_state(*block_pos, BlockKind::Stone.into()); } for (block_pos, block_state) in extra_blocks { chunks.set_block_state(*block_pos, *block_state); @@ -285,17 +286,11 @@ fn test_mine_through_non_colliding_block() { BlockPos::new(0, 72, 1), &[BlockPos::new(0, 71, 1)], &[ - ( - BlockPos::new(0, 71, 0), - azalea_registry::Block::SculkVein.into(), - ), - ( - BlockPos::new(0, 70, 0), - azalea_registry::Block::GrassBlock.into(), - ), + (BlockPos::new(0, 71, 0), BlockKind::SculkVein.into()), + (BlockPos::new(0, 70, 0), BlockKind::GrassBlock.into()), // this is an extra check to make sure that we don't accidentally break the block // below (since tnt will break instantly) - (BlockPos::new(0, 69, 0), azalea_registry::Block::Tnt.into()), + (BlockPos::new(0, 69, 0), BlockKind::Tnt.into()), ], ); |
