An unofficial collection of APIs used in FreeJam games and mods
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
671B

  1. use crate::techblox::{SerializedEntityDescriptor, Parsable, SerializedEntityComponent,
  2. blocks::{BlockEntity}};
  3. use libfj_parsable_macro_derive::*;
  4. /// Joint block entity descriptor
  5. #[derive(Copy, Clone, Parsable)]
  6. pub struct JointBlockEntity {
  7. /// parent block entity
  8. pub block: BlockEntity,
  9. }
  10. impl SerializedEntityDescriptor for JointBlockEntity {
  11. fn serialized_components() -> u8 {
  12. BlockEntity::serialized_components()
  13. }
  14. fn components<'a>(&'a self) -> Vec<&'a dyn SerializedEntityComponent> {
  15. self.block.components()
  16. }
  17. fn hash_name(&self) -> u32 {
  18. Self::hash("JointBlockEntityDescriptorV3") // 3586818581
  19. }
  20. }