Skip to content

Commit

Permalink
Flush redpiler on /radv and use block
Browse files Browse the repository at this point in the history
  • Loading branch information
StackDoubleFlow committed Jul 31, 2024
1 parent 3816338 commit eed20a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/core/src/plot/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ impl Plot {
for _ in 0..ticks {
self.tick();
}
if self.redpiler.is_active() {
self.redpiler.flush(&mut self.world);
}
self.players[player].send_system_message(&format!(
"Plot has been advanced by {} ticks ({:?})",
ticks,
Expand Down
2 changes: 2 additions & 0 deletions crates/core/src/plot/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,8 @@ impl Plot {
let lever_or_button = matches!(block, Block::Lever { .. } | Block::StoneButton { .. });
if lever_or_button && !self.players[player].crouching {
self.redpiler.on_use_block(block_pos);
self.redpiler.flush(&mut self.world);
self.world.flush_block_changes();
return;
} else {
match self.redpiler.current_flags() {
Expand Down

0 comments on commit eed20a9

Please sign in to comment.