8

I've been trying to work out if thrown snowballs, in any vanilla version, have been able to hit, as in cause the damage animation and knockback (not necessarily actually taken away hearts, and not just disappearing on collision), other players in vanilla Minecraft? If so, in what version did this occur?

I've been searching about this for a while, but have only found conflicting claims:

In general, people seem very certain of remembering it, but are unable to provide evidence. If it is the case that snowballs once did knockback, it should be relatively easy to find or record a short clip showing so and post it; doing so is what I want for the answer to this question.

Is there any proof that snowballs knocking back players was actually ever a vanilla feature? If you believe this was once a vanilla feature give proof or a version number. I want an actual answer to this question, not just more of what people remember as I have listed above.

  • I have only played vanilla and I'm pretty sure I have thrown snowballs at my wife's character and they would connect. I don't recall if there was any knock-back or not though. I'm sure someone will test it and post an actual answer though :P – Elise Apr 12 '15 at 13:24
  • The issue on the bug tracker was committed for version 1.4.5 so I'd recommend going back to 1.3 or so. The earliest video I remembered a snowball fight from doesn't show knockback, but snowballs at least didn't pass through players in Beta 1.1_02. – jazzpi Apr 12 '15 at 14:33
  • 2
    I'm with @Chippies on this one, I remember several instances where throwing snowballs (and eggs for that matter) caused a "hit reaction" from the other player, but I can't recall anything about damage. I also believe this was the case for eggs as well. – Ben Apr 13 '15 at 13:05
  • 1
    If you are going to ask answerers to provide videos, gifs, or images as proof that it does happen, then you need to take your own advice and provide proof that it doesn't happen in the three releases you personally tested. – Rainbolt Apr 16 '15 at 20:28
  • @Rainbolt I don't feel as if that's a necessary requirement for requesting proof of something, but I'll add some videos in. – SirBenet Apr 16 '15 at 20:30
5
+100

No. In vanilla Minecraft on a vanilla server, snowballs and other throwables do not hit players.

It's simply occam's razor; if snowballs didn't hit the player in alpha 1.0.5, and don't hit the player in release 1.8.4 (and also all versions after release 1.4.4, as confirmed in MC-3179), and there is no indication in any changelog that the behavior changed, let alone changed twice in between those versions, it stands to reason that such a change did not occur.

There are some server plug-ins that change this behavior, though. Snowball Damage is a Bukkit plugin that does precisely what it says on the tin. Similar plugins with similar functionalities exist. This is likely where the confusion comes. Many, many servers use Bukkit (in 2012, 80% of servers were running Bukkit. More current statistics are unavailable), so many users may have been exposed to such plugins, and are remembering behavior that does not exist in vanilla.

1

Chances are, whether a snowball will hit another player or not is entirely dependant on if PvP is enabled. Because, after all, if a snowball does indeed hurt someone and cause knockback, then you wouldn't want that affecting other players on non-PvP servers.

  • PvP is always enabled on pure vanilla so this would be irrelevant. – cutypi Apr 22 '15 at 0:05
  • That's not true. PvP is a setting in the server.properties. It defaults to on, however. -- The PvP entry even says "Players shooting themselves with arrows will only receive damage if PvP is enabled." If snowballs are derived from the same projectile superclass as arrows (which I'm sure they are), it would be likely that snowballs acted the same way. – Tustin2121 Apr 22 '15 at 2:24
  • Yes that is true, however that would be changing a server setting, not present in the actual Minecraft version. Let's agree to disagree :) – cutypi Apr 22 '15 at 3:10
  • Except that I don't know what you mean by "not present in the actual Minecraft version". I'm saying if this is an issue of a setting and not an issue of the version number, then that would explain why some people report that this behavior has always been in Minecraft and why some report never seeing it in any version. If people set up or join servers deliberately that have PvP off (as I tended to with my siblings), then they would be disappointed by the snowballs not actually connecting. If people don't care or leave it on deliberately, they'd have snowballs that did something. – Tustin2121 Apr 22 '15 at 15:52
  • Could you show some kind of evidence of this, rather than a "chances are" statement? If you do, you'll get the bounty. I feel as though your reason already depends on assuming that snowballs do cause knockback, which is what I'm asking. – SirBenet Apr 22 '15 at 16:32
1

According to the decompiled source code of version 1.7.10 (the last version of the code you can get before Mojang began enforcing its will on not wanting the source code released), you can hit another player with a snowball, but it does no damage and causes no knockback.

