mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
20 lines
561 B
Rust
20 lines
561 B
Rust
use super::super::FromIntoEvent;
|
|
use crate::wit::pumpkin::plugin::event::{BlockFormEventData, Event, EventType};
|
|
|
|
pub struct BlockFormEvent;
|
|
impl FromIntoEvent for BlockFormEvent {
|
|
const EVENT_TYPE: EventType = EventType::BlockFormEvent;
|
|
type Data = BlockFormEventData;
|
|
|
|
fn data_from_event(event: Event) -> Self::Data {
|
|
match event {
|
|
Event::BlockFormEvent(data) => data,
|
|
_ => panic!("unexpected event"),
|
|
}
|
|
}
|
|
|
|
fn data_into_event(data: Self::Data) -> Event {
|
|
Event::BlockFormEvent(data)
|
|
}
|
|
}
|