Paper icon indicating copy to clipboard operation
Paper copied to clipboard

BlockPistonExtendEvent doesn't fire when nothing is pushed

Open B1ue-Bandit opened this issue 1 year ago • 2 comments

Expected behavior

BlockPistonExtendEvent should fire when a piston is activated even if nothing is pushed.

Observed/Actual behavior

The event does not fire when the piston pushes no blocks.

Steps/models to reproduce

Listen for BlockPistonExtendEvent, trigger a piston which is set up to push air & observe nothing even though the piston clearly fires. The event doesn't fire when blocks aren't pushed.

Plugin and Datapack List

No datapacks & no other plugins.

Paper version

Paper version git-Paper-485 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: https://github.com/PaperMC/Paper/commit/862299b6a6588ff60db69dbc40e8514f9690d318)

Other

When looking at the paper documentation the described behavior for BlockPistonExtendEvent is "Called when a piston extends" which doesn't seem to be the case if nothing is pushed. BlockPistonRetractEvent has the same issue.

B1ue-Bandit avatar Apr 18 '24 17:04 B1ue-Bandit

Expected behavior would be for getBlocks() to return empty instead of the event not firing at all.

AoElite avatar Apr 18 '24 17:04 AoElite

It's possible this PR fixes the issue, but I haven't tested that exactly yet. https://github.com/PaperMC/Paper/pull/9258

Machine-Maker avatar Apr 18 '24 17:04 Machine-Maker