mojira.dev
MC-67641

Using setblock or fill on a piston head leaves an item drop

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:

  1. Place a command block with the command

    fill ~1 ~ ~1 ~5 ~ ~5 air
  2. Place a piston in the area to be filled facing either north or west.

  3. Place a redstone block next to the piston, making it extended.

  4. Place a redstone block next to the command block.
    ❌ A piston item will now drop.

Related issues

Attachments

Comments

migrated
[media]
qmagnet

Command used?

migrated

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

qmagnet

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)

qmagnet

@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

migrated

Thank you, edited the title and description.

I did indeed use a second command block that replaces sticky_piston with air already.

qmagnet

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

migrated

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

qmagnet

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

migrated

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

qmagnet

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

migrated

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.

migrated

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

marcono1234

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 portals

  • You 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

kumasasa

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.

migrated

Confirmed for 1.13.1.

j_p_smith

Confirmed in 1.15.2 and 20w22a.

Avoma

Can confirm in 21w05b.

Avoma

Can confirm in 21w06a.

Avoma

Can confirm in 21w07a.

Avoma

Video attached.

Avoma

Can confirm in 1.16.5 and 21w08b.

Avoma

Can confirm in 21w17a.

migrated

(Unassigned)

Confirmed

Commands

Minecraft 1.7.10, Minecraft 14w33a, Minecraft 14w33b, Minecraft 14w33c, Minecraft 1.8.1, ..., 21w08b, 21w17a, 1.17.1, 24w19b, 1.21

Retrieved