Pistons pop off blocks attached to their back when retracting
Resolved
Fixed
160
The bug
When a torch or other block that needs to be placed on a solid block is placed on the back side of a piston, it pops off when it retracts, refer to pictures. (Affects pistons facing in any direction.)
Note: Flower pots no longer require a solid block below.
As a very long-time redstoner, I think that's a really nice new feature which I as well as Sidney600MC would love to see in 1.9. So I sure hope it will be 🙂 it doesn't break anything made in the past, but it makes for some cool new ways of doing things. I see no reason myself to remove that feature. I'll quote sidney - "cause it's just awesome, no more words needed"
Can confirm that this affects rails, flowerpots, redstone dust, buttons, pressure plates, torches and redstone torches. It does not affect paintings or item frames.
This is because the piston turns into air VERY quickly and then changes back into the piston. also explains the piston disappearing and reappearing. Definitely a bug.
Some rumors suggest that the behavior is due to the piston disappearing during retraction, and while this may be a related problem, I think the immediate culprit is that the top surface of a piston is currently solid only in the unextended state, whereas extended pistons were never changed. A block update causes any tiles placed upon an extended pistons to behave accordingly, which the retraction causes. This(but not the dismissal of the disappearing piston hypothesis) is proven by placing a tile on a piston, powering the piston, and then placing a block adjacent to the tile.
Kevin, if you open F3 debug screen and look on for the block type, you can see that the piston actually disappears and it shows the block behind it for a moment.
It´s not entirely accurate to say that the piston completely disappears at the retraction. If a piston retracts he´ll become a block 36 for 2 gticks (Block 36 is a block which handles block movement. In setblock commands block 36 gets called "piston_extension" and in the code it gets called BlockPistonMoving). And block 36 does not have a solid top surface, which causes flower pots to pop off. Also block 36 has no visual hitbox (but he has a collision hitbox since 1.9), and that´s why you can see through him. But there´s still a block there. It´s just a rather weird block. Just wanted to add that.
I think this is connected to the translocation piston bug, because when pistons extend, they become air for a short while, making other blocks pop out, which is also what translocation pistons do to move entities 😞
I think that this is caused by 2 thins. The first is that the extended piston base is non-solid top. The second is that when the piston retracting it turns into block 36. Fixing that isn't simple. You need to keep the base extended, but still create tile entity like if it was block 36. Once it's timer expires, you make base retracted.
I can still reproduce in 18w50a. However, it doesn't happen with flower pots anymore, but that seems to be because flower pots can be placed in midair now (and also in 1.13.2). I've been reproducing using torches this whole time so I didn't actually notice that the description refers to flower pots.
(EDIT: Looking at code, flower pots lost the restriction on placement in 18w06a, though I haven't actually confirmed this ingame)
Works As Intended. Originally, it was a bug and it is supposed to work only with flowerpots and torches. It is the same question with hoppers (see MC-122352).
No we can't, because no dev has said that this is indeed working as intended for redstone dust. Hoppers are different from pistons, they never have a solid top face.
This also happens to all blocks that can be attached to the back of the piston, such as buttons, levers, or tripwire hooks, if it is placed sideways or downwards. The only exception seems to be signs.
It's intended behavior if it's placed on top of a piston. The bug is that it pops off on the back of the piston. On the top it's no longer a full sized block, so it doesn't act as a proper support, but the back doesn't change at all.
Currently playing on a 1.15.1 server and this behavior still exists. If I'm not mistaken, the back face of a piston (or the top, as shown in the pictures) is always a solid surface, yes? so hypothetically speaking something placed on top should not pop off. More importantly it seems to only break off when the piston retracts, and not when it extends initially. My first thought was that the piston body was being turned into a non-solid block entirely, and that the lever simply hadn't received a BUD that would trigger it to break off of the non-solid block it was attached to, but then I did some testing to manually trigger a block update next to the lever-occupied block, and I can't seem to force the lever to pop off that way. It only ever gets broken while the piston is retracting. Additionally, while doing that testing I noticed that during the piston's retraction sequence, if the player is standing on top of the back face of the piston where the lever/button/redstonedust/etc is popping off, the player actually receives a slight upwards bump. I also was able to reproduce this with an armor stand (See attached screenshot of the exact moment the armor stand is bumped upwards).
[media]
This also works with shulkers (the actual mob from the End).
[media]
The upshot of this is that I think for some reason the block the piston body occupies, when it starts to retract, is actually being pushed upwards just a tiny bit before it gets removed and replaced with a "retracted piston" block during the retraction sequence. It also seems to dislodge item frames from the back face of the piston. (edit: buttons, levers, redstone dust et al, aren't supposed to be movable via pistons IIRC is why this is important).
Version 1.15.2, the torch is still popping off a sticky piston face, or off of a block on top of the sticky piston. It would be nice if it didn't pop off when the piston moves.Â
Can confirm for both sticky and regular pistons.