Paper icon indicating copy to clipboard operation
Paper copied to clipboard

BlockSpreadEvent does not get executed when fire spreads.

Open KillerCreeper112 opened this issue 1 year ago • 2 comments

Expected behavior

When fire spreads, BlockSpreadEvent should get executed.

Observed/Actual behavior

BlockSpreadEvent does not get executed when fire spreads.

Steps/models to reproduce

Register event:

   @EventHandler
    public void onBlockSpread(BlockSpreadEvent event) {
        Bukkit.broadcast(Component.text(event.getBlock().getType() + ""));
    }

Place down blocks like planks that are burnable. Set fire to the burnable blocks and observe as the fire spreads with no message being printed.

Plugin and Datapack List

CustomPlugin

Paper version

This server is running Paper version git-Paper-381 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 07b956e) You are running the latest version Previous version: git-Paper-17 (MC: 1.20)

Other

The docs do specifically have fire spreading as an example: https://jd.papermc.io/paper/1.20/org/bukkit/event/block/BlockSpreadEvent.html

I guess if this is intended behavior, this issue would only be a "misleading doc issue" as BlockIgniteEvent seems to work as an alternative method to check for fire spreading.

KillerCreeper112 avatar Jan 11 '24 15:01 KillerCreeper112

In my testing, I see BlockSpreadEvent being fired for it, as well as BlockBurnEvent. BlockSpreadEvent is fired when a fire block is going to be created in a previously empty block. But that isn't all that happens for fire, BlockBurnEvent is fired when a block is immediately replaced with a fire block.

Machine-Maker avatar Jan 11 '24 16:01 Machine-Maker

Would we want a BlockSpreadEvent to be fired when a block is immediately replaced with fire? Otherwise this can probably be closed

Warriorrrr avatar Feb 10 '24 08:02 Warriorrrr