Paper/paper-server/patches/sources/net/minecraft
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
..
advancements Add more advancement API 2021-07-09 18:50:40 +02:00
commands Vanilla command permission fixes 2021-08-25 13:19:53 -07:00
core Correctly check if bucket dispenses will succeed for event 2024-01-01 12:57:19 -08:00
nbt Reduce memory footprint of CompoundTag 2020-04-06 17:39:25 -07:00
network Add packet limiter config 2020-10-30 22:37:16 -07:00
resources Sanitize ResourceLocation error logging 2021-08-26 12:09:47 +02:00
server Add root/admin user detection 2021-09-11 22:55:14 +02:00
stats Allow statistics to be disabled/forced 2014-01-07 15:56:26 +00:00
util PreCreatureSpawnEvent 2018-01-14 17:01:31 -05:00
world Fix sticky pistons and BlockPistonRetractEvent 2021-12-22 09:51:48 -08:00
ChatFormatting.java.patch Adventure 2021-01-29 17:54:03 +01:00
CrashReport.java.patch Deobfuscate stacktraces in log messages, crash reports, and etc. 2021-06-20 18:19:09 -07:00
CrashReportCategory.java.patch Deobfuscate stacktraces in log messages, crash reports, and etc. 2021-06-20 18:19:09 -07:00
Util.java.patch Remove client-side code using deprecated for removal AccessController 2021-11-26 15:09:58 -08:00