From 68d8c59d3ea5fd35ef56e43017f3eba2a9280611 Mon Sep 17 00:00:00 2001 From: StackDoubleFlow Date: Sun, 23 Jun 2024 16:51:37 -0700 Subject: [PATCH] Flush redpiler on /radv and use block --- crates/core/src/plot/commands.rs | 3 +++ crates/core/src/plot/mod.rs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/crates/core/src/plot/commands.rs b/crates/core/src/plot/commands.rs index 2a131ffd..3c280618 100644 --- a/crates/core/src/plot/commands.rs +++ b/crates/core/src/plot/commands.rs @@ -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, diff --git a/crates/core/src/plot/mod.rs b/crates/core/src/plot/mod.rs index dd5db023..a3d371fb 100644 --- a/crates/core/src/plot/mod.rs +++ b/crates/core/src/plot/mod.rs @@ -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() {