Remove non-blocking events

main
Elnu 1 year ago
parent 77bc3b4b09
commit 333dde95f7

@ -21,7 +21,7 @@ impl State {
pub fn next(&mut self) -> Option<Event> {
while let Some(command) = self.next_command() {
let event = command.execute();
if event.as_ref().map_or(false, |event| event.is_blocking()) {
if let Some(_) = event {
return event;
}
}

@ -11,13 +11,6 @@ pub enum Event {
}
impl Event {
pub fn is_blocking(&self) -> bool {
use Event::*;
match self {
Say { .. } => true,
}
}
pub fn process(mut self, context: &Rc<RefCell<CommandBlock>>) -> Self {
use Event::*;
match &mut self {

Loading…
Cancel
Save