mojira.dev
MC-73162

Breaking an entity that instantly breaks in Creative sometimes destroys the block behind it

The bug

Sometimes, when you hit a minecart, boat, item frame, painting, or armor stand in Creative mode, the block behind it is broken as if the attack phased through the entity. The said entity still disappears as normal.

How to reproduce

Summon said entities and punch them in Creative (make sure you're not holding a sword). The block behind the entity should occasionally break as well.

Code analysis

Code analysis by @unknown can be found in this comment.

Related issues

Attachments

Comments

migrated

[^[Bug] MC-73162.zip]

[media][media][media][media][media]
Sonicwave

(Apologies if this is a duplicate, the closest issue I could find was MC-58597 which describes a different issue/cause.)

kumasasa

Cannot confirm.
Are you sure your mouse button isn't bouncing ?

Sonicwave

Still reproducible in 1.8.1-pre3. It doesn't seem to be caused by bouncing since this does not affect mobs or blocks. However this definitely seems to happen less on my fast PC than on my laptop (attached results).

kumasasa

Re-tested and confirmed when utilizing the CPU

migrated

Confirmed for 1.8.1. It is easier to reproduce when moving mouse quickly to another block. I thought this was because of problem of my hardware before seeing this.

marcono1234

Confirmed for 1.8.2-pre7
Place a Minecart on a rail, reopen the world and punch the Minecart and you will see that you destroyed the rail as well.

migrated

Affects 15w47c

marcono1234

Please link to this comment in the description

The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.

The reason for this might be that the method net.minecraft.client.Minecraft.sendClickBlockToController(boolean) breaks the block and one tick after that the entity is destroyed.

JUE13

Confirmed for 17w17b

JUE13

Confirmed for 1.12

migrated

Confirmed for 1.13.1.

migrated

Confirmed in 1.16-pre5.

migrated

Affects 1.16 Release Candidate 1

migrated

Affects 20w45a

Avoma

Can confirm in 20w51a.

Avoma

Can confirm in 21w03a.

Avoma

Can confirm in 21w05a.

ArmouredMonkey

Can confirm in 21w06a

migrated

Note that this seems to only occur if you hold the left mouse button long enough. If you press left click very briefly, this doesn’t seem to happen.

Brevort

I got this happening when I didn't hold down left click at all. It was instantaneous.

Relates to MC-215426.

Avoma

Can confirm in 21w07a.

Avoma

Can confirm in 21w17a.

migrated

Affects 1.17

Avoma

Can confirm in 1.17.1.

ampolive

Can confirm in 21w40a.

Avoma

Can confirm in 1.18.

Avoma

Can confirm in 1.18.2.

migrated

confirm in 1.19

Avoma

Can confirm in 1.19.2.

Brevort

Affects 1.20 Pre-Release 2.

migrated

Can confirm in 1.20.1

Creeper Juice

Can confirm in 1.21.

migrated

Seems for me, that every 4-6th breaking of a painting does break the block behind it.
I don't know why.

ouroya

can confirm in 1.21.2-pre1

migrated

Can confirm in 1.21.4!!

Sonicwave

(Unassigned)

Confirmed

Platform

Normal

Block states, Player

attack, boat, entity, item_frame, minecart, painting

Minecraft 1.8, Minecraft 1.8.1-pre2, Minecraft 1.8.1-pre3, Minecraft 1.8.1-pre4, Minecraft 1.8.1, ..., 1.20.3 Release Candidate 1, 1.20.4, 24w14a, 1.21.5, 25w17a

Retrieved