Remove non-blocking events

This commit is contained in:
Elnu 2023-05-29 18:42:13 -07:00
parent 77bc3b4b09
commit 333dde95f7
2 changed files with 1 additions and 8 deletions

View file

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

View file

@ -11,13 +11,6 @@ pub enum Event {
} }
impl 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 { pub fn process(mut self, context: &Rc<RefCell<CommandBlock>>) -> Self {
use Event::*; use Event::*;
match &mut self { match &mut self {