mojira.dev
MC-3179

Snowballs, Enderpearls and Eggs do not knockback players in multiplayer

In a LAN world when I throw a Snowball/Egg or use a Fishing rod, it goes right through the target player, without pushing them, or latching on in case of the rod. I do have Optifine installed, the LAN host had no mods.

What I expected to happen was: For the Egg/Snowball to hit them back, and the rod to hook them.

What actually happened was: None of the items affected them at all.

Steps to Reproduce:
1. Start a LAN world.
2. Equip one of the items, and throw it at a player.
3. Watch as it goes through them, causing no effects.


Code analysis by @unknown in this comment

Related issues

MC-2483 Pushing and knocbacking bugs MC-4237 Snowballs travel through players MC-4397 Armor Absorbs Snowball Damage MC-5310 On LAN multiplayer player doesn't receive knockback from snowball MC-8357 Eggs dont deal damage, or punch anything anymore (seriously, no duplication here) MC-8381 In multiplayer, snowballs dont do anything to players. they should work like eggs, knocking back the target slightly. but they seem to do nothing at all, now. MC-9297 snowballs do no damage to other players in lan MC-12479 Snowball knockback does not effect player MC-48610 Eggs/Snowballs don't hit player MC-49738 Snowballs and Eggs don't do knock back when shot MC-61717 Snowballs and Egg don't knockback Players MC-63809 Snowball and Eggs didn't knock back MC-68426 Snowballs, Eggs and Fishing Rod don't do any knockback MC-72205 Snowballs do not play attack animation MC-85713 Fishing rods cant hurt players! MC-92110 Snowballs don't give damage MC-121885 Snowballs no longer "hit" players MC-145273 Snowballs do not affect player entities [regardless of distance]

Attachments

Comments

migrated
[media][media]
kumasasa

PvP enabled ?
Please reproduce without optifine.

Tails

I think throwable objects never had any effect on players. Even if PvP was enabled. (Double negation FTW xD )

kumasasa

Snowballs did (do ?) hit other players without doing any damage.

Fin McKevin

PvP was on, and snowballs always had a small knockback when you got hit with one, as did eggs and fishing rods used to "catch" players, however this broke them rather fast. The host didn't have any mods, and the same thing was happening to him.

Tails

Confirmed in 1.4.5.

Tails

Adjusted title.

Fin McKevin

Enderpearls had knock back? I guess I never used them a missiles...

Adam Dalgleish

Is this still being worked on?

Max Sharpe

Can someone have a look at this? It's been a few months now.

Thomas Mobley

Even into 1.7.2, we have yet ta see a fix ta this bug here.
I can see them leavin' the absence of a knockback fer chicken eggs, but snowballs?
Snowballs NEED a knockback effect.
END OF LINE

agentpaint

I confirm that it's still present in 1.7.4. I made a Spleef arena, no mods, (except Optifine), PvP on, and snowballs did nothing. I could be that it was a Bukkit server previously, but the only thing that broke was the invisibility effect.

galaxy_2alex

OptiFine = Modification
Bukkit = Modification
Reproduce it in Vanilla, and I'll update the affected versions

Luke Dueck

Still happening in 14w11b.
I hope this is fixed for 1.8 with all then new scoreboard feature you could make snowballs do some amazing stuff if this gets fixed.
Plus what good are snowballs if you can't have a snowball fight.

williewillus

Solution (MCP Names):
In EntityPlayer's attackEntityFrom() method, there exists a check that instantly returns false if the damage amount is 0. This prevents snowballs from knocking back players and needs to be removed to fix this bug.

s7%6maTt4wC$JQ8*

confirmed in 14w26c.

Maxwell Souza Carvalho

confirmed on 1.7.10 and 14w30c, please fix this, and make it work/not work with scoreboard teams with firendly fire on/off

dale christensen

Still happening in 14w32d

Maxwell Souza Carvalho

hey edit the ticket and delete the optifine line, it's irrelevant and ADM's can ignore the ticket

Maxwell Souza Carvalho

