From b0dfe193184ea468a0cb00252985d401eae3ea1e Mon Sep 17 00:00:00 2001 From: RB007 <36972202+RoosterBooster007@users.noreply.github.com> Date: Mon, 9 Feb 2026 17:05:46 -0500 Subject: [PATCH] fix: fire loop/crash (#1502) --- pumpkin/src/block/blocks/fire/fire.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pumpkin/src/block/blocks/fire/fire.rs b/pumpkin/src/block/blocks/fire/fire.rs index 528cbf397..f7faa5f96 100644 --- a/pumpkin/src/block/blocks/fire/fire.rs +++ b/pumpkin/src/block/blocks/fire/fire.rs @@ -262,14 +262,6 @@ impl BlockBehaviour for FireBlock { fn on_scheduled_tick<'a>(&'a self, args: OnScheduledTickArgs<'a>) -> BlockFuture<'a, ()> { Box::pin(async move { let (world, block, pos) = (args.world, args.block, args.position); - world - .schedule_block_tick( - block, - *pos, - Self::get_fire_tick_delay() as u8, - TickPriority::Normal, - ) - .await; if !Self .can_place_at(CanPlaceAtArgs { server: None, @@ -410,6 +402,18 @@ impl BlockBehaviour for FireBlock { } } } + // Only schedule a new tick if the block at the position is still this fire block. + let current_block = world.get_block(pos).await; + if current_block.id == block.id { + world + .schedule_block_tick( + block, + *pos, + Self::get_fire_tick_delay() as u8, + TickPriority::Normal, + ) + .await; + } }) }