Entities don't receive knockback from projectiles fired from dispensers
Fireworks, eggs, snowballs, and splash potions of harming fired from dispensers don't knock back mobs, but they do when thrown by the player or a mob such as a snow golem or witch.
Steps to Reproduce:
- Build the setup as shown in the attachment below. setup.png

- Place some snowballs inside of the dispenser.
- Summon a husk on the diamond block.
- Use the lever to activate the dispenser and watch the husk closely.
Observed Behavior:
Projectiles fired from dispensers don't deal any knockback to entities.
Expected Behavior:
Projectiles fired from dispensers would deal knockback to entities.
Note
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
Code analysis
Code analysis by Marcono1234 can be found in this comment.
Linked Issues
is duplicated by3
relates to4
- Fixed
Nick Bambridge
[Mojang] SHugoh
- 46
- 18
- Confirmed
Low
- Gameplay
- Entities Projectiles
- dispenser egg knockback snowball
1.7.4 - 1.20.4
1.7.4 1.7.9 1.8 1.8.3 15w47c 1.9-pre2 1.9.2 1.9.3-pre1 1.9.3-pre2 1.9.4 16w20a 1.10.2 16w32a 16w43a 1.11.2 17w06a 17w15a 1.12.2 17w45b 17w46a 17w47a 17w47b 18w02a 18w11a 18w16a 18w20c 18w21a 1.13.1 1.13.2 18w48a 18w48b 18w49a 19w04b 19w05a 1.14-pre5 1.14.4 19w36a 19w37a 20w06a 1.16.2 1.16.3 1.16.4-pre2 1.16.4 20w46a 20w51a 21w05b 21w06a 21w07a 21w11a 21w14a 21w17a 1.17 1.17.1 21w39a 1.18.1 1.18.2 22w17a 1.19 1.19.2 1.19.3-rc3 1.19.3 1.20 1.20.1 1.20.2 1.20.4- 16w02a 24w18a
Created Issue:
Eggs and Snowballs fired from dispensers don't knockback mobs, but they do when thrown by the player or a snow golem.
I set up a dispenser firing eggs and snowballs, and then summoned various mobs in front of it. None of them were knocked back by either type of projectile.
This is inconsistent with eggs and snowballs thrown by right-clicking, and with snowballs thrown by snow golems, all of which knock back any mob.
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
relates to
is duplicated by
A comment with security level 'global-moderators' was removed.
relates to
is duplicated by
I set up a dispenser firing eggs and snowballs, and then summoned various mobs in front of it. None of them were knocked back by either type of projectile.
This is inconsistent with eggs and snowballs thrown by right-clicking, and with snowballs thrown by snow golems, all of which knock back any mob.
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
I set up a dispenser firing eggs and snowballs, and then summoned various mobs in front of it. None of them were knocked back by either type of projectile.
This is inconsistent with eggs and snowballs thrown by right-clicking, and with snowballs thrown by snow golems, all of which knock back any mob.
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
I set up a dispenser firing eggs and snowballs, and then summoned various mobs in front of it. None of them were knocked back by either type of projectile.
This is inconsistent with eggs and snowballs thrown by right-clicking, and with snowballs thrown by snow golems, all of which knock back any mob.
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
I set up a dispenser firing eggs and snowballs, and then summoned various mobs in front of it. None of them were knocked back by either type of projectile.
This is inconsistent with eggs and snowballs thrown by right-clicking, and with snowballs thrown by snow golems, all of which knock back any mob.
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
I set up a dispenser firing eggs and snowballs, and then summoned various mobs in front of it. None of them were knocked back by either type of projectile.
This is inconsistent with eggs and snowballs thrown by right-clicking, and with snowballs thrown by snow golems, all of which knock back any mob.
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
Code analysis by Marcono1234 in this comment
I set up a dispenser firing eggs and snowballs, and then summoned various mobs in front of it. None of them were knocked back by either type of projectile.
This is inconsistent with eggs and snowballs thrown by right-clicking, and with snowballs thrown by snow golems, all of which knock back any mob.
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
Code analysis by Marcono1234 in
thiscommentThe bug
Eggs and snowballs fired from dispensers don't knock back mobs, but they do when thrown by the player or a snow golem.
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.Code analysis
Code analysis by Marcono1234 in this comment.
Eggs andSnowballs fired from dispensers don't knockback mobs, but they do when thrown by the player or a snow golem.Eggs and snowballs fired from dispensers don't knock back mobs
The bug
Eggs and snowballs fired from dispensers don't knock back mobs, but they do when thrown by the player or a snow golem.
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.Code analysis
Code analysis by Marcono1234 in this comment.
The bug
Eggs and snowballs fired from dispensers don't knock back mobs, but they do when thrown by the player or a snow golem.
Note
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
Code analysis
Code analysis by Marcono1234 in this comment.
is duplicated by
The bug
Eggs and snowballs fired from dispensers don't knock back mobs, but they do when thrown by the player or a snow golem.
Note
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
Code analysis
Code analysis by Marcono1234 can be found in this comment.
is duplicated by
Eggs and snowballs fired from dispensers don't knock back mobsProjectiles fired from dispensers don't knock back mobs
The bug
Eggs
andsnowballs fired from dispensers don't knock back mobs, but they do when thrown by the player or a snow golem.Note
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
Code analysis
Code analysis by Marcono1234 can be found in this comment.
The bug
Eggs, snowballs, and splash potions of harming fired from dispensers don't knock back mobs, but they do when thrown by the player or a snow golem.
Note
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
Code analysis
Code analysis by Marcono1234 can be found in this comment.
is duplicated by
The bug
Eggs, snowballs, and splash potions of harming fired from dispensers don't knock back mobs, but they do when thrown by the player or a mob such as a snow golem or witch.
Note
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
Code analysis
Code analysis by Marcono1234 can be found in this comment.
relates to
relates to
The bug
Eggs, snowballs, and splash potions of harming fired from dispensers don't knock back mobs, but they do when thrown by the player or a mob such as a snow golem or witch.
Note
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
Code analysis
Code analysis by Marcono1234 can be found in this comment.
Eggs, snowballs, and splash potions of harming fired from dispensers don't knock back mobs, but they do when thrown by the player or a mob such as a snow golem or witch.
Steps to Reproduce:
- Build the setup as shown in the attachment below. setup.png
- Place some snowballs inside of the dispenser.
- Summon a husk on the diamond block.
- Use the lever to activate the dispenser and watch the husk closely.
Observed Behavior:
Projectiles fired from dispensers don't deal any knockback to entities.Expected Behavior:
Projectiles fired from dispensers would deal knockback to entities.Note
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
Code analysis
Code analysis by Marcono1234 can be found in this comment.
Eggs, snowballs, and splash potions of harming fired from dispensers don't knock back mobs, but they do when thrown by the player or a mob such as a snow golem or witch.Steps to Reproduce:
- Build the setup as shown in the attachment below. setup.png
- Place some snowballs inside of the dispenser.
- Summon a husk on the diamond block.
- Use the lever to activate the dispenser and watch the husk closely.
Observed Behavior:
Projectiles fired from dispensers don't deal any knockback to entities.Expected Behavior:
Projectiles fired from dispensers would deal knockback to entities.Note
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
Code analysis
Code analysis by Marcono1234 can be found in this comment.
Fireworks, eggs, snowballs, and splash potions of harming fired from dispensers don't knock back mobs, but they do when thrown by the player or a mob such as a snow golem or witch.
Steps to Reproduce:
- Build the setup as shown in the attachment below. setup.png
- Place some snowballs inside of the dispenser.
- Summon a husk on the diamond block.
- Use the lever to activate the dispenser and watch the husk closely.
Observed Behavior:
Projectiles fired from dispensers don't deal any knockback to entities.Expected Behavior:
Projectiles fired from dispensers would deal knockback to entities.Note
Arrows are not affected by this bug, as they knock back mobs when fired either from a bow or a dispenser.
Code analysis
Code analysis by Marcono1234 can be found in this comment.
Projectiles fired from dispensersdon't knock back mobsEntities don't receive knockback from projectiles fired from dispensers
Yes, MC-44280 says that snowballs don't knockback mobs, while this report says that they don't even hit the mobs. This isn't a duplicate.
Duplicate of MC-44280. Please use the search function next time.
Hi! This looks to be a duplicate of MC-44280.
Probably related to MC-44280 (entities fired from dispensers do not apply knockback)
This ticket relates to MC-44280.
End Crystals that explode due to taking damage without a source entity, as well as Minecarts with TNT that explode for any reason other than being hit/damaged by a flaming arrow/trident, will not deal any damage to players or other entities (though they will still cause knockback and destroy blocks). Seemingly, any time either of these entities would normally deal explosion damage (rather than player_explosion), they instead deal nothing* (i.e. anything that would cause the “… blew up” death message, rather than the “… was blown up by …” one).
*With the exception of a destroyed End Crystal damaging the Ender Dragon it was healing (which still happens).
Steps to Reproduce:
End Crystal
- Place, find, or summon an End Crystal.
- Stand next to it and damage it in any way that doesn't have a “source”, for example, hitting it with a snowball/egg from a dispenser (
MC-256942/MC-44280), having lightning strike nearby, etc., or just run:damage <end crystal> 0
- (<end crystal> can be filled in by facing it and using tab-complete.)
- Observe that you get pushed away, but are not damaged (as are any nearby (movable) entities).
Correct behavior:
- Place, find, or summon an(other) End Crystal.
- Stand next to it and damage it (non-explosively) in any way that does have a “source”, for example, simply punching it, hitting it with any arrow/trident/fireball, etc., or run:
damage <end crystal> 0 minecraft:generic by <any entity>- (minecraft:generic can be any damage type not in the #is_explosion tag (MC-118429).)
- Observe that you are probably dead.
Minecart with TNT
- Place or summon a Minecart with TNT.
- Ignite it via an activator rail or fire/explosion damage, or have it detonate by crashing into a wall, and stand next to it as it explodes.
- Observe (once again) that you are pushed back, but completely unscathed.
Correct behavior:
- Get out another TNT Minecart.
- Have it detonate by hitting it with any on-fire arrow, spectral arrow, or trident while standing next to it.
- Observe that you take damage normally.
Any Wind Charge without an owner (or whose owner is not a living entity) will only count as the “direct entity”, and not also the source entity, for the damage it inflicts on impact with another entity. This can occur, for example, via commands, due to the original owner unloading, or from the Wind Charge being redirected mid-flight by another unowned projectile. The inconsistency with (some) other projectiles, along with the fact that the damage command does not have the ability to simulate damage with a direct entity but no source entity, leads me to believe that this is a bug.
Possibly among other things, this means that:
- source_entity/killer in advancements/loot tables will not match any entity. (direct_entity/direct_killer will still work.)
- No knockback will dealt directly from the hit.
- This can be hard to notice due to the wind explosion also applying “knockback” of its own, though it can be more easily seen by wearing armor with a high level of Blast Protection, or by comparing the knockback from being hit directly above by a command-summoned Wind Charge:
summon minecraft:wind_charge ~ ~10 ~ {power: [0d, -0.1d, 0d]}…to the same from a command-summoned Fireball:
summon minecraft:fireball ~ ~10 ~ {power: [0d, -0.1d, 0d]}…or a Wind Charge with an owner:
summon minecraft:wind_charge ~ ~10 ~ {power: [0d, -0.1d, 0d], Owner: [I; 0, 0, 0, 2], Passengers: [{id: "minecraft:vex", UUID: [I; 0, 0, 0, 2], Health: 1f, LifeTicks: 20, NoAI: 1b, DeathTime: 20s}]}
- This can be hard to notice due to the wind explosion also applying “knockback” of its own, though it can be more easily seen by wearing armor with a high level of Blast Protection, or by comparing the knockback from being hit directly above by a command-summoned Wind Charge:
- The directional damage tilt for players will not be correctly triggered. (Instead, it'll trigger the broken behavior from MC-259212)
- If the impacted entity is an End Crystal, the Wind Charge will not be credited for any damage dealt/in death messages.
- If the impacted entity is a Ghast Fireball, it will not be redirected.
- (The same would probably apply to hitting other Wind Charges as well, but Wind Charges don't seem to collide with each other at all.)
(Since they are still set as they direct entity, unowned Wind Charges are still blockable with a shield and will show up in any directly-caused death messages.)
This is inconsistent with arrows (both types), tridents, and fireballs (both types), though it is (mostly) consistent with snowballs, eggs, Ender Pearls, splash potions/area effect clouds (MC-44280), Shulker Bullets, firework rockets, and just about any explosion source in the game (though snowballs, eggs, Ender Pearls, splash potions, firework rockets, and End Crystal/TNT Minecart explosions don't require that their owner be a living entity in order for them to count as the damage source). (Technically, this is also inconsistent with unowned Wither Skulls (direct impact only) and Evoker Fangs, which don't count as the source or direct entity for the magic damage inflicted, though that should probably be a bug report on its own.)



Here's a proof video : http://www.youtube.com/watch?v=mkR7gTR30xg
Confirmed in 1.8. Also affects Splash Potions of Harming.
confirmed for 1.9 pre2. snowballs fly through mobs now. It's worse than before.
Please link to this comment in the description
The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.
The reason why for this bug is that the net.minecraft.entity.EntityLivingBase.attackEntityFrom(DamageSource, float) method only knockbacks mobs if the indirect damage has an entity as owner. This is not the case for projectiles fired from a dispenser. The problem is that currently the coordinates of the thrower are used to determine the knockback.
This allows "exploits" like [Tutorial] Guided & Regular Rocket Launcher in Vanilla Minecraft Using Fireballs! [MC 1.8].
A possible solution would be to use the motion of the projectile. This means however that the distance does not determine the strength completely anymore.
The following shows how this could be done, but the motion values very likely need to be adjusted.
Still present in 1.9.3-pre2.
Still present in 16w20a
Confirmed for
@Marcono1234
If knockback requires an entity as the damage source, why do arrows fired from dispensers work as expected?
Can we copy the knockback strength and direction from the arrows code, or is that too tied up with damage > 0 hearts or something?
@Nick Bambridge Arrows will set themselves as the attacker if no "owner" is present:
Theoretically the same could be done with the eggs and snowballs (example below is from eggs, with the commented code being an addition, though I have not actually tried this myself):
Confirmed for 17w15a
Confirmed for 1.12.2 and 17w47b.
Confirmed for 1.13.1. Please, if you don't mind, I'd like to be the reporter of this ticket, I'll update it accordingly.
Actually, I am still around, and I do wish to be acknowledged as the discoverer of the bug.
@Kraif What changes did you feel need to be made?
@Torabi You've been changing the reporter to Kraif on quite a few bugs recently. Maybe he should be made a mod instead?
Nick Bambridge: I asked to be the reporter because your ticket was outdated. I'll update it accordingly. BTW: Everyone can see that you are the original reporter of this ticket by clicking "History" or "Activity", so don't worry!
You haven't updated the issue for the past three years, and your last activity on the tracker was in december, nine months ago. The fact that you created the issue is still listed in the issue history, and the reporter field just allows regular users to update the issue directly, rather than leaving a comment for someone else to take care of it. Unfortunately, the JIRA software the tracker runs on does not allow for multiple users to have edit permissions on a single issue, without having those permissions across entire projects, like our helpers and mods do.
We have an internal selection process for bringing on new helpers and mods, and consider not only how active a user is, but the quality and tone of their interactions with the tracker and other users. We like to watch a user over a period of time, to see how well they understand the tracker and the community, before we consider offering them additional roles.
Confirmed for version 1.13.2
Confirmed for version 1.14.4
Still present in 19w36a
Still present in 19w37a.
Also attached screenshot of my test setup.
Still exists in 1.16 Pre-release 4, I would also like to add that splash potions are not listed above as one of the projectiles that fail to inflict knockback but I found out that they don't inflict knockback either.
Still present in 1.16.1, including splash potions as noted by @Dobbi
Still present in 1.16.3
Would it be possible to change me back to the reporter of this bug, so I can keep the affected versions up to date and add info regarding splash potions?
can u add 1.16.3 i also checked
Probably related to MC-125936.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a.
Video attached.
Can confirm in 21w11a.
Can confirm in 21w14a.
Can confirm in 21w17a.
Possibly same root cause as
MC-225541Can confirm in 1.17.
Can confirm in 1.17.1.
This ticket relates to
MC-78473.Can confirm this behavior in 21w39a. Here are some extra details regarding this problem.
The Bug:
Projectiles fired from dispensers don't deal any knockback to entities.
Steps to Reproduce:
Observed Behavior:
Projectiles fired from dispensers don't deal any knockback to entities.
Expected Behavior:
Projectiles fired from dispensers would deal knockback to entities.
Can confirm in 1.18.1.
Can confirm in 1.18.2.
Can confirm in 22w17a.
Can confirm in 1.19.
Can confirm in 1.19.2.
Can Confirm 1.19.3 Release Candidate 3
Josh Birk, 1.19.3 Release Candidate 3 is already marked as affected.