chore: move to crates folder
This commit is contained in:
1 parent
5d10c0d8a8
commit
cb3660bcd2
3393 files changed
+1270
-741
No files matched your search
@@ -0,0 +1,46 @@
|
||||
use std::pin::Pin;
|
||||
|
||||
use pumpkin_nbt::compound::NbtCompound;
|
||||
use pumpkin_util::math::position::BlockPos;
|
||||
|
||||
use super::BlockEntity;
|
||||
|
||||
pub struct CreakingHeartBlockEntity {
|
||||
pub position: BlockPos,
|
||||
}
|
||||
|
||||
impl BlockEntity for CreakingHeartBlockEntity {
|
||||
fn resource_location(&self) -> &'static str {
|
||||
Self::ID
|
||||
}
|
||||
|
||||
fn get_position(&self) -> BlockPos {
|
||||
self.position
|
||||
}
|
||||
|
||||
fn from_nbt(_nbt: &pumpkin_nbt::compound::NbtCompound, position: BlockPos) -> Self
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
Self { position }
|
||||
}
|
||||
|
||||
fn write_nbt<'a>(
|
||||
&'a self,
|
||||
_nbt: &'a mut NbtCompound,
|
||||
) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>> {
|
||||
Box::pin(async {})
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn std::any::Any {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl CreakingHeartBlockEntity {
|
||||
pub const ID: &'static str = "minecraft:creaking_heart";
|
||||
#[must_use]
|
||||
pub const fn new(position: BlockPos) -> Self {
|
||||
Self { position }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user