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:
Summon a large tower of blocks by using the command provided below.
/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 and as you do this, watch your health closely.
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
is duplicated by
relates to
Attachments
Comments


mattabase has reported this on his stream as well
Falldamage can occur on a remote server with pvp turned on.

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

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.
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 😛

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.

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

Reopened as this is still an issue in 1.6 Singeplayer.

@@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)

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.

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.

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.

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

Still in 1.8.1

Confirmed for Snapshot 15w31a

Confirmed for 15w47a

Confirmed for 15w47b

Confirmed for 15w49a

Confirmed for 1.8.9 and 15w51b.

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.

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:
Give yourself resistance
/effect @p resistance 10000 3 true
Place a block at the height where you would survive the fall
/setblock ~ ~103 ~ stone
Switch to Survival mode
Teleport yourself up
/tp ~2 ~115 ~
Once you passed the stone block leave the world
Open the world again
You should die from the fall damage, this means the damage was not calculated from where you logged out / in

Sorry for the confusion and please remove the note

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

@unknown please describe your test setup

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.

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

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.

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
{
//...
}
}
}

Excellent work as always, Marcono1234. :thumbs up:

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).

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

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

Can anyone confirm the fix in 1.9.1-pre3 ?

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

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?

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

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.

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

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

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

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?

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.

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.

Confirmed for 1.10.1.

Confirmed for 1.10.2.

Confirmed for 16w36a

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

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

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.

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

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

Confirmed for 17w16b

Confirmed for 17w17b

Confirmed in 1.12.2

Confirmed for 18w11a

Confirmed for 18w14a

Affects 18w14b

Affects 18w16a

Confirmed for 18w22a

Confirmed for 1.13-pre1

Confirmed for 1.13-pre2

Confirmed for 1.13.1.

Confirmed for 1.13.2-pre2.

Confirmed for 19w13b

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.

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

Confirmed in 20w16a!

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

Confirmed in 1.16-pre4.

Confirmed in 1.16-pre5.

Confirmed in 1.16-pre6.
Hi there!
Can confirm for 1.16.1.
Hi there!
Can confirm for 20w27a.
Can confirm in 20w48a.
Can confirm in 20w49a.
Can confirm in 20w51a.
Can confirm in 21w03a. Requesting ownership if the reporter no longer wants to update the ticket.
Can confirm in 21w05a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a.
Can confirm in 21w08b.
Can confirm in 1.16.5 and 21w11a.
Can confirm in 21w14a.
Can confirm in 21w17a.

Affects 1.17

Bug also applies to multiplayer in 1.17.1
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]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.

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.

Affects 1.18.1

Affects 1.18.2

confirm for 22w15a

Can confirm in 23w03a

Can confirm in 23w04a

Can confirm in 23w06a

Can confirm in 1.20

Can confirm in 23w32a

Can confirm in 23w33a

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

Can confirm in 23w43a

Can confirm in 1.20, 1.20.1

Confirmed in 1.20.3 pre 1

Can confirm in 1.20.2

Confrimed at 1.20.5 pre-release 1