refactor(block-entities): from async to sync Part 4

This commit is contained in:
Alexander Medvedev committed 2026-08-26 21:13:42 +02:00
1 parent 52038e3356
commit e2a138cfa6
68 files changed
+830 -1018

No files matched your search

@@ -1,4 +1,3 @@
use std::pin::Pin;
use std::sync::Arc;
use crossbeam::atomic::AtomicCell;
@@ -38,15 +37,10 @@ impl BlockEntity for CreakingHeartBlockEntity {
}
}
fn write_nbt<'a>(
&'a self,
nbt: &'a mut NbtCompound,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>> {
Box::pin(async move {
if let Some(uuid) = self.creaking_uuid.load() {
nbt.put_string("creaking_uuid", uuid.to_string());
}
})
fn write_nbt(&self, nbt: &mut NbtCompound) {
if let Some(uuid) = self.creaking_uuid.load() {
nbt.put_string("creaking_uuid", uuid.to_string());
}
}
fn as_any(&self) -> &dyn std::any::Any {