mojira.dev
MC-212

Fall damage is ignored for a couple of seconds when reloading into LAN or singleplayer worlds

The Bug:

Fall damage is ignored for a couple of seconds when reloading into LAN or singleplayer worlds.

Please note that multiplayer server worlds are not affected by this issue.

Steps to Reproduce:

  1. Summon a large tower of blocks by using the command provided below.

    /fill ~3 ~ ~ ~3 ~45 ~ minecraft:polished_andesite
  2. Stand on top of the tower and switch into survival mode.

  3. Jump off the edge of the tower, but before you hit the ground, hit the ESC key and exit the world.

  4. Load into the world once again and as you do this, watch your health closely.

  5. Take note as to whether or not fall damage is ignored for a couple of seconds when reloading into LAN or singleplayer worlds.

Observed Behavior:

Fall damage is ignored for a couple of seconds when reloading into LAN or singleplayer worlds.

Expected Behavior:

Fall damage would not be ignored for a couple of seconds when reloading into LAN or singleplayer worlds.

Code Analysis:

Code analysis by @unknown can be found in this comment.

Related issues

MC-967 No fall damage when quit and re-enter the game. MC-1496 When falling in the Nether you can log out and log back in and receive no fall damage MC-13087 Exiting a world while falling cancels your velocity MC-18283 No fall damage in Overworld MC-21641 No-fall damage MC-37752 Saving game in mid air ignores falling height MC-38006 Not taking falling damage after quitting and coming back MC-50863 Jump Glitch MC-61922 Fall damage MC-75332 No fall damage if you quit and reenter the world. MC-77794 No fall damage if you leave a world when falling MC-82581 Reloading World resets Fall Damage MC-91417 A way to survive lethal fall damage. MC-91439 I found a bug that gives you invincibility for a few seconds on a single player world. MC-105176 Save & Quit, Rejoin world prevents fall damage MC-105755 Fall damage can be negated exploit MC-106203 Falling Glitch MC-122122 Fall damage Glitch MC-123979 No fall damage when you quit and rejoin. MC-126079 No Fall Damage MC-153228 Falling Damage Bug MC-166995 Leaving the game when your falling from a high place makes you not take damage MC-184479 Fall issue MC-190057 when saving and quit and falling dose not take fall damage when close to the ground MC-197057 Anti-Fall Damage bug MC-198511 [Exploit] [Save/Load] The player's character is immune to damage for a few seconds after loading the savefile MC-205630 Falling bug MC-208426 Fall distance isn't saved MC-210368 Fall damage negated on respawn when pushed by piston with a slimeblock MC-214355 No Fall Damage Glitch MC-227574 Fall damage bug MC-228590 Fall Damage bug MC-233834 Disconection damage deletion MC-265212 Nothing clutch MC-266866 Bone mealing grass seems to cancel fall damage

Attachments

Comments

migrated
[media][media][media][media]
migrated

mattabase has reported this on his stream as well

Erik Broes

Falldamage can occur on a remote server with pvp turned on.

migrated

Grum, the bug is that fall-damage gets re-calculated when you login.

wobst.michael

Yes, that is the point. Falldamage gets re-calculated after logging out/logging in. So if you logg out if you're three or four blocks above the ground, you won't get any fall damage at all when logging back in! Not sure if Grum misunderstood this issue.
This applies to single- as well as multiplayer, btw.

Erik Broes

No, the data is stored and loaded correctly, the only reason you do not get damage is because you get 3 seconds of invulnerability when you login. I spend a good 45 minutes with a debugger jumping of a pole seeing what happened 😛

migrated

Does this mean you no longer get invulnerability upon login? Because the 2-5 seconds it takes to load a server texture would become brutal. I hope this fix only applies to fall damage.

migrated

I think a good fix would be to give you invulnerability only if you are on the ground, but if you were in the air, you dont get it. Just an idea, dont get mad if it is a bad one.

also, this bug applies to singleplayer in 1.5.2, too

migrated

Reopened as this is still an issue in 1.6 Singeplayer.

migrated

