The Bug:
You can attack and be attacked through glass panes.
Steps to Reproduce:
Summon a box with a glass pane wall by using the commands provided below.
/fill ~1 ~-1 ~1 ~11 ~3 ~5 minecraft:tinted_glass hollow
/fill ~2 ~ ~1 ~10 ~2 ~1 minecraft:glass_pane
Summon a zombie inside of the box and break any block of glass pane that's at eye height, so that the zombie can be able to notice you.
Switch into survival mode and get the zombie to notice you.
When it does, move away from the hole in the glass pane, but remain standing as close as you can to adjacent glass pane blocks.
Wait for the zombie to approach you.
Take note as to whether or not you can attack and be attacked through glass panes.
Observed Behavior:
You can attack and be attacked through glass panes.
Expected Behavior:
You would not be able to attack or be attacked through glass panes.
Related issues
is duplicated by
relates to
Attachments
Comments


This happens to me too

Nice bug report. Don't worry about duplication across projects. 🙂

Thanks, this is my first bug report, so I was just hoping I'd done it right.

Changed it, confirmed for the latest release.

Unable to reproduce. Not even cave spiders are able to poison me through glass panes.

I can confirm it does work in the latest update. I made a cell with one wall made of glass panes. I removed a glass pane to bring the zombies I had spawned closer. after checking that they could hit me (I let one hit me) I replaced the glass pane. the wall was now solid, and walking right up to the glass pane made the zombie hit me again.

