From 7517a207db658c98d5b97b3b3f44df6725c025a2 Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 2 Jun 2025 19:23:59 -0330 Subject: rename the Block trait to BlockTrait to disambiguate with azalea_registry::Block --- azalea-block/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea-block/src/lib.rs') diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index fdffe372..4f929cd3 100644 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -15,7 +15,7 @@ pub use block_state::BlockState; pub use generated::{blocks, properties}; pub use range::BlockStates; -pub trait Block: Debug + Any { +pub trait BlockTrait: Debug + Any { fn behavior(&self) -> BlockBehavior; /// Get the Minecraft ID for this block. For example `stone` or /// `grass_block`. @@ -27,8 +27,8 @@ pub trait Block: Debug + Any { /// `azalea_registry::Block` doesn't contain any state data. fn as_registry_block(&self) -> azalea_registry::Block; } -impl dyn Block { - pub fn downcast_ref(&self) -> Option<&T> { +impl dyn BlockTrait { + pub fn downcast_ref(&self) -> Option<&T> { (self as &dyn Any).downcast_ref::() } } -- cgit v1.2.3