@@unknown
@unknown already has put them up, he just hasn't taken off the fix version, probably because it was confirmed in multiplayer in 1.4.3 (but I haven't tested it yet, it could still be a bug in multiplayer)

migrated

I think that the 3 seconds of invulnerability needs to be kept, except for fall damage. Or have a very large invisible health shield upon login, which would only be ignored by fall damage.

migrated

I think the current code rewrites are going to seperate certain kinds of damage and not into 1 category. It's just an guess, but that would make it possible to make invulnerability not count on fall damage.

migrated

Still exists in 1.7.10 single player.

In multiplayer, a player will fall to his death but in single player he will land without falldamage.

wobst.michael

NOTE: this issue only appears in singleplayer. When playing in multiplayer, everything works as expected.

migrated

Still in 1.8.1

migrated

Confirmed for Snapshot 15w31a

migrated

Confirmed for 15w47a

migrated

Confirmed for 15w47b

migrated

Confirmed for 15w49a

migrated

Confirmed for 1.8.9 and 15w51b.

marcono1234

Confirmed for

  • 15w51b

This seems to not only affect FallDistance but also Motion. This can be seen when having a command block clock that teleports the player constantly upwards (for example /tp @p ~ ~1 ~), because of MC-79938 the player appears to "bounce", however when reopening the world the player is at a higher position than before.

marcono1234

Cannot confirm for 15w51b
The fact that the player takes no damage is because he is always resistent against any kind of damage for the first seconds after entering a world.

To see that the fall damage is correct you can do this:

  1. Give yourself resistance

    /effect @p resistance 10000 3 true
  2. Place a block at the height where you would survive the fall

    /setblock ~ ~103 ~ stone
  3. Switch to Survival mode

  4. Teleport yourself up

    /tp ~2 ~115 ~
  5. Once you passed the stone block leave the world

  6. Open the world again
    You should die from the fall damage, this means the damage was not calculated from where you logged out / in

marcono1234

Sorry for the confusion and please remove the note

migrated

People who have recently reproduced this: Please describe your test setup.

marcono1234

@unknown please describe your test setup

wobst.michael

What test setup? It's explained very well in the description. Log out/exit just before you hit the ground. Log back in and you won't get any fall damage.

marcono1234

That is very likely caused by the resistance against all damage after logging in, see my comment

wobst.michael

Well, it works as expected in SMP, so there's inconsistency between SSP and SMP. Also as mentioned, if this was intended behavior, you could completely remove fall-damage from the game since you can cheat around with ease. i.e. fall-damage gets rendered completely meaningless.

marcono1234

Please link to this comment in the description of the report.

The following is based on decompiled version of Minecraft 1.8 using MCP. All method and class names are the names used in the decompiled version.

The way fall damage is handled while the respawn resistance is active is kind of strange. There are two requirements that have to be met to apply fall damage after the player logged in:

  • The server must not be an integrated server

  • PvP must be enabled

This seems not intended to me. To fix this the public boolean attackEntityFrom(DamageSource source, float amount) method of the net.minecraft.entity.player.EntityPlayerMP class needs to be modified.

/**
 * Called when the entity is attacked.
 */
public boolean attackEntityFrom(DamageSource source, float amount)
{
    if (this.func_180431_b(source))
    {
        return false;
    }
    else
    {
        // Changed this
        //boolean var3 = this.mcServer.isDedicatedServer() && this.func_175400_cq() && "fall".equals(source.damageType);
        //if (!var3 && this.respawnInvulnerabilityTicks > 0 && source != DamageSource.outOfWorld)
        if (source != DamageSource.fall && source != DamageSource.outOfWorld && this.respawnInvulnerabilityTicks > 0)
        {
            return false;
        }
        else
        {
            //...
        }
    }
}
wobst.michael

Excellent work as always, Marcono1234. :thumbs up:

migrated

I can still confirm this bug for the 1.9 Pre-Release 4. Maybe this is also the reason why Villager Golems aren't aggressive anymore after relogging (at least in Singleplayer).

marcono1234

@unknown In 1.8.9 VillagerGolems are not aggressive after reopening the world as well

