Skip to main content

horizon_part

Attribute Macro horizon_part 

#[horizon_part]
Expand description

Mark a part implementation and derive the scoped hooks it overrides.

Hook methods must be written explicitly, not generated inside the impl:

ⓘ
use horizon_mod_api_macros::horizon_part;
trait BlockPart { fn tick(&self) {} }
struct Block;
macro_rules! hook { () => { fn tick(&self) {} }; }
#[horizon_part]
impl BlockPart for Block { hook!(); }