13
0
geforkt von Mirrors/Paper
Paper/paper-server/patches/sources/net/minecraft/world/level
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
..
biome Optimize Biome Mob Lookups for Mob Spawning 2018-09-12 21:47:01 -04:00
block Fix sticky pistons and BlockPistonRetractEvent 2021-12-22 09:51:48 -08:00
border Add worldborder events 2021-01-04 22:40:34 -08:00
chunk Configurable feature seeds 2021-08-31 17:05:27 +02:00
dimension/end Prevent softlocked end exit portal generation 2021-08-30 15:22:18 +02:00
entity Improve and expand AsyncCatcher 2021-08-25 20:17:12 -07:00
gameevent Use getChunkIfLoadedImmediately in places 2019-07-08 00:13:36 -07:00
levelgen Fix CocaoDecorator causing a crash when trying to generate without logs 2021-09-07 21:29:38 +01:00
material Add BlockBreakBlockEvent 2021-01-03 17:58:11 -08:00
pathfinder Mob Pathfinding API 2018-09-09 13:30:00 -04:00
portal Add configurable portal search radius 2016-03-03 02:46:17 -06:00
redstone Prevent NoClassDefError crash and notify on crash 2014-04-21 12:43:08 +01:00
saveddata/maps Limit item frame cursors on maps 2021-05-26 15:09:33 -07:00
storage Preserve overstacked loot 2021-06-21 23:21:58 -04:00
BaseCommandBlock.java.patch Add permission for command blocks 2020-05-16 10:05:30 +02:00
BaseSpawner.java.patch Fix Entity Teleportation and cancel velocity if teleported 2020-08-25 20:45:36 -04:00
BlockGetter.java.patch Don't lookup fluid state when raytracing, skip air blocks 2020-08-28 12:33:47 -07:00
ChunkPos.java.patch MC Utils 2016-03-28 20:55:47 -04:00
ClipContext.java.patch Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00
EmptyBlockGetter.java.patch MC Utils 2016-03-28 20:55:47 -04:00
EntityGetter.java.patch SkeletonHorse Additions 2018-07-27 22:36:31 -05:00
GameRules.java.patch Add WorldGameRuleChangeEvent 2020-12-20 16:41:44 -08:00
Level.java.patch Make sure inlined getChunkAt has inlined logic for loaded chunks 2020-09-20 16:10:49 -07:00
LevelAccessor.java.patch Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00
LevelReader.java.patch MC Utils 2016-03-28 20:55:47 -04:00
LevelWriter.java.patch Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00
NaturalSpawner.java.patch Add '/paper mobcaps' and '/paper playermobcaps' 2021-08-16 01:31:54 -05:00
PathNavigationRegion.java.patch MC Utils 2016-03-28 20:55:47 -04:00
ServerExplosion.java.patch Prevent headless pistons from being created 2020-08-14 14:44:14 -05:00
ServerLevelAccessor.java.patch Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00