I managed to repeat with Paul Davis' latest example. But only if the zombie was lured to the glass pane wall (with a hole) first, and then the wall was closed. Zombies that were a bit away, or which were pushed a little bit on the other side, could not punch me; only a zombie that had gotten a hit on me before the wall was closed could continue punching me.
The zombies that could punch me through the pane were also sort of stuck in it; they could only move along the glass pane wall; e.g. when I moved to other side, they could not leave the glass wall to get to me. (EDIT: they could leave it eventually as I moved around; once the got unstuck, they couldn't punch me through the panes.)
This could perhaps indicate that the zombies are actually somehow inside that glass pane.

I am having the same issue in 1.6.1. To specify, I am on a pre-release server using the release client. (Because they did not add the updated server to minecraft.net) I am running windows 8 and it is survival. The server itself is Ubuntu Linux. Thanks!

Is this still a concern in the current Minecraft version 1.6.4 / Launcher version 1.2.5 ? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Doesn't seem to be an issue for me anymore, I haven't been playing as much though.

Seems to be fixed.

Nope, the bug is still there. Read my previous comment how to reproduce. (I use creative mode to first create a small "hut" from normal blocks and glass pane walls, leave one pane out, use some zombie eggs from outside, switch to creative, let zombie(s) to hit, add the missing glass pane, approach the wall again and zombie(s) keep hitting...
Also, zombies can hit villagers through doors (another thin vertical block) in some situations, or at least could in 1.6.2, haven't tested yet on 1.6.4 or checked if there already exist another issue for that; both issues may or may not have the same cause.

Reopening

Affects Versions: 1.6.4, .... can confirm this up to 13w39b !

1.7.2 is also affected
I actually believe this applies to any gamemode and all blocks,
its just easier to notice with blocks that can easely be destroyed
See both attachments where i hit someone behind a wall/glass, in a grief-protected spawn/area, while having creative mode:
Glass: http://i.imgur.com/BcndZzd.png
Wood: http://i.imgur.com/iqMgH98.png

Cannot reproduce in 1.7.9

Can reproduce still in 1.7.9, just follow the steps in earlier comments (i.e. open one pane, let a zombie hit, close the glass pane "wall" again fully... and the hitting zombie can still keep hitting through the glass wall).

There are a number of bug reports about attack radius that are all very similar. MC-2310, MC-18326, MC-50668, MC-63965, MC-71834, and MC-74907 are all about the attack radius of mobs extending through blocks. (Some mobs are more bugged then others, but it’s the same basic problem). There are also a few related issues:
MC-1297 is the same as the above, but for players.
MC-3059 is the same as the above, but for arrows.
Most or all of these reports should be consolidated into one, as they are all caused by the same base issue.

KingSupernova, unless you have confirmed in the code that they have indeed the same root cause, do not assume they are one issue. Minecraft's code is made in many places in ways (e.g. duplication) that causes same or similar issues for multiple things, yet need different fixes. And history proves Mojang devs are not very capable of handling such cases if they are under the same ticket.
But certainly mark them all as related.
Also, a bit of semantics, maybe, but the problem is not attack radius, per se, but more likely a bug in how entities can end up sort of inside things and/or how their line-of-attack is calculated. That is, their movement algorithms can think an entity is on one side, but attack code thinks it is already on the other side. (Or something, that is just my educated assumption, but an assumption nonetheless.)

When I say they are the same base issue, I don't mean it's the same code. I just mean that they are all the same problem- In this case, mobs attacking things behind blocks.
I haven't looked at the code, I was just using "attack radius" as a clear way of describing the problem. To the naked eye, that is how the problem appears.

Confirmed for 1.10.

Confirmed for 1.10.1.

Cannot confirm that you as a player are able to hit through glass panes in 17w06a (at least not when trying to hit other mobs). Zombies or other mobs being able to attack through them is MC-2310.

Did you try it using the trick of first removing removing one pane, moving against another, then replacing the removed pane (allowed at least mobs to get a bit closer)? (Described in earlier comments for zombies attacking player, but could possibly apply also for players; I didn't check players back then, since at that time this issue was only about mobs attacking players, at least according to description. For some reason, MC-2310 has a mention about this issue being for players.)
Also, a prime example of the dangers of too eagerly claiming issues as duplicates. In this case, if the player side is indeed fixed, apparently player (with e.g. bow) vs. mobs could be handled more or less differently (in the code), and thus should have kept their issues only as "related to".

I did not look at the screenshots carefully enough. It looks like this report contains multiple bugs:
I hope the code analysis for MC-2310 is correct, if not please correct me. Because you mentioned doors in an older comment as well I was pretty sure it is a duplicate. I am going to re-check this now.
Edit: After testing it, I still feel like this zombie glass pane part is MC-2310.

At least with the zombies attacking through glass pane, back then years ago, it was not only attack distance; when the zombies could not hit through the pane, the player could go as close as he wanted and be safe (if i remember it correctly). But code may have changed since. Also, I probably never got to fully reverse engineer this case, so it is just educated guesses and speculation from me. (I probably did try to take a look at the code, though, but likely gave up after a while in this particular case.)
Considering the door case / MC-2310, your analysis at least sounds plausible; relying only on distance could explain a lot (except that ancient glass pane -case, but again, things could have changed since).
(For getting code analysis (or checks) from me nowadays: I have given up on doing the MCP level debugging on these Minecraft issues as it takes like hours to days for a single reverse-engineering, and few hours for a fix, but then, years for Mojang to do absolutely nothing about it... when they could probably find and fix most of the issues I've been meddling with in half the time, with no reverse-engineering phase needed. (There has been few exceptions, though, where Mojang has finally applied my fixes or at least gotten some benefit from the analysis. But too few fixes, way too rarely.) That is, the benefits for me digging into the obfuscated code are nearly zero, yet needing substantial effort from me.)
Zombie glass panes could be part of MC-2310, but as long as it is not certain, I'd keep them only as "related to", to avoid the common end result of Mojang closing one issue (in one or another resolution), yet leaving multiple other bugs combined to the one actually unhandled. Being just related to, Mojang has to actually itself check whether they are fixed with the same change or not. (Or like it has happened, they don't necessarily even look at the related issue, leaving it unfixed for more years, but in that case, the other issue is at least still open as it should be until properly resolved.)

Affects 1.13-pre6
Actually, said test was performed by throwing a snowball at a glass pane from a distance with a mob behind it; would that be considered a different issue?

I couldn't reproduce this for 1.13.1.
Second opinion?

Does that happen because it moves its head forwards maybe? Can you reproduce with other mobs? Is the radius higher for the beast?

Have no idea about the head movement, radius does seem to be higher for the beast, And I can reproduce with other mobs too.

Confirmed in 1.14.4 and 19w45b.

Confirmed in 1.14.4 and 19w45a.

Confirmed in 1.16 20w20b. A phantom was able to attack me through a wall of glass panes.

Confirmed in 1.16-pre2.

Confirmed in 1.16.1
Can confirm in 20w51a.
Can confirm in 21w03a.
Can confirm in 21w05a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a.
Can confirm in 21w11a.
Can confirm in 1.17.
Can confirm in 1.18.2.
Can confirm in 1.19. I'd be happy to take ownership of this ticket and keep it updated since the reporter is no longer active.

in 1.19.1 pre5

this is because you can walk so close to the glass panes that your hitbox passes through the glass pane. making you hittable through the panes

@Hubbi GamingTV, slightly incorrect: as described in earlier comments, at least in earlier versions (I have not checked the bug lately), in certain situations one could go as close to the pane as possible without getting hit by zombies. If it was simply due to hitbox getting through the pane, zombies would have been able hit through the pane in all situations (where the player was close enough).

Can confirm in 23w03a

Can confirm in 23w04a

Can confirm in 23w05a

Can confirm in 23w06a

Can confirm in 23w32a

It's safe to assume this has been fixed in 23w35a due to the fixes for MC-2310 & MC-264915, at least for mobs. There's still the other minor issue that is already stated in the title, which is players being able to attack through panes/blocks, but that one could be considered a completely different issue.
In certain protected areas, such as the spawn protection in servers, the player can attack other entities through blocks, because when the player breaks a block client-side, the gap remains for a few milliseconds until it regenerates, giving the player the opportunity to strike the entity behind, as can be seen in these screenshots:
[media][media]
However, i haven't tested this so i don't know if it's still the case in 1.20.1. If it is, the report should probably be centered around that, or either be covered in a new report.

It is almost never "safe to assume", but...
It seems that the attack and pathing behaviors of zombies (and maybe spiders, too) have changed since I last tested this (i.e. very long time ago), too.. I could not reproduce with the old test method, not even to the point of zombies getting as close to glass panes as before (they don't "hug the pane" now, but stay about at the center of the full free block outside). And could not get them to even to try to attack as soon as there was glass in between. So whatever has changed (in addition to those other two issues), a proper fix or not, has apparently made them unable/unwilling to attack through at least glass panes (in normal situations).
Spiders could get closer the glass pane (as they climb it), but no attacks through the pane.
I tried with only 3 zombies simultaneously, so they didn't push each other much towards the pane, as they all tried to get to the center of the same block, not straight towards the player 😛  Perhaps with a bigger horde, some could get pushed against the pane, close enough, but that would then probably be more about the problem of containing too many mobs in too little space.
... Or need new/better reproduction steps to catch the remaining situations, if any left.

Yeah, what I meant by my comment was that i tested most of the mobs trying to attack through panes, even trapdoors and I wasn't able to reproduce this issue anymore.
I tested this issue myself and it has indeed been fixed in 23w35a, so I've marked this ticket as fixed. Thank you!