migrated

Appears to be fixed in 1.9.1-pre3.

Testing results:

  • Resistance IV

  • Feather Falling IV, Protection IV diamond boots

  • Falling 250m: 3hp left

  • Falling 200m: 6hp left

  • Falling 250m, relogging at 200m (after falling 50m): 3hp left

kumasasa

Can anyone confirm the fix in 1.9.1-pre3 ?

wobst.michael

No, it's not fixed at all in 1.9.1-pre3

migrated

Cannot reproduce on 1.9.3-pre3...

  • Non-integrated MP server

  • PvP enabled in server.properties

  • Resistance IV, Feather Falling VI

  • Fall from 350 blocks, half a heart left

  • Fall from 350 blocks, logout after falling ~150 blocks, still half a heart left

Can anyone confirm?

kumasasa

@unknown, when you still can confirm this issue, please provide steps to reproduce.

migrated

At least I can still confirm it in Singpleplayer, however I didn't test it in Multiplayer. (Version 1.9.3 Pre-Release)
Steps to reproduce:
1. Build some sort of high tower.
2. Fly/Climb on top of that tower. Then go into Survival Mode.
3. Jump down once to test if you would die when you hit the ground.
4. If you die, jump down again from top of the tower and log out right before you hit the ground.
5. Log back into the world.
6. See how you don't take any fall damage.

kumasasa

@unknown: This ticket is about multiplayer, see the description.

wobst.michael

No, it's not about multiplayer. Also it's still an issue in 1.10. So why exactly has this ticket been marked as fixed?
Maybe the description should be reworked a bit since it's mainly an issue for map makers who intend to integrate fall traps into their singleplayer maps

Ezekiel

This issue is only currently present in single player, and as such I have reopened the ticket and edited it accordingly

migrated

Still cannot reproduce in 1.10:

  • Integrated singleplayer server

  • Resistance IV (4), Protection IV (4) Feather Falling IV (4) Diamond Boots

  • Falling from 250 blocks: 3 HP left (1.5 hearts)

  • Falling from 250 blocks, and relogging after falling ~150 blocks: 3 HP left (1.5 hearts)

@unknown Could you please provide a list of steps to reproduce?

wobst.michael

null: Block twenty-eight already explained it very well how to reproduce.

Block twenty-eight: you can remove that "EDIT: Irrelevant as I misunderstood the ticket. I'm sorry for that." from your latest post, as you totally understood the issue, and explained very well on how to reproduce it.

migrated

Ok, did that, thanks for mentioning.
Just something regarding the description of the bug: "This basically makes fall traps useless on PvP servers." is now actually useless since this ticket now is about a singleplayer bug.

And: Can confirm this bug for 1.10.

FaRo1

Confirmed for 1.10.1.

migrated

Confirmed for 1.10.2.

migrated

Confirmed for 16w36a

migrated

The bug is still there in 16w43a snapshot of 1.11.

SunCat

@unknown, 16w43a is already in the list of affected versions

FaRo1

If you can see that, that's enough for one version. Many people have seen it before in other versions and there's not a big chance that it was fixed accidentally.

migrated

Confirmed for 17w13b (If a bug should not be confirmed for every version, I apologize)

wobst.michael

@unknown that's totally fine and helps a lot.

migrated

Confirmed for 17w16b

migrated

Confirmed for 17w17b

migrated

Confirmed in 1.12.2

migrated

Confirmed for 18w11a

migrated

Confirmed for 18w14a

migrated

Affects 18w14b

migrated

Affects 18w16a

migrated

Confirmed for 18w22a

migrated

Confirmed for 1.13-pre1

migrated

Confirmed for 1.13-pre2

migrated

Confirmed for 1.13.1.

migrated

Confirmed for 1.13.2-pre2.

migrated

Confirmed for 19w13b

migrated

Maybe it's that when you log out of a game the information of the fall is not saved and/or used when you log back in. So then the game registers it as a fall from that fall level. 

bluecrab2

Confirmed in 20w15a, part of me doesn't want them to fix this bug because it has saved my life so many times lol

