aboutsummaryrefslogtreecommitdiff
path: root/azalea-block/src/lib.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2026-01-03 15:46:15 -0930
committermat <git@matdoes.dev>2026-01-03 23:22:01 -0200
commit3137132bb93be664bc025c8e829e4f67431b4fe3 (patch)
tree17b5d42cdf8db6052e99442fe1e82ed823641e3f /azalea-block/src/lib.rs
parent57394c07a5de53061f868c131b42007707a2d7f1 (diff)
downloadazalea-drasl-3137132bb93be664bc025c8e829e4f67431b4fe3.tar.xz
cleanup
Diffstat (limited to 'azalea-block/src/lib.rs')
-rw-r--r--azalea-block/src/lib.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs
index 3c64af25..86e2bc4f 100644
--- a/azalea-block/src/lib.rs
+++ b/azalea-block/src/lib.rs
@@ -52,9 +52,12 @@ pub trait BlockTrait: Debug + Any {
/// returns `Err(())`.
///
/// To get a property, use [`Self::get_property`].
- fn set_property(&mut self, name: &str, new_value: &str) -> Result<(), ()>;
+ fn set_property(&mut self, name: &str, new_value: &str) -> Result<(), InvalidPropertyError>;
}
+#[derive(Debug)]
+pub struct InvalidPropertyError;
+
impl dyn BlockTrait {
pub fn downcast_ref<T: BlockTrait>(&self) -> Option<&T> {
(self as &dyn Any).downcast_ref::<T>()