steel_core/entity/item_frame.rs
1//! Shared item-frame entity behavior.
2
3use steel_utils::Direction;
4
5use super::Entity;
6
7/// Vanilla `ItemFrame` behavior used by comparators.
8pub trait ItemFrame: Entity {
9 /// Returns the direction from the backing block toward the frame.
10 fn direction(&self) -> Direction;
11
12 /// Returns the comparator signal strength for this frame: 0 when empty,
13 /// otherwise derived from the framed item's rotation.
14 fn analog_output(&self) -> i32;
15}