PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
9.67k stars 2.25k forks source link

BlockPistonExtendEvent doesn't fire when nothing is pushed #10430

Open B1ue-Bandit opened 4 months ago

B1ue-Bandit commented 4 months ago

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.

AoElite commented 4 months ago

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

Machine-Maker commented 4 months ago

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