You can attack and be attacked through glass panes
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.
Linked Issues
is duplicated by19
relates to6
- Fixed
[Mod] AvomaPaul Davis
- 66
- 31
- Confirmed
Low
- Entities Hitboxes
- glass_pane
1.4.2 - 23w33a
1.4.2 1.4.7 13w06a 1.5 13w11a 1.5.1 1.5.2 1.6.2 1.6.4 13w39a 13w39b 1.7.9 14w25b 1.7.10 14w33c 14w34a 14w34b 14w34c 14w34d 1.8-pre1 1.8 1.8.1-pre3 1.8.8 15w39c 1.9.1 1.9.2 16w14a 1.10 1.10.1 1.10.2 16w32a 16w32b 16w33a 16w35a 16w40a 16w41a 16w44a 1.11-pre1 1.11.2 17w06a 1.12 1.13-pre6 1.13.1 1.13.2 18w43a 18w43b 1.14.4 19w45b 1.15.2 1.16-pre2 1.16.1 20w30a 1.16.2-pre1 1.16.2-rc1 1.16.2 1.16.3-rc1 1.16.3 1.16.4-pre2 1.16.4 20w46a 20w49a 20w51a 21w03a 21w05a 21w05b 21w06a 21w07a 21w11a 1.17 1.17.1 21w42a 1.18.2 1.19 1.19.1-pre5 1.19.1 1.19.2 22w43a 1.19.3 23w03a 23w04a 23w05a 23w06a 1.19.4 1.20 1.20.1 23w32a 23w33a- 23w35a
Created Issue:
You can attack and be attacked through glass panes
Glass panes can be attacked through.
What Happened:
I was hit through my glass pane wall
What I Expected to Happen:
I would be safe behind my glass pane wallThis may be a duplication of
https://mojang.atlassian.net/browse/MCPE-359
however, that was for minecraft pocket edition, so I created one for Minecraft PC edition.Environment
Windows 7
is duplicated by
is duplicated by
is duplicated by
is duplicated by
Same for 1.7.2
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
is duplicated by
is duplicated by
is duplicated by
is duplicated by
relates to
relates to
is duplicated by
is duplicated by
Glass panes can be attacked through.
What Happened:
I was hit through my glass pane wall
What I Expected to Happen:
I would be safe behind my glass pane wallThis may
be a duplication of
https://mojang.atlassian.net/browse/MCPE-359however, that was for minecraft pocket edition, so I created one for Minecraft PC edition.Glass panes can be attacked through.
What Happened:
I was hit through my glass pane wall
What I Expected to Happen:
I would be safe behind my glass pane wallThis may relate to
MCPE-359which is describing a similar behavior for the PE.
relates to
Glass panes can be attacked through.
What Happened:
I was hit through my glass pane wall
What I Expected to Happen:
I would be safe behind my glass pane wallThis may relate to
MCPE-359which is describing a similar behavior for the PE.
Confirmed in 1.8-pre1
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
Glass panes can be attacked through.
What Happened:
I was hit through my glass pane wall
What I Expected to Happen:
I would be safe behind my glass pane wallThe bug
You can attack mobs through glass panes and they can attack you through glass panes. I expected glass panes to act like a wall, so nobody can hurt me.
How to reproduce
- Build a cage with glass panes dividing the mobs.
- Get a bow and arrows.
- Go into the other side and shoot at the mobs.
→The arrow hits them
- Go close to the glass panes.
→The mobs hit you
Windows 7
is duplicated by
relates to
is duplicated by
relates to
Im on Java snapshot 18w45a and the illager beast is able to attack me through glass, cobblestone, oak planks and iron doors.
is duplicated by
The
bugYou can attack
mobs through glass panes and they canattackyouthrough glass panes.I expected glass panes to act like a wall, so nobody can hurt me.
Howtoreproduce
Build a cagewith glass panes dividing the mobs.- Get a bow and arrows.
- Go into the other side and shoot at the mobs.
→The arrow hits them
- Go close to the glass panes.
→The mobs hit you
The Bug:
You can attack and be attacked through glass panes.
Steps to Reproduce:
- Summon a box with a glass pane wall by running the following commands.
/fill ~1 ~-1 ~1 ~10 ~3 ~5 minecraft:tinted_glass hollow
/fill ~2 ~ ~1 ~9 ~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.
The Bug:
You can attack and be attacked through glass panes.
Steps to Reproduce:
- Summon a box with a glass pane wall by running the following commands.
/fill ~1 ~-1 ~1 ~10~3 ~5 minecraft:tinted_glass hollow
/fill ~2 ~ ~1 ~9~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.
The Bug:
You can attack and be attacked through glass panes.
Steps to Reproduce:
- Summon a box with a glass pane wall by running the following commands.
/fill ~1 ~-1 ~1 ~9 ~3 ~5 minecraft:tinted_glass hollow
/fill ~2 ~ ~1 ~8 ~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.
The Bug:
You can attack and be attacked through glass panes.
Steps to Reproduce:
- Summon a box with a glass pane wall by running the following commands.
/fill ~1 ~-1 ~1 ~9~3 ~5 minecraft:tinted_glass hollow
/fill ~2 ~ ~1 ~8~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.
The Bug:
You can attack and be attacked through glass panes.
Steps to Reproduce:
- Summon a box with a glass pane wall by running the following commands.
/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.
The Bug:
You can attack and be attacked through glass panes.
Steps to Reproduce:
- Summon a box with a glass pane wall by running the following commands.
/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.
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.
relates to
In 23w33a
Can't reproduce the bug using Zombies, but I can with Spiders
Also happens with Polar Bears. Didn't test any other mobs.
The bug
Mobs can attack you through blocks and corners due to miscalculation of attack radius.
How to reproduce
- Build a completely sealed off house with no windows or doors from opaque blocks like planks or cobblestone or the like, leave some blocks in the inventory for you to place in step 7.
- Make a two-block tall one-block wide empty doorway in the wall for you to go through and to seal off with blocks in step 7.
- Outside the house, spawn a Ravager.
- Switch to survival mode.
- The Ravager should start going for you.
- Run in the house, let it hit you once through the empty doorway.
- Seal off the doorway with two blocks.
Result: The Ravager is still able to hit the player, from about two blocks away, with a complete wall every possible place in between.
Expected: The Ravager can't attack the player any more.
Example
An example can be seen in this comment.
Old example
I just created a villager in MCEdit with the Create Shops filter to have a custom shop. I saved it and launched MC. The villager started to run around normally in his house but then he went to the door where a zombie was knocking at (wooden door on normal difficulty) and the villager blinked red and got damage and after a few hits he died. The zombie killed him through a closed door and the villager did not run away he always came back to the door until he died.
Additional informations
From KingSupernova:
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 than others, but it’s the same basic problem).
There are also a few related issues:
MC-1297is the same as the above, but for players.- MC-3059 is the same as the above, but for arrows.
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
The problem seems to be the method net.minecraft.entity.ai.EntityAIAttackMelee.checkAndPerformAttack(EntityLivingBase, double) and methods overriding it. They all only test if the mob to attack is in a certain radius to the attacker without testing if blocks are between them.
Possible solutions
Bounding box check
The current behavior would be replaced by only allowing mobs to attack other mobs when their bounding boxes intersect.
Ray casting
The current behavior would be extended to require a ray cast from the attacker to the mob to attack (excluding liquids and blocks without collision box) to return no colliding blocks. Possible use y + height / 1.5 as attack height or have a method for mobs to define their attack height(s?). The height at which the mob to attack will be attacked could for example be y + height / 2 or with multiple tries depending on the height of the mob, for example
for (int attackFraction = 0; attackFraction < height / 2; attackFraction++) { double attackHeight = y + height * ((attackFraction + 1.0) / (height / 2.0 + 1.0)) }
Duplicate of MC-1297, please use the search function to see if your bug has already been submitted. Currently over 55% of tickets are being closed as duplicate.
Duplicate of MC-1297, please use the search function to see if your bug has already been submitted. Currently over 57% of tickets are being closed as duplicate.
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.
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.
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.
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.
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.
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.
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.
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.
Ok, prepare for something... Could please a mod mark the versions for every bug I tell you here? That would be nice.
I have a world set up for fast bug testing. That means that going into each bug report and saying "Confirmed for 1.10.1" is way more work than actually testing it. So I want to confirm for 1.10.1 with this comment:
MC-4, MC-9, MC-14, MC-87, MC-112, MC-201, MC-212, MC-234, MC-258, MC-460, MC-577, MC-667, MC-679, MC-696, MC-697, MC-849, MC-868, MC-926, MC-957, MC-997, MC-1040, MC-1127, MC-1133, MC-1168, MC-1207, MC-1218, MC-1297, MC-1390, MC-1429, MC-1530, MC-1531, MC-1538, MC-1541, MC-1555, MC-1578, MC-1673, MC-1685, MC-1691, MC-1981 and MC-2023.
All of these are tested in 1.10.1. For some others I have additional information:
MC-711 not testable with my setup because of a crash that's new in 1.10.1.
MC-779: At least some appear outside, didn't test all. What's sure is that no general solution got introduced.
Confirmed MC-1511 for stone button, lever, torch, redstone dust, normal rail, end rod, tripwire hook, ladder and flower pot. Others are untested.
Confirmed MC-1874 for chest, brewing stand, enchanting table and flower pot. Others are untested. It's apparent that there isn't a general solution here either.
Thank you for your report!
However, this issue has been closed as a Duplicate of MC-1297.
It has been linked to this report. If you have additional information, please add it to the duplicated report.
Please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Duplicate of MC-1297
Duplicates MC-1297.
Thank you for your report!
We're actually already tracking this issue in MC-1297, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
Hey there!
Does MC-1297 describe your issue?
Relates to MC-1297.
Duplicate of MC-1297.
Thank you for your report!
We're tracking this issue in MC-1297, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
HubbiGamingTV Could you please not go through tons of tickets, making either obvious/redundant (MC-201, MC-1531, MC-3266, MC-1673, …) or incorrect (MC-180, MC-212, MC-2157, MC-2112, MC-2791, MC-1297, …) statements? I got lots of mails from your comments over night, followed by a bunch of mails of people correcting you. Please only contribute if you actually have new and relevant information, not baseless speculation. Also, if you want go through all currently open bugs, prepare some meals first, because you'll need a really long time for 8375 reports…
This is a long standing issue since ancient versions, however i wasn't able to find any reports regarding this specifically (apart from MC-1297, probably because it's very niche), so i'm reporting this here.
Players are able to hit and interact with mobs through blocks from spawn protection, even though it shouldn't be logically possible. This happens despite the mob being inside or outside the spawn protection area.
The client is able to raycast into mobs behind walls when breaking protected blocks, as they get destroyed client-side for a few milliseconds (might be seconds if latency is high), however the server doesn't account for this and thus validates whatever action the player does to the mob they look at regardless of the blocks between them.
The only case this issue is present in vanilla is within the spawn protection scenario, but this has been largely present in modded servers where plugins cancel placement/destroying blocks in certain areas but allow damaging mobs, althought working around this by applying some other server-side tricks to invalidate cases like this.
TL;DR: The server doesn't check whether the player (client) can actually hit/interact with the entity, validating interactions even if there's blocks between them server-side.
How to reproduce
- Create a void world in a server with a certain spawn protection radius.
- Give op permissions to someone else aside from you.
- Summon an entity such as a villager inside a glass box, while inside spawn protection.
- Stay outside the box and deop yourself.
- Try to interact or hit the villager by breaking the glass consecutively (you need to be fast).
- Notice how the server validates your actions.
Expected result
The server wouldn't let you be able to hit or interact with the entity behind blocks, even if client-side is seemingly possible.
Observed result
The server validates the player actions in this case, making able to interact or even kill mobs behind blocks in protected areas.



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, andMC-74907are 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-1297is 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-2310has 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:
MC-2310I hope the code analysis for
MC-2310is 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-pre6Actually, 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:
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!