i Readed the comment of Vincent Lee
"Solution (MCP Names):
In EntityPlayer's attackEntityFrom() method, there exists a check that instantly returns false if the damage amount is 0. This prevents snowballs from knocking back players and needs to be removed to fix this bug."

really, when the damage is 0, the player isn't knock back, i equiped a armor that gives me damage -100 and try to hit my friends and they really don't take any knock back at all

another thing, i try to use the new /entitydata and it don't help
i used /entitydata @e[type=Snowball] {Fire:10s,damage:10} and the snowball just becamed fired but don't have any damage...

s7%6maTt4wC$JQ8*

Bug still appears in 14w33a.

williewillus

The knockback steadily decreases when the damage is small, but if the damage is absolutely 0, there is a hardcoded check to instantly stop further processing.

a

Present in 1.8.1-pre3
To clarify, the snowballs/eggs don't go through the player, they just disappear when they hit a player, make no sound, particle effects, or knockback.

galaxy_2alex

Reopened, thanks.

Alex Tremblay

Snowballs and eggs don't apply knockback or damage animation (player turns red) when we throw them on my server.
It's a Vanilla 1.8 server hosted on my own computer and PvP is enabled.

a

In 1.8.1.

Color Fusion

Can someone show that this was ever a vanilla feature?

williewillus

This is a very, very, very, VERY old bug. Like release 1.1 or before.
Snowball fights used to be a very common thing on multiplayer, eggs were added for the humor of throwing them at others.
What point are snowball fights when they just vanish on contact?

Color Fusion

@VincentLee Can you show what version this bug does not exist on? I used to think that this was a Bukkit only feature.

williewillus

Nope, I very very distinctly remember having snowball fights on vanilla servers. The only reason Bukkit has it is because vanilla had it at some point and they forgot to remove it when vanilla did.

If I find a means to get old server jars, I'll try to prove it.

Color Fusion

@VincentLee You can change server versions with something like Minecraft Version Changer. I'm trying to find definite proof whether this was a feature or not, as some people also remember it not being.

williewillus

MCVC is down right now, and I don't currently have time to extensively test this (perhaps you can?)

I just remember that Notch added snowballs with the purpose of them being used for snowball fights, so it is illogical that they cannot be used for that purpose now.

Color Fusion

@VincentLee I checked a whole bunch of versions through alpha and beta, none of them had knockback. I can't really disprove it without checking every single version, but it should be easy to prove if you remember roughly when you had snowball fights.

I'm mainly trying to discover in what version, if any, snowballs had knockback to players.

Also source on this statement that you remember?

Maxwell Souza Carvalho

mobs have knockback and players dont

Votuko

This may not be very helpful, but I believe that the bug originally appeared around version 1.3, when a lot of player collision code was reworked.

It was in the same update when players lost the ability to nudge other players on multiplayer, as well as when all items that deal no damage (snowballs, fishing rods, eggs) lost their ability to knock back players as they previously could.

I'm not set up to check the game myself, but there are plenty on anecdotes on the Minecraft Forums of people talking about how snowballs used to hit players. (Not to mention the number of duplicate reports of this bug on this site!)

TL;DR I'm not sure why this is being debated, because the bug is clearly marked as "confirmed". That was done by a mod who knew the game at the time, with the consensus of all those who reported it.

Color Fusion

@Votuko

I'm personally leaning towards it having existed in Vanilla, but when I started to look for proof I couldn't find any. I'd also like the version number so I can look at what actually caused this bug.

The bug tracker mods themselves were seemingly unsure of whether or not this was ever a feature, and their word is not always 100% correct; if you look at the Transitions Summary, no Mojang employee has confirmed it.

Snowballs, when initially implemented, did no knock back, damage, or visual affect. The wiki page of the time notes this (bottom of trivia).

Anecdotes are unreliable, and don't really help me with finding the version in which this is a feature. Many players were likely playing on Bukkit, even without knowledge, or otherwise modded serves (if it isn't the case that this was once a vanilla feature).

I checked out release 1.2.4 and, like many other versions, snowballs do not appear to cause knock back.

a

