13
0
geforkt von Mirrors/Paper
Paper/paper-server/patches/sources/net/minecraft/world
Jake Potrebic 29d059d659 Fix sticky pistons and BlockPistonRetractEvent
There is an explicit check in the handling code for empty pistons that
prevents sticky pistons from firing the event. However when we look back
at the history we see that this check was originally added so that ONLY
sticky pistons would fire the retract event. I'm not sure why.
1092acbddf

Over the course of several updates, the meaning of that field appears to
have changed from "is NOT sticky" to "is sticky". So now its having the
opposite effect. Only normal pistons fire the retraction event. And like
all things in CB, it's just been carried around since.

If we are to believe the history, the correct fix for this issue is to
flip it so it only fires for sticky pistons, but that puts us in a
bind. It's already firing for non-sticky pistons, changing it now would
likely result in breakage. Furthermore, there is little documentation as
to WHY that was ever intended to be the case.

Instead we opt to remove the check entirely so that the event fires for
all piston types.

Co-authored-by: Zach Brown <1254957+zachbr@users.noreply.github.com>
Co-authored-by: Madeline Miller <mnmiller1@me.com>
2021-12-22 09:51:48 -08:00
..
damagesource Add critical damage API 2021-07-26 17:32:36 +02:00
effect Add ElderGuardianAppearanceEvent 2021-03-19 23:39:09 -04:00
entity Configurable max block light for monster spawning 2021-12-16 09:40:39 +01:00
food EntityRegainHealthEvent isFastRegen API 2016-04-22 01:43:11 -05:00
inventory fix various menus with empty level accesses 2021-07-11 12:52:56 -07:00
item Option to prevent data components copy in smithing recipes 2021-09-26 12:57:28 -07:00
level Fix sticky pistons and BlockPistonRetractEvent 2021-12-22 09:51:48 -08:00
scores Don't save empty scoreboard teams to scoreboard.dat 2016-05-07 23:33:08 -04:00
BossEvent.java.patch Adventure 2021-01-29 17:54:03 +01:00
CompoundContainer.java.patch Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00
Container.java.patch Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00
RandomizableContainer.java.patch LootTable API and replenishable lootables 2016-05-01 21:19:14 -04:00
SimpleContainer.java.patch Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00