mojira.dev
MC-5726

Sticky pistons do not retract a block which they have pushed when given a short pulse

Resolution note

@unknown resolved this report as "Works As Intended". He also commented roughly one year later as response to the following:

Panda4994 (source):

I always viewed the breaking of the sticky piston connection as inertia, and taking away the block teleportation part, I don't think this behaviour is buggy at all.

Jeb (source):

The reason why the piston behavior "technically a bug" is because the block in front of the sticky piston is supposed to act as if fixated to the piston. Your interpretation as "it's inertia" actually makes sense.

The bug

When a sticky piston is powered with a very short pulse ("0-tick pulse"), it will push the block, but not retract it.

To reproduce

Build the contraption in this screenshot:

[media]

The redstone block will not be pulled back.

After 1.14, it is also possible to reproduce this by placing a button on the side of a sticky piston, and press the button to move a block.

Related issues

MC-5763 strange piston behavior with redstone blocks MC-5862 Pistons retract when powered by a block they're pushing with pulling block back MC-6092 When powering a sticky piston with a redstone block the piston retracts without pulling the redstone block MC-8752 Piston Problem MC-9033 Sticky pistons occasionaly do not retract a block which they have pushed MC-11888 Sticky piston + block of redstone clock will not work with a repeater on 1-tick delay MC-12960 Sticky Pistons don't grab certain items MC-19334 Un-sticky Pistons? MC-27986 Sticky pistons not working properly when powered by a short charge MC-40661 Sticky piston no longer sticking when redstone placed in a certain way MC-41010 Pressure plates and sticky pistons MC-52525 Sticky pistons won't pull dirt MC-75848 Sticky piston wont retract blocks if it's retracted too quickly MC-104775 Sticky Pistons Leave Block Behind MC-106750 Sticky Piston Glitch in 16w35a MC-157827 The Sticky piston won't pull the block back if it's moving fast. MC-159534 Sticky piston bug MC-170380 Sticky pistons no longer work. MC-182314 If sticky pistons instantly retracts, it will not pull blocks back. MC-183250 issue with sticky pistons

Attachments

Comments

migrated
[media]
migrated

It's ordinary for sticky pistons to do this when powered for a single tick, and is in fact crucial to many designs (I think Mojang has stated that this is considered a feature). You can achieve the same results by placing an ordinary block in that location, and using another repeater and a torch to push power into it.

migrated

Oh, I gotcha. In that case I'll close this up, if possible.
Edit: Doesn't seem like I can. Shoot.

migrated

Ok, tested for ~4 hours here using a standard ender-ender, with a command block killing all enderman every ~45 seconds. For those interested, the design alternates redstone with repeaters to ensure each piston fires individually. After 4 hours I found a total of 9 (out of 272) pistons that had not retrieved their block, all of which were just the redstone, none with the repeater if that makes sense. What this tells me is that if for some reason the piston is set off for just one block (as WolfieMario says) is setoff for just one tick, it leaves the block, while 99% of the time the pressure plates on mob farms give at least two ticks and thus don't leave the block. Based on this, my initial thinking is that if mobs land just barely on the edge of the pressure plate, they get a single tick and leave the block, otherwise they last long enough the piston retracts.

As far as fixes go, either a player needs to take this into account and use a repeater going into pistons everywhere this happens (and thus 3x the redstone), or some sort of more complex and/or accurate (depending on perspective) timer on the pressure plates. While the latter might be easier in theory for the player, I'm going to switch all of my farms to all repeaters and no single-pieces of redstone to work around this at least for now, despite the cost.

Further input/testing welcome of course...

migrated

This is actually not a bug but a 'feature', it is actually meant to be like this.

Torabi

Do you have a link to an official statement to back that up? It's not even documented on the wiki.

qmagnet

This is intended and is featured in many redstone contraptions. Some call it a T flip flop. Depending on if the pulse is extremely brief, the sticky piston will actually leave the block in place. And it may pull it back on the next activation.

A quick search on youtube shows this being featured
https://www.youtube.com/watch?v=sncm4CoRSJQ

Torabi

People using it in no way proves that it's intended. In fact, MC-6099 shows that Mojang broke a common form of the mechanism that used it once with a change to circuit timings. MC-11107 shows another mechanism also broken by changes to piston timing. So this obviously isn't a particularly protected behavior, one that Mojang has taken steps to preserve despite other changes to the game. I believe they're aware of it, because I vaguely remember seeing one of them comment on it a long time ago. But unless you can find an actual statement from one of the developers claiming that it's an intended feature, then we'll just leave this ticket open until one of them makes a decision about it.

qmagnet

Found some info on it. I'm not sure if you will accept it as evidence
http://minecraft.gamepedia.com/Tutorials/Piston_circuits#T-Flip_Flops

They call it the "1-wide Sticky Piston TFF"
"A circuit breaker is used to give a 0.5 ticks pulse to the sticky piston. This makes the sticky piston leave the redstone block, which then provides power to the output. When powered again, the sticky piston will pull the redstone block switching the output off."

http://minecraft.wikia.com/wiki/Redstone_Circuits
"With Beta 1.7.3 operation of the Sticky Pistons was changed. If a sticky piston is activated with a one-tick pulse, it will push or pull a block, but not push and pull it back. This makes it possible to build more compact T flip-flops."

Torabi

All that shows is that players are aware of the behavior. The wiki is not maintained or moderated by Mojang, and thus cannot be considered a statement of intent by them. Only a statement made by one of the developers, such as a tweet, comment on the tracker, blog posting, video, forum post, etc. would constitute proof. Or one of them can resolve the ticket themselves. We've been given explicit instructions not to resolve tickets as Works As Intended without proof.

migrated

Confirmed for 1.8.2 pre-4. I really hope this is fixed. While bugs like this one and MC-108 can sometimes appear to be useful, leaving them in the game is never a good idea long term, as they will eventually pile up and cause the game to become unplayable.

qmagnet

KingSupernova, this "bug" is indeed a feature many many many players use. Removing it would essentially destroy a lot of mechanics.

migrated

@unknown and @unknown The ticket has been flagged for review by Mojang to determine if it is an intended (or now desired) feature, it is up to them to make that decision.

migrated

Just because a few people use it doesn't mean it should stay in the game. It doesn't make any sense storyline-wise, why would sticky pistons stop being sticky for a moment? And while it can be helpful in some cases, it causes more problems than it solves.

https://xkcd.com/1172/

qmagnet

I can tell you a TON of people use this. TONS. However, no need to continue the conversation.
We will wait for Mojang.

I'm not sure why it affects you anyway. Sticky pistons can work with only sticking with anything more than a tick. Both mechanics work currently. If you'd like to continue this conversation, hit me up on twitter.

migrated

It makes perfect sense flavor-wise; a quick pulse pulls so hard it detaches the block, like a fast tug. That said, gameplay is more important than realism, so it doesn't matter if it "makes sense" as long as it's useful. In most cases, if you're getting a 1-tick-pulse into a sticky piston, it's because you're trying to cause this behavior. And it's used a lot, for example as a form of T-flip-flop. So, yeah, I'm glad it's marked as WAI because if it changed, it'd break builds, whereas having it in doesn't break anything.

violine1101

I edited the ticket for better searchability. This does not change anything about the fact that this behaviour is intended.

migrated

Jens Bergensten

Confirmed

clock, grab, pull, pulse, rapid, redstone, redstone_block, retract, sticky_piston, tick

Snapshot 13w01a, Snapshot 13w05b, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.7.5, Minecraft 14w11b, Minecraft 1.8.2-pre4, Minecraft 1.11.2

Retrieved