Why don't we just ask a developer!??!? Send a couple tweets asking if this was a thing or not.

a

(Since we know they don't bother looking here)

Color Fusion

@JonathanHynes Tried, haven't got a response yet. If this actually existed, it should be way easier to find a video or version number than it would be to contact and hope for a response from a dev. Plus it would be definite proof.

Blake Miner

Just figured I would chime in...

There is a lot of talk here about whether or not snowballs ever knocked back players in previous versions of MC. I can understand that might help the developer re-implement the feature, but in the grand scheme of things... does it really matter?

Does it really matter whether or not snowballs actually knocked back players in previous versions? What seems clear to me is that THEY SHOULD CAUSE KNOCKBACK. They already cause knockback against mobs.

Without much knowledge of the inner-workings of the game, this feature/bug should be relatively trivial to implement/fix. Am I wrong? Can we start worrying about how to close the issue instead of trying to prove whether or not the feature existed in previous versions? ... because from what I can tell... the answer isn't all that clear. We're talking about a version of MC released 3 years ago.

Just my $0.02. Thoughts?

Color Fusion

@BlakeMiner

This is a bug tracker, not a place to suggest features. This report should be here if snowballs are meant to cause knock back but don't, of which them doing so in the past would be a good indication. The report shouldn't be here just because you think it would be a good idea for them to cause knock back.

If people just used this as a way to get their suggestions more attention, no matter how trivial they think it would be for devs to implement, the tracker would be abused and bastardized from floods of suggestions, and actual bugs would be extremely annoying to find and fix.

So yes, it does matter if this is a bug. If you want to suggest a feature, try http://www.reddit.com/r/minecraftsuggestions or http://www.minecraftforum.net/forums/minecraft-discussion/suggestions.

a

I'm really sick of people brushing tickets off as feature requests when they're just honest observations of logical errors. We all understand that there is more than one kind of programming error, correct? Not every bug is simply a forgotten semicolon. Oversight can cause unintended things with perfectly clean code.

Again, if the devs haven't declared no-knockback to be Works As Intended, then this most certainly is a valid bug report.

Color Fusion

@JonathanHynes

I'm not brushing the ticket off as a feature request. I do not think it is a feature request. Even if this was never implemented into the game, and I am leaning slightly towards it having been a feature at some point, this ticket would clearly just be a mistake, not an attempt at suggesting a feature.

I am replying to Blake Miner, who is literally claiming feature requests should be allowed here, and that it shouldn't matter whether it's a bug or not.

Edit: Blake originally made two posts, and then deleted the second, so my post is perhaps lacking some context now.

Maxwell Souza Carvalho

For me, this is a bug, because mobs have knockback. Maybe for most People this isn t importante. But if mojang fix this, its possible to make maps like paintball, Guns and a lot of minigames without plugins or mods, all vanilla features are important.

Blake Miner

@ColorFusion - You're right. I stand corrected โ€“ I didn't mean to suggest that we should be posting new features here... although that's exactly what I did, out of frustration, of course. As with @Carvalho, I think this is a bug because snowballs and other items already cause knockback to mobs. It seems buggy (or at the very least silly or unexpected) that the behavior would not apply to players, as well.

Whether or not it was a previous feature is another debate, which I think is rather irrelevant. The fact still stands... it seems awfully strange that knockback only applies to mobs and not players.

Ray

Aren't these guys playing on a vanilla server?

https://youtu.be/yiO6RZDmsIU?t=1m35s

Ray

Yeah it looks like it, that would put it around Minecraft version 1.7.5.

Color Fusion

@Ray Nope, checked the server given in the description, it's definitely modded.

If they're not actually using the linked server then there are other things that show it's not vanilla that I found from the next episode:

There's probably a lot more, but I think that's sufficient to show that they are playing on a modded server.

Color Fusion

I've compiled a bunch of videos showing snowballs having no knockback throughout different versions of vanilla (PVP on by default) survival:

Unless anyone has any objections (perhaps this was only a feature very briefly between these listed versions, or there's something wrong with my testing method), it would seem as if this is not a feature that accidentally got removed, but that it never existed in vanilla to begin with.

Blake Miner

@ColorFusion - Again, no one really cares if snowballs, eggs, etc. ever caused player knockback in previous versions of vanilla Minecraft or not. It's a moot point. I still think that the general consensus is that there is a bug in the game. If possible, can we start talking about how we could fix it?... or at the very least... whether or not it should be fixed?

To many people, it seems awfully strange (even buggy) that knockback (especially by thrown snowballs and eggs) only applies to mobs and not players.

Thoughts? Suggestions on how to fix? Concerns?

Maxwell Souza Carvalho

A very easy way tรด fix is add a damage tag. The default value should be 0, the snowball will hit but dont harm

Color Fusion

@BlakeMiner

I don't think the question is "whether or not it should be fixed", and "fixed" already assumes that it's a bug. If it is a bug, it should be fixed. If it isn't a bug, then this is not the place to discuss adding it as a feature. Deciding if it is a bug or not is what I've been trying to do. Establishing that it was never previously in the game is an important step. I believe that a lot of people were calling it a bug under the illusion that it was once in the game, but had at some point been broken. Look at the early replies to this; the main reason it seems to have been accepted as a bug because people remembered it being a feature.

There are many similar intended mechanics that work on mobs but not players. You can push mobs around, but not players. You can leash mobs, but you can't leash players (with neither a lead nor a fishing rod).

Balance-wise I don't think it would make sense for it to be intended. If you hit a player once with a fishing rod and you're above them, would you pull them up then be able to drop them down until they die? On top of that, is there actually code handling players pulling other players with fishing rods? If there's code there that just happens to be broken, then it's likely that this is a bug, but if there isn't any attempt to make this possible, it's likely not intended to exist. Not to say that it couldn't be added as a feature in the future, though.

Mustek

Continuing @unknown's post:

We have confirmations from a former bukkit member that the snowball knockback was removed from bukkit source as to match vanilla behaviour.
Anyways, this ticket remains open until further feedback from a Mojangsta, even though this isn't really a bug.

Maxwell Souza Carvalho

Thanks, this is the Best way to Know

Votuko

So was everything to do with players colliding with other players a bukkit feature?

For example I remember that it used to be possible to nudge other players in multiplayer, but it was removed at some point.

I had been pretty sure that that was at the same update that reworked player code and caused this bug, but seeing as this bug apparently never existed I am beginning to doubt my memories. (I was sure I remembered reading a Mojang post about collisions being reworked to require a non-zero damage value to trigger, thus breaking any item that previously had knockback but zero damage. At that point I wouldn't have been reading something by bukkit...)

CubeTheThird

@Votuko, player nudging was indeed a thing, and was removed a loong time ago (around 1.1?).

Blake Miner

@ColorFusion pointed out that there are certain mechanics that work on mobs but not players (i.e. you can push mobs, but you cannot push players). This is all well and good; however, there are certain game mechanics that a player would expect to work on other players and mobs alike. This is what people should be talking about. "Should snowballs cause knockback on both mobs and other players?" If so, is it a reasonable expectation of the game? And if so, does it appear buggy that the functionality is missing? This is akin to asking, "What types of blocks should Endermen be allowed to pick up?" Should they be able to pick up blocks that destroy structures? Of course not... the blocks they can pick up should be restricted... maybe they can pick up dirt and other certain types of blocks. In my opinion, it would be a bug if Endermen could destroy players' structures.

In other words, I think that players expect snowballs to cause knockback to both players and mobs. Just ask around - this is what we should be talking about here. The fact that many believe that it was once a feature of vanilla Minecraft (whether true or not) simply proves that this missing functionality feels awkward at best and buggy at worst.

That said, this issue also addresses Enderpearls, Fishing Rods, and Eggs... all of which should probably affect players, as well. However, admittedly, fishing rods are a bit of a stretch. It would be cool if fishing rods could leash players and pull them around, but it also might be annoying. So, I could see how one could argue that as being a feature request and not a bug. As @ColorFusion mentioned, would you really want to allow a player to use a fishing rod to grab a player and drop them several times until death? Maybe... maybe not.

Thoughts on this?

Color Fusion

@@unknown

I think your definition of a bug is a lot more open than mine, though as Mustek said it'd probably be best to get a Mojangsta's view on it. If it never was a feature to exclude them, I wouldn't call endermen picking up player blocks a bug either, unless it was intended to not happen; poor balance maybe, but not a bug.

The fact that many believe that it was once a feature of vanilla Minecraft (whether true or not) simply proves that this missing functionality feels awkward at best and buggy at worst.

I'd say it more shows that people get Bukkit/Essentials and vanilla confused, a belief probably proliferated by the fact that many of these servers still advertise as "Vanilla", "Vanilla style", or "No mods". I play on pure vanilla servers a lot, and I've seen many people come on and act confused at the lack of /home, /r, /ping, /afk, or other Essentials commands.

Maybe it shows that people want these commands/features, but I certainly wouldn't go as far as to say that this "simply proves" that it's "buggy".

kumasasa

As of 15w36d snowballs no longer go through players, but there is still no knockback.

user-2a4c8

15w46b, snowballs can not be forced (with tags) to cause damage or potion effects (even though they are relatively the same as arrows, yet still hit a player).

marcono1234

Confirmed for

  • 1.9

marcono1234

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 this is happening is that the method net.minecraft.client.entity.EntityOtherPlayerMP.attackEntityFrom(DamageSource, float) which overrides the method net.minecraft.entity.EntityLivingBase.attackEntityFrom(DamageSource, float) always returns true without even running code. When projectiles (except arrows) hit an entity they only call this method. For mobs this method is not overridden so they get knockbacked. Additionally the method net.minecraft.entity.player.EntityPlayer.attackEntityFrom(DamageSource, float) only calls the parent method if the damage is greater than 0. The problem is that the net.minecraft.entity.player.EntityPlayer.attackTargetEntityWithCurrentItem(Entity) method knocks the player back already.

Note: There might be situations in which knockback is applied twice already when the method net.minecraft.entity.monster.EntityMob.attackEntityAsMob(Entity) is called.

wobst.michael

[Mod] FVbico : just as a suggestion, maybe when Marcono1234 wants to have his code/fix/analysis linked in the description, it should be made more obvious, like redstonehelper did in MC-212. That small 'The code' link can be read over very quick, so you might want to make it more obvious/readable.

user-f2760

@unknown sorry, I tend to write things down with as few words as possible, when mojang looks at issues they read the issue carfully and most likely won't miss the link tho

marcono1234

Thank you, I hope what I provide is correct and I just don't want it to get lost in the comments ๐Ÿ™‚

marcono1234

Fishing rods do not damage players or entities and work for players in 16w15b

[Mod] redstonehelper

Would you consider this ticket fixed?

marcono1234

No, it still is not working for projectiles like snowballs. I just wanted to say that fishing rods are not affected anymore

marcono1234

Why is this "WAI"?

Color Fusion

@Marcono1234 The Works As Intended resolution was added by a Mojang employee, so presumably they don't intend for snowballs/enderpearls/eggs to knock back players (not to say it will never be added as a feature, like with fishing rods, just that it isn't a bug).

marcono1234

But it is kind of strange, most likely when you are new to the game. As it works with every mob you would expect it to work with players as well. That is why I would like to know why this was resolved as "WAI".

Creeper Boy

I agree, here. If this was truly WAI, then why did it exist in every version prior?

Especially snowballs, since we should be able to use them to have a snowball fight. I can't believe this has lain dormant for over a year now without a true resolution. Is there a way we can get the feature re-added? Or is there a problem with that feature existing?

CubeTheThird

Please direct all bug report discussions to the Mojira subreddit.

Fin McKevin

michael

Confirmed

LAN, snowball

Minecraft 1.4.4, Minecraft 1.4.5, Snapshot 13w04a, Snapshot 13w05b, Minecraft 1.5, ..., Minecraft 1.8.8, Minecraft 15w36d, Minecraft 15w46a, Minecraft 1.9, Minecraft 1.10.2

Retrieved