When using setblock on the piston extension of an extended piston, a piston item is dropped.
This also happens when using the fill command when pistons are facing certain ways(due to the nature of the fill command using multiple setblock commands)
When using a fill command, if an extended piston facing either north, west or down is present in the area, it will drop a piston item.
How to recreate the problem:
Place a command block with the command
fill ~1 ~ ~1 ~5 ~ ~5 air
Place a piston in the area to be filled facing either north or west.
Place a redstone block next to the piston, making it extended.
Place a redstone block next to the command block.
❌ A piston item will now drop.
Related issues
is duplicated by
Attachments
Comments


Command used?

Added the command to be used and a way to recreate it completely.

Looks like MC-149 has returned.
The bug happens when you setblock on a piston extension. Although it happens in and gamemode (not just creative)

@Nasm, for now clarify your title and description. This has nothing to do with direction. The only reason fill does this from the north/west, is because the extension is getting destroyed before the piston block in that configuration.
The bug is:
using setblock or fill a piston extension leaves an item drop
A workaround for you, is to use a fill replace command, and just replace the sticky_piston with air

Thank you, edited the title and description.
I did indeed use a second command block that replaces sticky_piston with air already.

Man, my grammar is bad.
Better title would be:
using setblock or fill on a piston extension leaves an item drop

Heh. I didn't even read it correctly, should be better now.

For now, if you put tile drops on false, you can eliminate the piston items too.

True, but that doesn't work for the use I have for it.

What about flipping the gamerule on during the piston swap, then turning it off when it's done?

In my specific case I want the command block to destroy itself and an area around it. I would need multiple extra command blocks to make it work. Filling the pistons with air before filling the rest with air only requires one extra command block.

Still an issue in the current version, updated the ticket.

Confirmed for
1.8.7 But I don't believe this is valid.
There are two main problems:
/fill
does not operate in one tick or at least it allows block updates between placing the blocks. This is also the reason why you can't fill large areas with portalsYou have the same with every "two-block" block like doors and beds for example. Breaking one side causes it to drop
Note: The summary is misleading as it is not the piston extension (technical block) but rather the piston head

Is this still an issue in the most recent versions (currently that is 1.10.2, or 16w42a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time.

Confirmed for 1.13.1.

Confirmed in 1.15.2 and 20w22a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a.
Video attached.
Can confirm in 1.16.5 and 21w08b.
Can confirm in 21w17a.