The EntitySnowball class shows us that Snowballs only apply actual damage to Blazes (the damage value is 0, unless it's a Blaze, in which case its 3):

protected void a(MovingObjectPosition movingobjectposition) {
    if (movingobjectposition.entity != null) {
        byte b0 = 0;

        if (movingobjectposition.entity instanceof EntityBlaze) {
            b0 = 3;
        }

        movingobjectposition.entity.damageEntity(DamageSource.projectile(this, this.getShooter()), (float) b0);
    }
    //[...]
}

The damageEntity routine in the EntityLiving class does various things, like check invulnerability, calculate how much damage reduction a helmet has from falling anvils, checking fire resistance, and other things. Notably, it plays a hurt sound. This sound is played even if a damage value of 0 is given to the function. Also, notably, knockback isn't applied in the damageEntity() function; knockback is handled separately.

The final sticking point is the overridden damageEntity routine in the EntityPlayer class. Due to how overridding works, this method is called first when damaging a player. This method is written a little obtusely.

public boolean damageEntity(DamageSource damagesource, float f) {
    if (this.isInvulnerable()) {
        return false;
    } else {

Obviously, if the player is invulnerable for whatever reason, no damage is applied (and no sound is produced).

        boolean flag = this.server.X() && this.server.getPvP() && "fall".equals(damagesource.translationIndex);

        if (!flag && this.invulnerableTicks > 0 && damagesource != DamageSource.OUT_OF_WORLD) {
            return false;

This extremely confusing set of checks is finding instances when damage wouldn't be applied. Considering that Minecraft actually functions, chances are this "return false" is often passed over successfully.

        } else {
            if (damagesource instanceof EntityDamageSource) {
                Entity entity = damagesource.getEntity();

                if (entity instanceof EntityHuman && !this.a((EntityHuman) entity)) {
                    return false;
                }

This line checks to see if the damage is coming from a Human. The this.a() function checks the server's PvP setting, and then if the other player is a team ally. If the PvP is off, or the other player is an ally, the function returns here and no damage is done nor hurt sound produced. Note, this line checks for the one player punching another (possibly with weapon in hand) and not for projectiles.

                if (entity instanceof EntityArrow) {
                    EntityArrow entityarrow = (EntityArrow) entity;

                    if (entityarrow.shooter instanceof EntityHuman && !this.a((EntityHuman) entityarrow.shooter)) {
                        return false;
                    }
                }

These lines, however, check for projectiles. Or rather, for Arrows, only. As it only checks for only Arrows, other projectiles like Snowballs and Eggs are not included in this check. Thus when throwing a snowball, these lines are not executed.

            }

            return super.damageEntity(damagesource, f);
        }
    }
}

Finally, the function ends by calling the method described above in the EntityLiving class, which applies damage and produces a "hurt" sound. Note that because the Snowball bypasses the Arrow in PvP check, it should "hit" the other player, in that the other player will make a sound and apply invulnerability flashing. However, snowballs do no damage and produce no knockback.

(By extension, Eggs should work the exact same way, as they too pass a 0 to the damageEntity() function).

  • I have verified in-game in 1.8 (with another player) that this is not the case. I'll check 1.7.10 in a bit, but I think there might be something else going on here. (I can get footage, but that may be multiple hours) – Unionhawk Apr 23 '15 at 17:02
  • I just checked and can verify that this is not the case in 1.7.10. Something else is definitely going on here. – Unionhawk Apr 23 '15 at 17:17
-2

Yes, throwing a snowball is like throwing an egg. It will hit you, make the sound and animation, and it might even do damage. Snowballs do very little damage, if any, but they do actually hit another player. You could also hit yourself by throwing it straight up in the air and letting it fall onto you

  • I'm fairly certain this answer is incorrect. In the current vanilla version, snowballs do not have any damage or knockback, even to yourself. I knew this before asking the question. I'm asking if they ever caused knockback in vanilla. I would also like a gif, video, image or version number in which this occurred, so it's not just more of people's words against other people's words. – SirBenet Apr 15 '15 at 19:03
  • 2
    @colorfusion that video looks like a bug right now, snowballs DEFINITELY do at least knockback, I have done it before in 1.8 vanilla. – Elias Benevedes Apr 16 '15 at 20:26
  • @EliasBenevedes Can you provide a gif, video, image, etc. of this? I'm almost completely sure that snowballs do not knockback players in 1.8. – SirBenet Apr 16 '15 at 20:27
  • 1
    @colorfusion sorry, didn't have time to do it. I'm also realizing after I've done some research that it may be packaged with essentials or something, for I only play bukkit servers or modded. – Elias Benevedes Apr 17 '15 at 17:00
  • 2
    @EliasBenevedes I feel that this is what is confusing a lot of people (if it is the case that it's not a vanilla feature). People claim they "DEFINITELY do at least knockback [...] in 1.8 vanilla", whilst actually having played on Bukkit or otherwise modded servers, even without realizing. – SirBenet Apr 17 '15 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.