aboutsummaryrefslogtreecommitdiff
path: root/azalea-block/src/block_state.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-06-02 19:23:59 -0330
committermat <git@matdoes.dev>2025-06-03 06:11:26 +0700
commit7517a207db658c98d5b97b3b3f44df6725c025a2 (patch)
tree5daabe20be53705acd1fee93134421dc23b4d6c6 /azalea-block/src/block_state.rs
parentabf995a70245028f9cc860ee231dc671f14adfcc (diff)
downloadazalea-drasl-7517a207db658c98d5b97b3b3f44df6725c025a2.tar.xz
rename the Block trait to BlockTrait to disambiguate with azalea_registry::Block
Diffstat (limited to 'azalea-block/src/block_state.rs')
-rw-r--r--azalea-block/src/block_state.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/azalea-block/src/block_state.rs b/azalea-block/src/block_state.rs
index dfa2a9b2..a954c333 100644
--- a/azalea-block/src/block_state.rs
+++ b/azalea-block/src/block_state.rs
@@ -5,7 +5,7 @@ use std::{
use azalea_buf::{AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError};
-use crate::Block;
+use crate::BlockTrait;
/// The type that's used internally to represent a block state ID.
///
@@ -121,14 +121,14 @@ impl Debug for BlockState {
f,
"BlockState(id: {}, {:?})",
self.id,
- Box::<dyn Block>::from(*self)
+ Box::<dyn BlockTrait>::from(*self)
)
}
}
impl From<BlockState> for azalea_registry::Block {
fn from(value: BlockState) -> Self {
- Box::<dyn Block>::from(value).as_registry_block()
+ Box::<dyn BlockTrait>::from(value).as_registry_block()
}
}
@@ -149,11 +149,11 @@ mod tests {
#[test]
fn test_from_blockstate() {
- let block: Box<dyn Block> = Box::<dyn Block>::from(BlockState::AIR);
+ let block: Box<dyn BlockTrait> = Box::<dyn BlockTrait>::from(BlockState::AIR);
assert_eq!(block.id(), "air");
- let block: Box<dyn Block> =
- Box::<dyn Block>::from(BlockState::from(azalea_registry::Block::FloweringAzalea));
+ let block: Box<dyn BlockTrait> =
+ Box::<dyn BlockTrait>::from(BlockState::from(azalea_registry::Block::FloweringAzalea));
assert_eq!(block.id(), "flowering_azalea");
}