migrated

Confirmed in 20w16a!

migrated

Confirmed in 1.16-pre3. Quite an old bug here. 🙂

migrated

Confirmed in 1.16-pre4.

migrated

Confirmed in 1.16-pre5.

migrated

Confirmed in 1.16-pre6.

[Mod] markderickson

Hi there!

Can confirm for 1.16.1.

[Mod] markderickson

Hi there!

Can confirm for 20w27a.

Avoma

Can confirm in 20w48a.

Avoma

Can confirm in 20w49a.

Avoma

Can confirm in 20w51a.

Avoma

Relates to MC-205304 and MC-105103.

Avoma

Can confirm in 21w03a. Requesting ownership if the reporter no longer wants to update the ticket.

Avoma

Can confirm in 21w05a.

Avoma

Can confirm in 21w05b.

Avoma

Can confirm in 21w06a.

Avoma

Can confirm in 21w07a.

Avoma

Can confirm in 21w08b.

Avoma

Can confirm in 1.16.5 and 21w11a.

Avoma

Can confirm in 21w14a.

Avoma

Can confirm in 21w17a.

MMK21

Affects 1.17

migrated

Bug also applies to multiplayer in 1.17.1

Avoma

In regards to the above comment, I've done some further investigating regarding this issue and it appears that this problem doesn't exist in multiplayer server worlds, but does exist in multiplayer LAN and singleplayer worlds. I'm not exactly sure why this is the case, but I've provided some attachments that demonstrate this behavior.

[media][media][media]
Avoma

Can confirm this in 21w39a. As stated above by myself, this issue appears to affect only multiplayer LAN worlds and singleplayer worlds. Multiplayer server worlds are not affected by this problem. Here are some extra details regarding this issue,

The Bug:

Fall damage is ignored for a couple of seconds when reloading into a LAN or singleplayer world.

Please note that multiplayer server worlds are not affected by this issue.

Steps to Reproduce:

  • Summon a large tower of blocks.

/fill ~3 ~ ~ ~3 ~45 ~ minecraft:polished_andesite
  • Stand on top of the tower and switch into survival mode.

  • Jump off the edge of the tower, but before you hit the ground, hit the ESC key and exit the world.

  • Load into the world once again.

  • Pay close attention to your health and to whether you receive any damage or not.

Observed Behavior:

Fall damage is ignored for a couple of seconds when reloading into a LAN or singleplayer world.

Expected Behavior:

Fall damage would not be ignored for a couple of seconds when reloading into a LAN or singleplayer world.

Code Analysis:

Code analysis by @unknown can be found in this comment.

FaRo1

I can confirm that this does NOT happen with a Vanilla server that I just freshly set up. Interestingly, it did work many times on a server I play on that used to be on Bukkit 1.16.5 and still works now that it is on Fabric 1.17.1.

MMK21

Affects 1.18.1

MMK21

Affects 1.18.2

migrated

confirm for 22w15a

Brain81505

Can confirm in 23w03a

Brain81505

Can confirm in 23w04a

Brain81505

Can confirm in 23w06a

migrated

Can confirm in 1.20

Brain81505

Can confirm in 23w32a

AMGAMES04

Can confirm in 23w33a

migrated

This happens on bedrock even Sometimes its just the sound delayed other times it could be 10 seconds or more of random fall damage. Painful when moving down a mountain and the fall damage happens all at once  over multiple 4 blocks drops 

Brain81505

Can confirm in 23w43a

migrated

Can confirm in 1.20, 1.20.1 

migrated

Confirmed in 1.20.3 pre 1

migrated

Can confirm in 1.20.2

qvu217720

Confrimed at 1.20.5 pre-release 1

Avoma

Shugoh

Confirmed

Platform

Important

Entities

mojang_internal_1

Minecraft 1.4.2, Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w26a, Minecraft 1.6, ..., 1.21, 1.21 Release Candidate 1, 1.21.1, 1.21.2 Pre-Release 3, 1.21.3

Minecraft 1.4.3, Minecraft 1.9.3 Pre-Release 3, 24w45a

Retrieved